diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3162b4..d0e9075 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,26 +18,34 @@ jobs: deno: - "1.x" - "2.x" + - "latest" - "1.33.1" - "canary" - "~1.32" - "b290fd01f3f5d32f9d010fc719ced0240759c049" - "rc" - "lts" + - "stable" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Deno uses: ./ with: deno-version: ${{ matrix.deno }} + - name: Report Deno versions + shell: bash + run: | + printf -- '%s\n' 'Used deno-version:' '${{ matrix.deno }}' '' + deno --version + - name: Test Deno run: deno run https://deno.land/std@0.198.0/examples/welcome.ts - name: Test `deno install -g` (2.0) - if: matrix.deno == 'canary' || matrix.deno == 'latest' + if: matrix.deno == 'canary' || matrix.deno == 'stable' run: | deno install -g --allow-net --no-config -n deno_curl https://deno.land/std@0.198.0/examples/curl.ts deno_curl https://deno.land/std@0.198.0/examples/curl.ts @@ -54,7 +62,7 @@ jobs: matrix: deno-version-file: [.dvmrc, .tool-versions] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Deno uses: ./ @@ -70,7 +78,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Deno uses: ./ @@ -86,7 +94,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Deno uses: ./ @@ -103,7 +111,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Deno uses: ./ @@ -116,7 +124,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Deno uses: ./ @@ -130,12 +138,12 @@ jobs: run: deno fmt --check - name: Check types - run: deno check src/main.ts + run: deno check src/main.ts src/post.ts build-diff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Deno uses: ./ @@ -145,5 +153,10 @@ jobs: - name: Build code run: deno run -A scripts/build.ts - - name: Assert no git changes (run `deno task build` if this fails) + - name: Assert no git changes run: git diff --quiet + + - name: Advise about failures + if: failure() + shell: bash + run: printf -- '%s\n' 'Run "deno task build" to update the files under dist/ in the repository.' diff --git a/README.md b/README.md index b909159..54528d1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ one of the following: | Channel | Description | | -------- | -------------------------------- | -| `latest` | Latest Stable release version | +| `stable` | Latest Stable release version | | `lts` | Latest Long-Term-Support version | | `rc` | Latest Release-Candidate version | | `canary` | Latest Canary release version | diff --git a/deno.lock b/deno.lock index 8d46b31..aa36d46 100644 --- a/deno.lock +++ b/deno.lock @@ -1,71 +1,64 @@ { "version": "5", "specifiers": { - "npm:@actions/cache@4.0.3": "4.0.3", - "npm:@actions/core@^1.11.1": "1.11.1", - "npm:@actions/glob@0.5": "0.5.0", - "npm:@actions/tool-cache@^2.0.2": "2.0.2", - "npm:@types/node@^20.16.5": "20.17.47", - "npm:@types/semver@^7.7.0": "7.7.0", - "npm:semver@^7.7.1": "7.7.2", - "npm:tsdown@0.10.1": "0.10.1_rolldown@1.0.0-beta.8-commit.852c603__valibot@1.0.0", - "npm:undici@^7.8.0": "7.9.0" + "npm:@actions/cache@5": "5.0.5", + "npm:@actions/core@2": "2.0.3", + "npm:@actions/glob@0.5": "0.5.1", + "npm:@actions/http-client@3": "3.0.2", + "npm:@actions/tool-cache@3": "3.0.1", + "npm:@types/node@20": "20.19.33", + "npm:@types/semver@7": "7.7.1", + "npm:semver@7": "7.7.4", + "npm:tsdown@0.20": "0.20.3_rolldown@1.0.0-rc.3" }, "npm": { - "@actions/cache@4.0.3": { - "integrity": "sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg==", + "@actions/cache@5.0.5": { + "integrity": "sha512-jiQSg0gfd+C2KPgcmdCOq7dCuCIQQWQ4b1YfGIRaaA9w7PJbRwTOcCz4LiFEUnqZGf0ha/8OKL3BeNwetHzYsQ==", "dependencies": [ "@actions/core", "@actions/exec", - "@actions/glob@0.1.2", + "@actions/glob", "@actions/http-client", "@actions/io", "@azure/abort-controller@1.1.0", - "@azure/ms-rest-js", + "@azure/core-rest-pipeline", "@azure/storage-blob", - "@protobuf-ts/plugin", + "@protobuf-ts/runtime-rpc", "semver@6.3.1" ] }, - "@actions/core@1.11.1": { - "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", + "@actions/core@2.0.3": { + "integrity": "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA==", "dependencies": [ "@actions/exec", "@actions/http-client" ] }, - "@actions/exec@1.1.1": { - "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "@actions/exec@2.0.0": { + "integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==", "dependencies": [ "@actions/io" ] }, - "@actions/glob@0.1.2": { - "integrity": "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==", - "dependencies": [ - "@actions/core", - "minimatch" - ] - }, - "@actions/glob@0.5.0": { - "integrity": "sha512-tST2rjPvJLRZLuT9NMUtyBjvj9Yo0MiJS3ow004slMvm8GFM+Zv9HvMJ7HWzfUyJnGrJvDsYkWBaaG3YKXRtCw==", + "@actions/glob@0.5.1": { + "integrity": "sha512-+dv/t2aKQdKp9WWSp+1yIXVJzH5Q38M0Mta26pzIbeec14EcIleMB7UU6N7sNgbEuYfyuVGpE5pOKjl6j1WXkA==", "dependencies": [ "@actions/core", "minimatch" ] }, - "@actions/http-client@2.2.3": { - "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", + "@actions/http-client@3.0.2": { + "integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==", "dependencies": [ "tunnel", - "undici@5.29.0" + "undici" ] }, - "@actions/io@1.1.3": { - "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==" + "@actions/io@2.0.0": { + "integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==" }, - "@actions/tool-cache@2.0.2": { - "integrity": "sha512-fBhNNOWxuoLxztQebpOaWu6WeVmuwa77Z+DxIZ1B+OYvGkGQon6kTVg6Z32Cb13WCuw0szqonK+hh03mJV7Z6w==", + "@actions/tool-cache@3.0.1": { + "integrity": "sha512-euK7sID37jMg1yWGkdXkLPI5Te7x/+2QMUPeHXogcpzUZ81mqlDZ+CgYhQo3LtB8LpVnnQyjs+hTTU0Ir4Y0RQ==", "dependencies": [ "@actions/core", "@actions/exec", @@ -77,25 +70,25 @@ "@azure/abort-controller@1.1.0": { "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", "dependencies": [ - "tslib@2.8.1" + "tslib" ] }, "@azure/abort-controller@2.1.2": { "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", "dependencies": [ - "tslib@2.8.1" + "tslib" ] }, - "@azure/core-auth@1.9.0": { - "integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==", + "@azure/core-auth@1.10.1": { + "integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==", "dependencies": [ "@azure/abort-controller@2.1.2", "@azure/core-util", - "tslib@2.8.1" + "tslib" ] }, - "@azure/core-client@1.9.4": { - "integrity": "sha512-f7IxTD15Qdux30s2qFARH+JxgwxWLG2Rlr4oSkPGuLWm+1p5y1+C04XGLA0vmX6EtqfutmjvpNmAfgwVIS5hpw==", + "@azure/core-client@1.10.1": { + "integrity": "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==", "dependencies": [ "@azure/abort-controller@2.1.2", "@azure/core-auth", @@ -103,11 +96,11 @@ "@azure/core-tracing", "@azure/core-util", "@azure/logger", - "tslib@2.8.1" + "tslib" ] }, - "@azure/core-http-compat@2.3.0": { - "integrity": "sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==", + "@azure/core-http-compat@2.3.2_@azure+core-client@1.10.1_@azure+core-rest-pipeline@1.22.2": { + "integrity": "sha512-Tf6ltdKzOJEgxZeWLCjMxrxbodB/ZeCbzzA1A2qHbhzAjzjHoBVSUeSl/baT/oHAxhc4qdqVaDKnc2+iE932gw==", "dependencies": [ "@azure/abort-controller@2.1.2", "@azure/core-client", @@ -120,17 +113,17 @@ "@azure/abort-controller@2.1.2", "@azure/core-util", "@azure/logger", - "tslib@2.8.1" + "tslib" ] }, "@azure/core-paging@1.6.2": { "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", "dependencies": [ - "tslib@2.8.1" + "tslib" ] }, - "@azure/core-rest-pipeline@1.20.0": { - "integrity": "sha512-ASoP8uqZBS3H/8N8at/XwFr6vYrRP3syTK0EUjDXQy0Y1/AUS+QeIRThKmTNJO2RggvBBxaXDPM7YoIwDGeA0g==", + "@azure/core-rest-pipeline@1.22.2": { + "integrity": "sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==", "dependencies": [ "@azure/abort-controller@2.1.2", "@azure/core-auth", @@ -138,52 +131,39 @@ "@azure/core-util", "@azure/logger", "@typespec/ts-http-runtime", - "tslib@2.8.1" + "tslib" ] }, - "@azure/core-tracing@1.2.0": { - "integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==", + "@azure/core-tracing@1.3.1": { + "integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==", "dependencies": [ - "tslib@2.8.1" + "tslib" ] }, - "@azure/core-util@1.12.0": { - "integrity": "sha512-13IyjTQgABPARvG90+N2dXpC+hwp466XCdQXPCRlbWHgd3SJd5Q1VvaBGv6k1BIa4MQm6hAF1UBU1m8QUxV8sQ==", + "@azure/core-util@1.13.1": { + "integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==", "dependencies": [ "@azure/abort-controller@2.1.2", "@typespec/ts-http-runtime", - "tslib@2.8.1" + "tslib" ] }, - "@azure/core-xml@1.4.5": { - "integrity": "sha512-gT4H8mTaSXRz7eGTuQyq1aIJnJqeXzpOe9Ay7Z3FrCouer14CbV3VzjnJrNrQfbBpGBLO9oy8BmrY75A0p53cA==", + "@azure/core-xml@1.5.0": { + "integrity": "sha512-D/sdlJBMJfx7gqoj66PKVmhDDaU6TKA49ptcolxdas29X7AfvLTmfAGLjAcIMBK7UZ2o4lygHIqVckOlQU3xWw==", "dependencies": [ "fast-xml-parser", - "tslib@2.8.1" + "tslib" ] }, - "@azure/logger@1.2.0": { - "integrity": "sha512-0hKEzLhpw+ZTAfNJyRrn6s+V0nDWzXk9OjBr2TiGIu0OfMr5s2V4FpKLTAK3Ca5r5OKLbf4hkOGDPyiRjie/jA==", + "@azure/logger@1.3.0": { + "integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==", "dependencies": [ "@typespec/ts-http-runtime", - "tslib@2.8.1" - ] - }, - "@azure/ms-rest-js@2.7.0": { - "integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==", - "dependencies": [ - "@azure/core-auth", - "abort-controller", - "form-data", - "node-fetch", - "tslib@1.14.1", - "tunnel", - "uuid", - "xml2js" + "tslib" ] }, - "@azure/storage-blob@12.27.0": { - "integrity": "sha512-IQjj9RIzAKatmNca3D6bT0qJ+Pkox1WZGOg2esJF2YLHb45pQKOwGPIAV+w3rfgkj7zV3RMxpn/c6iftzSOZJQ==", + "@azure/storage-blob@12.31.0_@azure+core-client@1.10.1_@azure+core-rest-pipeline@1.22.2": { + "integrity": "sha512-DBgNv10aCSxopt92DkTDD0o9xScXeBqPKGmR50FPZQaEcH4JLQ+GEOGEDv19V5BMkB7kxr+m4h6il/cCDPvmHg==", "dependencies": [ "@azure/abort-controller@2.1.2", "@azure/core-auth", @@ -196,66 +176,78 @@ "@azure/core-util", "@azure/core-xml", "@azure/logger", + "@azure/storage-common", + "events", + "tslib" + ] + }, + "@azure/storage-common@12.3.0_@azure+core-client@1.10.1_@azure+core-rest-pipeline@1.22.2": { + "integrity": "sha512-/OFHhy86aG5Pe8dP5tsp+BuJ25JOAl9yaMU3WZbkeoiFMHFtJ7tu5ili7qEdBXNW9G5lDB19trwyI6V49F/8iQ==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@azure/core-auth", + "@azure/core-http-compat", + "@azure/core-rest-pipeline", + "@azure/core-tracing", + "@azure/core-util", + "@azure/logger", "events", - "tslib@2.8.1" + "tslib" ] }, - "@babel/generator@7.27.1": { - "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", + "@babel/generator@8.0.0-rc.1": { + "integrity": "sha512-3ypWOOiC4AYHKr8vYRVtWtWmyvcoItHtVqF8paFax+ydpmUdPsJpLBkBBs5ItmhdrwC3a0ZSqqFAdzls4ODP3w==", "dependencies": [ "@babel/parser", "@babel/types", "@jridgewell/gen-mapping", "@jridgewell/trace-mapping", + "@types/jsesc", "jsesc" ] }, - "@babel/helper-string-parser@7.27.1": { - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==" + "@babel/helper-string-parser@8.0.0-rc.2": { + "integrity": "sha512-noLx87RwlBEMrTzncWd/FvTxoJ9+ycHNg0n8yyYydIoDsLZuxknKgWRJUqcrVkNrJ74uGyhWQzQaS3q8xfGAhQ==" }, - "@babel/helper-validator-identifier@7.27.1": { - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==" + "@babel/helper-validator-identifier@8.0.0-rc.1": { + "integrity": "sha512-I4YnARytXC2RzkLNVnf5qFNFMzp679qZpmtw/V3Jt2uGnWiIxyJtaukjG7R8pSx8nG2NamICpGfljQsogj+FbQ==" }, - "@babel/parser@7.27.2": { - "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", + "@babel/parser@8.0.0-rc.1": { + "integrity": "sha512-6HyyU5l1yK/7h9Ki52i5h6mDAx4qJdiLQO4FdCyJNoB/gy3T3GGJdhQzzbZgvgZCugYBvwtQiWRt94QKedHnkA==", "dependencies": [ "@babel/types" ], "bin": true }, - "@babel/types@7.27.1": { - "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", + "@babel/types@8.0.0-rc.1": { + "integrity": "sha512-ubmJ6TShyaD69VE9DQrlXcdkvJbmwWPB8qYj0H2kaJi29O7vJT9ajSdBd2W8CG34pwL9pYA74fi7RHC1qbLoVQ==", "dependencies": [ "@babel/helper-string-parser", "@babel/helper-validator-identifier" ] }, - "@emnapi/core@1.4.3": { - "integrity": "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==", + "@emnapi/core@1.8.1": { + "integrity": "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==", "dependencies": [ "@emnapi/wasi-threads", - "tslib@2.8.1" + "tslib" ] }, - "@emnapi/runtime@1.4.3": { - "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", + "@emnapi/runtime@1.8.1": { + "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", "dependencies": [ - "tslib@2.8.1" + "tslib" ] }, - "@emnapi/wasi-threads@1.0.2": { - "integrity": "sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==", + "@emnapi/wasi-threads@1.1.0": { + "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", "dependencies": [ - "tslib@2.8.1" + "tslib" ] }, - "@fastify/busboy@2.1.1": { - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==" - }, - "@jridgewell/gen-mapping@0.3.8": { - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "@jridgewell/gen-mapping@0.3.13": { + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dependencies": [ - "@jridgewell/set-array", "@jridgewell/sourcemap-codec", "@jridgewell/trace-mapping" ] @@ -263,308 +255,163 @@ "@jridgewell/resolve-uri@3.1.2": { "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==" }, - "@jridgewell/set-array@1.2.1": { - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==" + "@jridgewell/sourcemap-codec@1.5.5": { + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==" }, - "@jridgewell/sourcemap-codec@1.5.0": { - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" - }, - "@jridgewell/trace-mapping@0.3.25": { - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "@jridgewell/trace-mapping@0.3.31": { + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dependencies": [ "@jridgewell/resolve-uri", "@jridgewell/sourcemap-codec" ] }, - "@napi-rs/wasm-runtime@0.2.9": { - "integrity": "sha512-OKRBiajrrxB9ATokgEQoG87Z25c67pCpYcCwmXYX8PBftC9pBfN18gnm/fh1wurSLEKIAt+QRFLFCQISrb66Jg==", + "@napi-rs/wasm-runtime@1.1.1": { + "integrity": "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==", "dependencies": [ "@emnapi/core", "@emnapi/runtime", "@tybys/wasm-util" ] }, - "@oxc-project/types@0.67.0": { - "integrity": "sha512-AI7inoYvnVro7b8S2Z+Fxi295xQvNKLP1CM/xzx5il4R3aiGgnFt9qiXaRo9vIutataX8AjHcaPnOsjdcItU0w==" - }, - "@oxc-resolver/binding-darwin-arm64@9.0.2": { - "integrity": "sha512-MVyRgP2gzJJtAowjG/cHN3VQXwNLWnY+FpOEsyvDepJki1SdAX/8XDijM1yN6ESD1kr9uhBKjGelC6h3qtT+rA==", - "os": ["darwin"], - "cpu": ["arm64"] - }, - "@oxc-resolver/binding-darwin-x64@9.0.2": { - "integrity": "sha512-7kV0EOFEZ3sk5Hjy4+bfA6XOQpCwbDiDkkHN4BHHyrBHsXxUR05EcEJPPL1WjItefg+9+8hrBmoK0xRoDs41+A==", - "os": ["darwin"], - "cpu": ["x64"] - }, - "@oxc-resolver/binding-freebsd-x64@9.0.2": { - "integrity": "sha512-6OvkEtRXrt8sJ4aVfxHRikjain9nV1clIsWtJ1J3J8NG1ZhjyJFgT00SCvqxbK+pzeWJq6XzHyTCN78ML+lY2w==", - "os": ["freebsd"], - "cpu": ["x64"] - }, - "@oxc-resolver/binding-linux-arm-gnueabihf@9.0.2": { - "integrity": "sha512-aYpNL6o5IRAUIdoweW21TyLt54Hy/ZS9tvzNzF6ya1ckOQ8DLaGVPjGpmzxdNja9j/bbV6aIzBH7lNcBtiOTkQ==", - "os": ["linux"], - "cpu": ["arm"] - }, - "@oxc-resolver/binding-linux-arm64-gnu@9.0.2": { - "integrity": "sha512-RGFW4vCfKMFEIzb9VCY0oWyyY9tR1/o+wDdNePhiUXZU4SVniRPQaZ1SJ0sUFI1k25pXZmzQmIP6cBmazi/Dew==", - "os": ["linux"], - "cpu": ["arm64"] - }, - "@oxc-resolver/binding-linux-arm64-musl@9.0.2": { - "integrity": "sha512-lxx/PibBfzqYvut2Y8N2D0Ritg9H8pKO+7NUSJb9YjR/bfk2KRmP8iaUz3zB0JhPtf/W3REs65oKpWxgflGToA==", - "os": ["linux"], - "cpu": ["arm64"] - }, - "@oxc-resolver/binding-linux-riscv64-gnu@9.0.2": { - "integrity": "sha512-yD28ptS/OuNhwkpXRPNf+/FvrO7lwURLsEbRVcL1kIE0GxNJNMtKgIE4xQvtKDzkhk6ZRpLho5VSrkkF+3ARTQ==", - "os": ["linux"], - "cpu": ["riscv64"] - }, - "@oxc-resolver/binding-linux-s390x-gnu@9.0.2": { - "integrity": "sha512-WBwEJdspoga2w+aly6JVZeHnxuPVuztw3fPfWrei2P6rNM5hcKxBGWKKT6zO1fPMCB4sdDkFohGKkMHVV1eryQ==", - "os": ["linux"], - "cpu": ["s390x"] - }, - "@oxc-resolver/binding-linux-x64-gnu@9.0.2": { - "integrity": "sha512-a2z3/cbOOTUq0UTBG8f3EO/usFcdwwXnCejfXv42HmV/G8GjrT4fp5+5mVDoMByH3Ce3iVPxj1LmS6OvItKMYQ==", - "os": ["linux"], - "cpu": ["x64"] - }, - "@oxc-resolver/binding-linux-x64-musl@9.0.2": { - "integrity": "sha512-bHZF+WShYQWpuswB9fyxcgMIWVk4sZQT0wnwpnZgQuvGTZLkYJ1JTCXJMtaX5mIFHf69ngvawnwPIUA4Feil0g==", - "os": ["linux"], - "cpu": ["x64"] + "@oxc-project/types@0.112.0": { + "integrity": "sha512-m6RebKHIRsax2iCwVpYW2ErQwa4ywHJrE4sCK3/8JK8ZZAWOKXaRJFl/uP51gaVyyXlaS4+chU1nSCdzYf6QqQ==" }, - "@oxc-resolver/binding-wasm32-wasi@9.0.2": { - "integrity": "sha512-I5cSgCCh5nFozGSHz+PjIOfrqW99eUszlxKLgoNNzQ1xQ2ou9ZJGzcZ94BHsM9SpyYHLtgHljmOZxCT9bgxYNA==", - "dependencies": [ - "@napi-rs/wasm-runtime" - ], - "cpu": ["wasm32"] - }, - "@oxc-resolver/binding-win32-arm64-msvc@9.0.2": { - "integrity": "sha512-5IhoOpPr38YWDWRCA5kP30xlUxbIJyLAEsAK7EMyUgqygBHEYLkElaKGgS0X5jRXUQ6l5yNxuW73caogb2FYaw==", - "os": ["win32"], - "cpu": ["arm64"] - }, - "@oxc-resolver/binding-win32-x64-msvc@9.0.2": { - "integrity": "sha512-Qc40GDkaad9rZksSQr2l/V9UubigIHsW69g94Gswc2sKYB3XfJXfIfyV8WTJ67u6ZMXsZ7BH1msSC6Aen75mCg==", - "os": ["win32"], - "cpu": ["x64"] - }, - "@oxc-transform/binding-darwin-arm64@0.67.0": { - "integrity": "sha512-P3zBMhpOQceNSys3/ZqvrjuRvcIbVzfGFN/tH34HlVkOjOmfGK1mOWjORsGAZtbgh1muXrF6mQETLzFjfYndXQ==", - "os": ["darwin"], - "cpu": ["arm64"] - }, - "@oxc-transform/binding-darwin-x64@0.67.0": { - "integrity": "sha512-B52aeo/C3spYHcwFQ4nAbDkwbMKf0K6ncWM8GrVUgGu8PPECLBhjPCW11kPW/lt9FxwrdgVYVzPYlZ6wmJmpEA==", - "os": ["darwin"], - "cpu": ["x64"] - }, - "@oxc-transform/binding-linux-arm-gnueabihf@0.67.0": { - "integrity": "sha512-5Ir1eQrC9lvj/rR1TJVGwOR4yLgXTLmfKHIfpVH7GGSQrzK7VMUfHWX+dAsX1VutaeE8puXIqtYvf9cHLw78dw==", - "os": ["linux"], - "cpu": ["arm"] - }, - "@oxc-transform/binding-linux-arm64-gnu@0.67.0": { - "integrity": "sha512-zTqfPET5+hZfJ3/dMqJboKxrpXMXk+j2HVdvX0wVhW2MI7n7hwELl+In6Yu20nXuEyJkNQlWHbNPCUfpM+cBWw==", - "os": ["linux"], - "cpu": ["arm64"] - }, - "@oxc-transform/binding-linux-arm64-musl@0.67.0": { - "integrity": "sha512-jzz/ATUhZ8wetb4gm5GwzheZns3Qj1CZ+DIMmD8nBxQXszmTS/fqnAPpgzruyLqkXBUuUfF3pHv5f/UmuHReuQ==", - "os": ["linux"], - "cpu": ["arm64"] - }, - "@oxc-transform/binding-linux-x64-gnu@0.67.0": { - "integrity": "sha512-Qy2+tfglJ8yX6guC1EDAnuuzRZIXciXO9UwOewxyiahLxwuTpj/wvvZN3Cb1SA3c14zrwb2TNMZvaXS1/OS5Pg==", - "os": ["linux"], - "cpu": ["x64"] - }, - "@oxc-transform/binding-linux-x64-musl@0.67.0": { - "integrity": "sha512-tHoYgDIRhgvh+/wIrzAk3cUoj/LSSoJAdsZW9XRlaixFW/TF2puxRyaS1hRco0bcKTwotXl/eDYqZmhIfUyGRQ==", - "os": ["linux"], - "cpu": ["x64"] - }, - "@oxc-transform/binding-wasm32-wasi@0.67.0": { - "integrity": "sha512-ZPT+1HECf7WUnotodIuS8tvSkwaiCdC2DDw8HVRmlerbS6iPYIPKyBCvkSM4RyUx0kljZtB9AciLCkEbwy5/zA==", - "dependencies": [ - "@napi-rs/wasm-runtime" - ], - "cpu": ["wasm32"] - }, - "@oxc-transform/binding-win32-arm64-msvc@0.67.0": { - "integrity": "sha512-+E3lOHCk4EuIk6IjshBAARknAUpgH+gHTtZxCPqK4AWYA+Tls2J6C0FVM48uZ4m3rZpAq8ZszM9JZVAkOaynBQ==", - "os": ["win32"], - "cpu": ["arm64"] - }, - "@oxc-transform/binding-win32-x64-msvc@0.67.0": { - "integrity": "sha512-3pIIFb9g5aFrAODTQVJYitq+ONHgDJ4IYk/7pk+jsG6JpKUkURd0auUlxvriO11fFit5hdwy+wIbU4kBvyRUkg==", - "os": ["win32"], - "cpu": ["x64"] - }, - "@protobuf-ts/plugin-framework@2.10.0": { - "integrity": "sha512-EuW9irbt+w7Ml1CaAxK6xyl7pSuWVbNy0rsChxJEthMrAVTN5EPdJ3whNWvsRBa+HwRImEl8KHNnRoq/vGOHbg==", - "dependencies": [ - "@protobuf-ts/runtime", - "typescript" - ] - }, - "@protobuf-ts/plugin@2.10.0": { - "integrity": "sha512-iMX4C4TVfMNRLn2msK0cVg5jmizjtu5FYiy8EK5Lg6EgyR9TVHeK2rzmufWKYM2Pcg1jSwC0cFcXHQnCoeFxUg==", - "dependencies": [ - "@protobuf-ts/plugin-framework", - "@protobuf-ts/protoc", - "@protobuf-ts/runtime", - "@protobuf-ts/runtime-rpc", - "typescript" - ], - "bin": true - }, - "@protobuf-ts/protoc@2.10.0": { - "integrity": "sha512-S4BtGBh22+uL5E6qLVxV0QNY6tiLVB8QL7RIkvo+KYknipZfSNwubdKy5CPkrwVXzJn4s3cx7bKx1w6BxkBIPg==", - "bin": true - }, - "@protobuf-ts/runtime-rpc@2.10.0": { - "integrity": "sha512-8CS/XPv3+pMK4v8UKhtCdvbS4h9l7aqlteKdRt0/UbIKZ8n0qHj6hX8cBhz2ngvohxCOS0N08zPr9aCLBNhW3Q==", + "@protobuf-ts/runtime-rpc@2.11.1": { + "integrity": "sha512-4CqqUmNA+/uMz00+d3CYKgElXO9VrEbucjnBFEjqI4GuDrEQ32MaI3q+9qPBvIGOlL4PmHXrzM32vBPWRhQKWQ==", "dependencies": [ "@protobuf-ts/runtime" ] }, - "@protobuf-ts/runtime@2.10.0": { - "integrity": "sha512-ypYwGg9Pn3W/2lZ7/HW60hONGuSdzphvOY8Dq7LeNttymDe0y3LaTUUMRpuGqOT6FfrWEMnfQbyqU8AAreo8wA==" + "@protobuf-ts/runtime@2.11.1": { + "integrity": "sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==" }, - "@quansync/fs@0.1.3": { - "integrity": "sha512-G0OnZbMWEs5LhDyqy2UL17vGhSVHkQIfVojMtEWVenvj0V5S84VBgy86kJIuNsGDp2p7sTKlpSIpBUWdC35OKg==", + "@quansync/fs@1.0.0": { + "integrity": "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==", "dependencies": [ "quansync" ] }, - "@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-V0zbNPcyRVZFUUtCiJxXMuOYriszcgzc5wW5DUA5mHDlM0gDc1snsLzM245q5fGlSLmq+Rgerkclv0ZEjgHwDw==", + "@rolldown/binding-android-arm64@1.0.0-rc.3": { + "integrity": "sha512-0T1k9FinuBZ/t7rZ8jN6OpUKPnUjNdYHoj/cESWrQ3ZraAJ4OMm6z7QjSfCxqj8mOp9kTKc1zHK3kGz5vMu+nQ==", + "os": ["android"], + "cpu": ["arm64"] + }, + "@rolldown/binding-darwin-arm64@1.0.0-rc.3": { + "integrity": "sha512-JWWLzvcmc/3pe7qdJqPpuPk91SoE/N+f3PcWx/6ZwuyDVyungAEJPvKm/eEldiDdwTmaEzWfIR+HORxYWrCi1A==", "os": ["darwin"], "cpu": ["arm64"] }, - "@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-7RXXJo0U52YocMH/Bv829U3ZCXIL/+HhXme165HHflpg2flTk8dkk65Ft1lOtV80JNmUFwgfHYhvWeKz8j7qWQ==", + "@rolldown/binding-darwin-x64@1.0.0-rc.3": { + "integrity": "sha512-MTakBxfx3tde5WSmbHxuqlDsIW0EzQym+PJYGF4P6lG2NmKzi128OGynoFUqoD5ryCySEY85dug4v+LWGBElIw==", "os": ["darwin"], "cpu": ["x64"] }, - "@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-vQUshBpPMdvQUfERsyjo1iNcV7wwU65mKoCwlX0e2YFI9zqyxq+fOKUEGEVrxpz4dm0kmQ5/rPdDPZQ6TcodUA==", + "@rolldown/binding-freebsd-x64@1.0.0-rc.3": { + "integrity": "sha512-jje3oopyOLs7IwfvXoS6Lxnmie5JJO7vW29fdGFu5YGY1EDbVDhD+P9vDihqS5X6fFiqL3ZQZCMBg6jyHkSVww==", "os": ["freebsd"], "cpu": ["x64"] }, - "@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-MIeNUPb7qHB/X2Lh76Rk5cxXi0O0Cc3hRGPg8Mzwxkr5Ox5fbsJjjPHNE4g3es4VEt1NEjpZmo7XFyi1Szfbww==", + "@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.3": { + "integrity": "sha512-A0n8P3hdLAaqzSFrQoA42p23ZKBYQOw+8EH5r15Sa9X1kD9/JXe0YT2gph2QTWvdr0CVK2BOXiK6ENfy6DXOag==", "os": ["linux"], "cpu": ["arm"] }, - "@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-f9fNXp+yROAAC49aqAeSXMFcoqNlwIsmO5Spsp2ifdFb7XWSnD1EodoCC7xIjjswMvYKnHqfQbr6dP297kN2uw==", + "@rolldown/binding-linux-arm64-gnu@1.0.0-rc.3": { + "integrity": "sha512-kWXkoxxarYISBJ4bLNf5vFkEbb4JvccOwxWDxuK9yee8lg5XA7OpvlTptfRuwEvYcOZf+7VS69Uenpmpyo5Bjw==", "os": ["linux"], "cpu": ["arm64"] }, - "@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-08FSjitC8i7WWBI1DXacfhKZZ/TzjDg5uWi53aeppVWc2oT/x0TdlNVam9coU1Xs4ra6/pMe7wGroYWh/j4Lsg==", + "@rolldown/binding-linux-arm64-musl@1.0.0-rc.3": { + "integrity": "sha512-Z03/wrqau9Bicfgb3Dbs6SYTHliELk2PM2LpG2nFd+cGupTMF5kanLEcj2vuuJLLhptNyS61rtk7SOZ+lPsTUA==", "os": ["linux"], "cpu": ["arm64"] }, - "@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-NqoANlbIhYAR8ZnF8v1d8Kw8tsd0ObpVEqNxhELqcV5HKXTtlN9uwMNWWH2G953Yj3sqTdQZWVenwr7e/YchgA==", + "@rolldown/binding-linux-x64-gnu@1.0.0-rc.3": { + "integrity": "sha512-iSXXZsQp08CSilff/DCTFZHSVEpEwdicV3W8idHyrByrcsRDVh9sGC3sev6d8BygSGj3vt8GvUKBPCoyMA4tgQ==", "os": ["linux"], "cpu": ["x64"] }, - "@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-ikpkqqurJsC1ijpY7vRP+qrg+7zP0JbpoMma5PyptfGeK7MQ0hhMUNr/NzMMrI11KJjkpRYJEyJ880pFknj0tQ==", + "@rolldown/binding-linux-x64-musl@1.0.0-rc.3": { + "integrity": "sha512-qaj+MFudtdCv9xZo9znFvkgoajLdc+vwf0Kz5N44g+LU5XMe+IsACgn3UG7uTRlCCvhMAGXm1XlpEA5bZBrOcw==", "os": ["linux"], "cpu": ["x64"] }, - "@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-IwMWmxkI/I60iC6M7kIhyv7X1nx61JaaeseNHARXmU3ds0d0+Sck6YuJQH8o8I3AUzWGhltOcnUHwX97qG+KgA==", + "@rolldown/binding-openharmony-arm64@1.0.0-rc.3": { + "integrity": "sha512-U662UnMETyjT65gFmG9ma+XziENrs7BBnENi/27swZPYagubfHRirXHG2oMl+pEax2WvO7Kb9gHZmMakpYqBHQ==", + "os": ["openharmony"], + "cpu": ["arm64"] + }, + "@rolldown/binding-wasm32-wasi@1.0.0-rc.3": { + "integrity": "sha512-gekrQ3Q2HiC1T5njGyuUJoGpK/l6B/TNXKed3fZXNf9YRTJn3L5MOZsFBn4bN2+UX+8+7hgdlTcEsexX988G4g==", "dependencies": [ "@napi-rs/wasm-runtime" ], "cpu": ["wasm32"] }, - "@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-mgHMApQ9Ygfd70I4tmlENrdf6kot/T1UTA//Z9R3/xbXiPXwVjdw/BnTe+7AXG9t0QHXsocNx/47dj48BDuqOQ==", + "@rolldown/binding-win32-arm64-msvc@1.0.0-rc.3": { + "integrity": "sha512-85y5JifyMgs8m5K2XzR/VDsapKbiFiohl7s5lEj7nmNGO0pkTXE7q6TQScei96BNAsoK7JC3pA7ukA8WRHVJpg==", "os": ["win32"], "cpu": ["arm64"] }, - "@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-pvv3FLLx2Mw2BL+YSAJeE+DNDjpRgk7oCsqf28e3sr7+zfv+VnOMxHHkJTjFzl3R8BA58OMG3C4J7Fv1SVkqbQ==", - "os": ["win32"], - "cpu": ["ia32"] - }, - "@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.852c603": { - "integrity": "sha512-4gv06TqlMp3IArfyznTOWopMY1ZBZLkE4QZKY+BnxPh8NuDngXrBoQeOauW6w0ZN/8cuTYqX03N+3Hu7t3dNGw==", + "@rolldown/binding-win32-x64-msvc@1.0.0-rc.3": { + "integrity": "sha512-a4VUQZH7LxGbUJ3qJ/TzQG8HxdHvf+jOnqf7B7oFx1TEBm+j2KNL2zr5SQ7wHkNAcaPevF6gf9tQnVBnC4mD+A==", "os": ["win32"], "cpu": ["x64"] }, - "@tybys/wasm-util@0.9.0": { - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", + "@rolldown/pluginutils@1.0.0-rc.3": { + "integrity": "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==" + }, + "@tybys/wasm-util@0.10.1": { + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", "dependencies": [ - "tslib@2.8.1" + "tslib" ] }, - "@types/node@20.17.47": { - "integrity": "sha512-3dLX0Upo1v7RvUimvxLeXqwrfyKxUINk0EAM83swP2mlSUcwV73sZy8XhNz8bcZ3VbsfQyC/y6jRdL5tgCNpDQ==", + "@types/estree@1.0.8": { + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==" + }, + "@types/jsesc@2.5.1": { + "integrity": "sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==" + }, + "@types/node@20.19.33": { + "integrity": "sha512-Rs1bVAIdBs5gbTIKza/tgpMuG1k3U/UMJLWecIMxNdJFDMzcM5LOiLVRYh3PilWEYDIeUDv7bpiHPLPsbydGcw==", "dependencies": [ "undici-types" ] }, - "@types/semver@7.7.0": { - "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==" + "@types/semver@7.7.1": { + "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==" }, - "@typespec/ts-http-runtime@0.2.2": { - "integrity": "sha512-Gz/Sm64+Sq/vklJu1tt9t+4R2lvnud8NbTD/ZfpZtMiUX7YeVpCA8j6NSW8ptwcoLL+NmYANwqP8DV0q/bwl2w==", + "@typespec/ts-http-runtime@0.3.3": { + "integrity": "sha512-91fp6CAAJSRtH5ja95T1FHSKa8aPW9/Zw6cta81jlZTUw/+Vq8jM/AfF/14h2b71wwR84JUTW/3Y8QPhDAawFA==", "dependencies": [ "http-proxy-agent", "https-proxy-agent", - "tslib@2.8.1" + "tslib" ] }, - "@valibot/to-json-schema@1.0.0_valibot@1.0.0": { - "integrity": "sha512-/9crJgPptVsGCL6X+JPDQyaJwkalSZ/52WuF8DiRUxJgcmpNdzYRfZ+gqMEP8W3CTVfuMWPqqvIgfwJ97f9Etw==", - "dependencies": [ - "valibot" - ] + "agent-base@7.1.4": { + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==" }, - "abort-controller@3.0.0": { - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dependencies": [ - "event-target-shim" - ] + "ansis@4.2.0": { + "integrity": "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==" }, - "acorn@8.14.1": { - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "bin": true - }, - "agent-base@7.1.3": { - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==" - }, - "ansis@3.17.0": { - "integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==" - }, - "ast-kit@1.4.3": { - "integrity": "sha512-MdJqjpodkS5J149zN0Po+HPshkTdUyrvF7CKTafUgv69vBSPtncrj+3IiUgqdd7ElIEkbeXCsEouBUwLrw9Ilg==", + "ast-kit@3.0.0-beta.1": { + "integrity": "sha512-trmleAnZ2PxN/loHWVhhx1qeOHSRXq4TDsBBxq3GqeJitfk3+jTQ+v/C1km/KYq9M7wKqCewMh+/NAvVH7m+bw==", "dependencies": [ "@babel/parser", + "estree-walker", "pathe" ] }, - "asynckit@0.4.0": { - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, "balanced-match@1.0.2": { "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "brace-expansion@1.1.11": { - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "birpc@4.0.0": { + "integrity": "sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw==" + }, + "brace-expansion@1.1.12": { + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dependencies": [ "balanced-match", "concat-map" @@ -573,33 +420,11 @@ "cac@6.7.14": { "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==" }, - "call-bind-apply-helpers@1.0.2": { - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dependencies": [ - "es-errors", - "function-bind" - ] - }, - "chokidar@4.0.3": { - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dependencies": [ - "readdirp" - ] - }, - "combined-stream@1.0.8": { - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": [ - "delayed-stream" - ] - }, "concat-map@0.0.1": { "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, - "consola@3.4.2": { - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==" - }, - "debug@4.4.1": { - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "debug@4.4.3": { + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dependencies": [ "ms" ] @@ -607,69 +432,30 @@ "defu@6.1.4": { "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" }, - "delayed-stream@1.0.0": { - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "detect-libc@2.0.4": { - "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==" - }, - "diff@7.0.0": { - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==" - }, - "dts-resolver@1.2.0": { - "integrity": "sha512-+xNF7raXYI1E3IFB+f3JqvoKYFI8R+1Mh9mpI75yNm3F5XuiC6ErEXe2Lqh9ach+4MQ1tOefzjxulhWGVclYbg==", - "dependencies": [ - "oxc-resolver", - "pathe" - ] - }, - "dunder-proto@1.0.1": { - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dependencies": [ - "call-bind-apply-helpers", - "es-errors", - "gopd" - ] - }, - "empathic@1.1.0": { - "integrity": "sha512-rsPft6CK3eHtrlp9Y5ALBb+hfK+DWnA4WFebbazxjWyx8vSm3rZeoM3z9irsjcqO3PYRzlfv27XIB4tz2DV7RA==" - }, - "es-define-property@1.0.1": { - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" - }, - "es-errors@1.3.0": { - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + "dts-resolver@2.1.3": { + "integrity": "sha512-bihc7jPC90VrosXNzK0LTE2cuLP6jr0Ro8jk+kMugHReJVLIpHz/xadeq3MhuwyO4TD4OA3L1Q8pBBFRc08Tsw==" }, - "es-object-atoms@1.1.1": { - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dependencies": [ - "es-errors" - ] + "empathic@2.0.0": { + "integrity": "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==" }, - "es-set-tostringtag@2.1.0": { - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "estree-walker@3.0.3": { + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dependencies": [ - "es-errors", - "get-intrinsic", - "has-tostringtag", - "hasown" + "@types/estree" ] }, - "event-target-shim@5.0.1": { - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, "events@3.3.0": { "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, - "fast-xml-parser@5.2.3": { - "integrity": "sha512-OdCYfRqfpuLUFonTNjvd30rCBZUneHpSQkCqfaeWQ9qrKcl6XlWeDBNVwGb+INAIxRshuN2jF+BE0L6gbBO2mw==", + "fast-xml-parser@5.3.6": { + "integrity": "sha512-QNI3sAvSvaOiaMl8FYU4trnEzCwiRr8XMWgAHzlrWpTSj+QaCSvOf1h82OEP1s4hiAXhnbXSyFWCf4ldZzZRVA==", "dependencies": [ "strnum" ], "bin": true }, - "fdir@6.4.4_picomatch@4.0.2": { - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "fdir@6.5.0_picomatch@4.0.3": { + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dependencies": [ "picomatch" ], @@ -677,67 +463,14 @@ "picomatch" ] }, - "form-data@2.5.3": { - "integrity": "sha512-XHIrMD0NpDrNM/Ckf7XJiBbLl57KEhT3+i3yY+eWm+cqYZJQTZrKo8Y8AWKnuV5GT4scfuUGt9LzNoIx3dU1nQ==", - "dependencies": [ - "asynckit", - "combined-stream", - "es-set-tostringtag", - "mime-types", - "safe-buffer" - ] - }, - "function-bind@1.1.2": { - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" - }, - "get-intrinsic@1.3.0": { - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dependencies": [ - "call-bind-apply-helpers", - "es-define-property", - "es-errors", - "es-object-atoms", - "function-bind", - "get-proto", - "gopd", - "has-symbols", - "hasown", - "math-intrinsics" - ] - }, - "get-proto@1.0.1": { - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dependencies": [ - "dunder-proto", - "es-object-atoms" - ] - }, - "get-tsconfig@4.10.0": { - "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", + "get-tsconfig@4.13.6": { + "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==", "dependencies": [ "resolve-pkg-maps" ] }, - "gopd@1.2.0": { - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" - }, - "has-symbols@1.1.0": { - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" - }, - "has-tostringtag@1.0.2": { - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dependencies": [ - "has-symbols" - ] - }, - "hasown@2.0.2": { - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dependencies": [ - "function-bind" - ] - }, - "hookable@5.5.3": { - "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==" + "hookable@6.0.1": { + "integrity": "sha512-uKGyY8BuzN/a5gvzvA+3FVWo0+wUjgtfSdnmjtrOVwQCZPHpHDH2WRO3VZSOeluYrHoDCiXFffZXs8Dj1ULWtw==" }, "http-proxy-agent@7.0.2": { "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", @@ -753,100 +486,13 @@ "debug" ] }, - "jiti@2.4.2": { - "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", - "bin": true + "import-without-cache@0.2.5": { + "integrity": "sha512-B6Lc2s6yApwnD2/pMzFh/d5AVjdsDXjgkeJ766FmFuJELIGHNycKRj+l3A39yZPM4CchqNCB4RITEAYB1KUM6A==" }, "jsesc@3.1.0": { "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "bin": true }, - "lightningcss-darwin-arm64@1.30.1": { - "integrity": "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==", - "os": ["darwin"], - "cpu": ["arm64"] - }, - "lightningcss-darwin-x64@1.30.1": { - "integrity": "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==", - "os": ["darwin"], - "cpu": ["x64"] - }, - "lightningcss-freebsd-x64@1.30.1": { - "integrity": "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==", - "os": ["freebsd"], - "cpu": ["x64"] - }, - "lightningcss-linux-arm-gnueabihf@1.30.1": { - "integrity": "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==", - "os": ["linux"], - "cpu": ["arm"] - }, - "lightningcss-linux-arm64-gnu@1.30.1": { - "integrity": "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==", - "os": ["linux"], - "cpu": ["arm64"] - }, - "lightningcss-linux-arm64-musl@1.30.1": { - "integrity": "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==", - "os": ["linux"], - "cpu": ["arm64"] - }, - "lightningcss-linux-x64-gnu@1.30.1": { - "integrity": "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==", - "os": ["linux"], - "cpu": ["x64"] - }, - "lightningcss-linux-x64-musl@1.30.1": { - "integrity": "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==", - "os": ["linux"], - "cpu": ["x64"] - }, - "lightningcss-win32-arm64-msvc@1.30.1": { - "integrity": "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==", - "os": ["win32"], - "cpu": ["arm64"] - }, - "lightningcss-win32-x64-msvc@1.30.1": { - "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==", - "os": ["win32"], - "cpu": ["x64"] - }, - "lightningcss@1.30.1": { - "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", - "dependencies": [ - "detect-libc" - ], - "optionalDependencies": [ - "lightningcss-darwin-arm64", - "lightningcss-darwin-x64", - "lightningcss-freebsd-x64", - "lightningcss-linux-arm-gnueabihf", - "lightningcss-linux-arm64-gnu", - "lightningcss-linux-arm64-musl", - "lightningcss-linux-x64-gnu", - "lightningcss-linux-x64-musl", - "lightningcss-win32-arm64-msvc", - "lightningcss-win32-x64-msvc" - ] - }, - "magic-string@0.30.17": { - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", - "dependencies": [ - "@jridgewell/sourcemap-codec" - ] - }, - "math-intrinsics@1.1.0": { - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" - }, - "mime-db@1.52.0": { - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types@2.1.35": { - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": [ - "mime-db" - ] - }, "minimatch@3.1.2": { "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": [ @@ -856,83 +502,44 @@ "ms@2.1.3": { "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, - "node-fetch@2.7.0": { - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": [ - "whatwg-url" - ] - }, - "oxc-resolver@9.0.2": { - "integrity": "sha512-w838ygc1p7rF+7+h5vR9A+Y9Fc4imy6C3xPthCMkdFUgFvUWkmABeNB8RBDQ6+afk44Q60/UMMQ+gfDUW99fBA==", - "optionalDependencies": [ - "@oxc-resolver/binding-darwin-arm64", - "@oxc-resolver/binding-darwin-x64", - "@oxc-resolver/binding-freebsd-x64", - "@oxc-resolver/binding-linux-arm-gnueabihf", - "@oxc-resolver/binding-linux-arm64-gnu", - "@oxc-resolver/binding-linux-arm64-musl", - "@oxc-resolver/binding-linux-riscv64-gnu", - "@oxc-resolver/binding-linux-s390x-gnu", - "@oxc-resolver/binding-linux-x64-gnu", - "@oxc-resolver/binding-linux-x64-musl", - "@oxc-resolver/binding-wasm32-wasi", - "@oxc-resolver/binding-win32-arm64-msvc", - "@oxc-resolver/binding-win32-x64-msvc" - ] - }, - "oxc-transform@0.67.0": { - "integrity": "sha512-QXwmpLfNrXZoHgIjEtDEf6lhwmvHouNtstNgg/UveczVIjo8VSzd5h25Ea96PoX9KzReJUY/qYa4QSNkJpZGfA==", - "optionalDependencies": [ - "@oxc-transform/binding-darwin-arm64", - "@oxc-transform/binding-darwin-x64", - "@oxc-transform/binding-linux-arm-gnueabihf", - "@oxc-transform/binding-linux-arm64-gnu", - "@oxc-transform/binding-linux-arm64-musl", - "@oxc-transform/binding-linux-x64-gnu", - "@oxc-transform/binding-linux-x64-musl", - "@oxc-transform/binding-wasm32-wasi", - "@oxc-transform/binding-win32-arm64-msvc", - "@oxc-transform/binding-win32-x64-msvc" - ] + "obug@2.1.1": { + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==" }, "pathe@2.0.3": { "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==" }, - "picomatch@4.0.2": { - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==" - }, - "quansync@0.2.10": { - "integrity": "sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==" + "picomatch@4.0.3": { + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, - "readdirp@4.1.2": { - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==" + "quansync@1.0.0": { + "integrity": "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==" }, "resolve-pkg-maps@1.0.0": { "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==" }, - "rolldown-plugin-dts@0.9.11_rolldown@1.0.0-beta.8-commit.852c603__valibot@1.0.0": { - "integrity": "sha512-iCIRKmvPLwRV4UKSxhaBo+5wDkvc3+MFiqYYvu7sGLSohzxoDn9WEsjN3y7A6xg3aCuxHh6rlRp8xbX98r1rSg==", + "rolldown-plugin-dts@0.22.1_rolldown@1.0.0-rc.3": { + "integrity": "sha512-5E0AiM5RSQhU6cjtkDFWH6laW4IrMu0j1Mo8x04Xo1ALHmaRMs9/7zej7P3RrryVHW/DdZAp85MA7Be55p0iUw==", "dependencies": [ "@babel/generator", + "@babel/helper-validator-identifier", "@babel/parser", "@babel/types", "ast-kit", - "debug", + "birpc", "dts-resolver", "get-tsconfig", - "oxc-transform", + "obug", "rolldown" ] }, - "rolldown@1.0.0-beta.8-commit.852c603_valibot@1.0.0": { - "integrity": "sha512-5sq8IPiJ8q/IlL084zf8fPhflsdNrKE7gwXma7m820u8oQtkAEmhb8cmHw6jztlidgOe3hpUIm55HevPmVRelQ==", + "rolldown@1.0.0-rc.3": { + "integrity": "sha512-Po/YZECDOqVXjIXrtC5h++a5NLvKAQNrd9ggrIG3sbDfGO5BqTUsrI6l8zdniKRp3r5Tp/2JTrXqx4GIguFCMw==", "dependencies": [ "@oxc-project/types", - "@valibot/to-json-schema", - "ansis", - "valibot" + "@rolldown/pluginutils" ], "optionalDependencies": [ + "@rolldown/binding-android-arm64", "@rolldown/binding-darwin-arm64", "@rolldown/binding-darwin-x64", "@rolldown/binding-freebsd-x64", @@ -941,157 +548,99 @@ "@rolldown/binding-linux-arm64-musl", "@rolldown/binding-linux-x64-gnu", "@rolldown/binding-linux-x64-musl", + "@rolldown/binding-openharmony-arm64", "@rolldown/binding-wasm32-wasi", "@rolldown/binding-win32-arm64-msvc", - "@rolldown/binding-win32-ia32-msvc", "@rolldown/binding-win32-x64-msvc" ], "bin": true }, - "safe-buffer@5.2.1": { - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "sax@1.4.1": { - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" - }, "semver@6.3.1": { "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": true }, - "semver@7.7.2": { - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "semver@7.7.4": { + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "bin": true }, - "strnum@2.1.0": { - "integrity": "sha512-w0S//9BqZZGw0L0Y8uLSelFGnDJgTyyNQLmSlPnVz43zPAiqu3w4t8J8sDqqANOGeZIZ/9jWuPguYcEnsoHv4A==" + "strnum@2.1.2": { + "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==" }, - "tinyexec@1.0.1": { - "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==" + "tinyexec@1.0.2": { + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==" }, - "tinyglobby@0.2.13_picomatch@4.0.2": { - "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", + "tinyglobby@0.2.15_picomatch@4.0.3": { + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dependencies": [ "fdir", "picomatch" ] }, - "tr46@0.0.3": { - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "tree-kill@1.2.2": { + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "bin": true }, - "tsdown@0.10.1_rolldown@1.0.0-beta.8-commit.852c603__valibot@1.0.0": { - "integrity": "sha512-NT1XSUDweBpgpiZb3Upfy3DBwAbn8W0aXo3Ecp4kHozTLewWa0UkWUP6nRTvSj2c0NcD/BLLuf0HthqMpbEdkA==", + "tsdown@0.20.3_rolldown@1.0.0-rc.3": { + "integrity": "sha512-qWOUXSbe4jN8JZEgrkc/uhJpC8VN2QpNu3eZkBWwNuTEjc/Ik1kcc54ycfcQ5QPRHeu9OQXaLfCI3o7pEJgB2w==", "dependencies": [ "ansis", "cac", - "chokidar", - "consola", - "debug", - "diff", + "defu", "empathic", "hookable", - "lightningcss", + "import-without-cache", + "obug", + "picomatch", "rolldown", "rolldown-plugin-dts", + "semver@7.7.4", "tinyexec", "tinyglobby", - "unconfig", - "unplugin-lightningcss" + "tree-kill", + "unconfig-core", + "unrun" ], "bin": true }, - "tslib@1.14.1": { - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "tslib@2.8.1": { "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "tunnel@0.0.6": { "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, - "typescript@3.9.10": { - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "bin": true - }, - "unconfig@7.3.2": { - "integrity": "sha512-nqG5NNL2wFVGZ0NA/aCFw0oJ2pxSf1lwg4Z5ill8wd7K4KX/rQbHlwbh+bjctXL5Ly1xtzHenHGOK0b+lG6JVg==", + "unconfig-core@7.5.0": { + "integrity": "sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==", "dependencies": [ "@quansync/fs", - "defu", - "jiti", "quansync" ] }, - "undici-types@6.19.8": { - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" - }, - "undici@5.29.0": { - "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", - "dependencies": [ - "@fastify/busboy" - ] - }, - "undici@7.9.0": { - "integrity": "sha512-e696y354tf5cFZPXsF26Yg+5M63+5H3oE6Vtkh2oqbvsE2Oe7s2nIbcQh5lmG7Lp/eS29vJtTpw9+p6PX0qNSg==" + "undici-types@6.21.0": { + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" }, - "unplugin-lightningcss@0.3.3": { - "integrity": "sha512-mMNRCNIcxc/3410w7sJdXcPxn0IGZdEpq42OBDyckdGkhOeWYZCG9RkHs72TFyBsS82a4agFDOFU8VrFKF2ZvA==", - "dependencies": [ - "lightningcss", - "magic-string", - "unplugin" - ] + "undici@6.23.0": { + "integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==" }, - "unplugin@2.3.4": { - "integrity": "sha512-m4PjxTurwpWfpMomp8AptjD5yj8qEZN5uQjjGM3TAs9MWWD2tXSSNNj6jGR2FoVGod4293ytyV6SwBbertfyJg==", + "unrun@0.2.27": { + "integrity": "sha512-Mmur1UJpIbfxasLOhPRvox/QS4xBiDii71hMP7smfRthGcwFL2OAmYRgduLANOAU4LUkvVamuP+02U+c90jlrw==", "dependencies": [ - "acorn", - "picomatch", - "webpack-virtual-modules" - ] - }, - "uuid@8.3.2": { - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "rolldown" + ], "bin": true - }, - "valibot@1.0.0": { - "integrity": "sha512-1Hc0ihzWxBar6NGeZv7fPLY0QuxFMyxwYR2sF1Blu7Wq7EnremwY2W02tit2ij2VJT8HcSkHAQqmFfl77f73Yw==" - }, - "webidl-conversions@3.0.1": { - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "webpack-virtual-modules@0.6.2": { - "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==" - }, - "whatwg-url@5.0.0": { - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": [ - "tr46", - "webidl-conversions" - ] - }, - "xml2js@0.5.0": { - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dependencies": [ - "sax", - "xmlbuilder" - ] - }, - "xmlbuilder@11.0.1": { - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" } }, "workspace": { "packageJson": { "dependencies": [ - "npm:@actions/cache@4.0.3", - "npm:@actions/core@^1.11.1", + "npm:@actions/cache@5", + "npm:@actions/core@2", "npm:@actions/glob@0.5", - "npm:@actions/tool-cache@^2.0.2", - "npm:@types/node@^20.16.5", - "npm:@types/semver@^7.7.0", - "npm:semver@^7.7.1", - "npm:tsdown@0.10.1", - "npm:undici@^7.8.0" + "npm:@actions/http-client@3", + "npm:@actions/tool-cache@3", + "npm:@types/node@20", + "npm:@types/semver@7", + "npm:semver@7", + "npm:tsdown@0.20" ] } } diff --git a/dist/cache-CSb2jW5L.mjs b/dist/cache-CSb2jW5L.mjs deleted file mode 100644 index a487599..0000000 --- a/dist/cache-CSb2jW5L.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import "./semver-C43QPvfi.mjs"; -import { restoreCache, saveCache } from "./cache-BG71A93Z.mjs"; - -export { restoreCache }; \ No newline at end of file diff --git a/dist/cache-BG71A93Z.mjs b/dist/cache-DpsdXZtI.mjs similarity index 64% rename from dist/cache-BG71A93Z.mjs rename to dist/cache-DpsdXZtI.mjs index d15f8ef..4904e61 100644 --- a/dist/cache-BG71A93Z.mjs +++ b/dist/cache-DpsdXZtI.mjs @@ -1,108 +1,146 @@ -import { __commonJS, __require, __toESM, import_core, require_auth, require_core, require_exec, require_io, require_lib, require_semver } from "./semver-C43QPvfi.mjs"; +import { a as require_auth, c as __esmMin, d as __toCommonJS, f as __toESM, i as require_io, l as __exportAll, n as require_core, o as require_lib, r as require_exec, s as __commonJSMin, t as require_semver, u as __require } from "./semver-O4tt7wRT.mjs"; import process$1 from "node:process"; -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports) { - var __createBinding$25 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } - }); - } : function(o, m$1, k, k2) { + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$24 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$25 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$25(result, mod, k); - } - __setModuleDefault$24(result, mod); - return result; - }; + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); Object.defineProperty(exports, "__esModule", { value: true }); - exports.getOptions = void 0; - const core$11 = __importStar$25(require_core()); + exports.getOptions = getOptions; + const core = __importStar(require_core()); /** * Returns a copy with defaults filled in. */ - function getOptions$1(copy$1) { + function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; - if (copy$1) { - if (typeof copy$1.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy$1.followSymbolicLinks; - core$11.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + if (copy) { + if (typeof copy.followSymbolicLinks === "boolean") { + result.followSymbolicLinks = copy.followSymbolicLinks; + core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + } + if (typeof copy.implicitDescendants === "boolean") { + result.implicitDescendants = copy.implicitDescendants; + core.debug(`implicitDescendants '${result.implicitDescendants}'`); } - if (typeof copy$1.implicitDescendants === "boolean") { - result.implicitDescendants = copy$1.implicitDescendants; - core$11.debug(`implicitDescendants '${result.implicitDescendants}'`); + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core.debug(`matchDirectories '${result.matchDirectories}'`); } - if (typeof copy$1.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy$1.omitBrokenSymbolicLinks; - core$11.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + if (typeof copy.omitBrokenSymbolicLinks === "boolean") { + result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; + core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); } } return result; } - exports.getOptions = getOptions$1; -} }); +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path-helper.js"(exports) { - var __createBinding$24 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-path-helper.js +var require_internal_path_helper = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } - }); - } : function(o, m$1, k, k2) { + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$23 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$24 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$24(result, mod, k); - } - __setModuleDefault$23(result, mod); - return result; - }; - var __importDefault$9 = exports && exports.__importDefault || function(mod) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; - const path$12 = __importStar$24(__require("path")); - const assert_1$11 = __importDefault$9(__require("assert")); - const IS_WINDOWS$10 = process.platform === "win32"; + exports.dirname = dirname; + exports.ensureAbsoluteRoot = ensureAbsoluteRoot; + exports.hasAbsoluteRoot = hasAbsoluteRoot; + exports.hasRoot = hasRoot; + exports.normalizeSeparators = normalizeSeparators; + exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; + const path$8 = __importStar(__require("path")); + const assert_1$3 = __importDefault(__require("assert")); + const IS_WINDOWS = process.platform === "win32"; /** * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. * @@ -120,176 +158,183 @@ var require_internal_path_helper$1 = __commonJS({ "node_modules/.deno/@actions+g * - `\\hello => \\hello` * - `\\hello\world => \\hello\world` */ - function dirname$1(p) { - p = safeTrimTrailingSeparator$1(p); - if (IS_WINDOWS$10 && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) return p; - let result = path$12.dirname(p); - if (IS_WINDOWS$10 && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) result = safeTrimTrailingSeparator$1(result); + function dirname(p) { + p = safeTrimTrailingSeparator(p); + if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) return p; + let result = path$8.dirname(p); + if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) result = safeTrimTrailingSeparator(result); return result; } - exports.dirname = dirname$1; /** * Roots the path if not already rooted. On Windows, relative roots like `\` * or `C:` are expanded based on the current working directory. */ - function ensureAbsoluteRoot$1(root, itemPath) { - assert_1$11.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1$11.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot$1(itemPath)) return itemPath; - if (IS_WINDOWS$10) { + function ensureAbsoluteRoot(root, itemPath) { + (0, assert_1$3.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1$3.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + if (hasAbsoluteRoot(itemPath)) return itemPath; + if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1$11.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1$3.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) if (itemPath.length === 2) return `${itemPath[0]}:\\${cwd.substr(3)}`; else { if (!cwd.endsWith("\\")) cwd += "\\"; return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; } else return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } else if (normalizeSeparators$1(itemPath).match(/^\\$|^\\[^\\]/)) { + } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1$11.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1$3.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1$11.default(hasAbsoluteRoot$1(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS$10 && root.endsWith("\\")) {} else root += path$12.sep; + (0, assert_1$3.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) {} else root += path$8.sep; return root + itemPath; } - exports.ensureAbsoluteRoot = ensureAbsoluteRoot$1; /** * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: * `\\hello\share` and `C:\hello` (and using alternate separator). */ - function hasAbsoluteRoot$1(itemPath) { - assert_1$11.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators$1(itemPath); - if (IS_WINDOWS$10) return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); + function hasAbsoluteRoot(itemPath) { + (0, assert_1$3.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators(itemPath); + if (IS_WINDOWS) return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); return itemPath.startsWith("/"); } - exports.hasAbsoluteRoot = hasAbsoluteRoot$1; /** * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). */ - function hasRoot$1(itemPath) { - assert_1$11.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators$1(itemPath); - if (IS_WINDOWS$10) return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); + function hasRoot(itemPath) { + (0, assert_1$3.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators(itemPath); + if (IS_WINDOWS) return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); return itemPath.startsWith("/"); } - exports.hasRoot = hasRoot$1; /** * Removes redundant slashes and converts `/` to `\` on Windows */ - function normalizeSeparators$1(p) { + function normalizeSeparators(p) { p = p || ""; - if (IS_WINDOWS$10) { + if (IS_WINDOWS) { p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); + return (/^\\\\+[^\\]/.test(p) ? "\\" : "") + p.replace(/\\\\+/g, "\\"); } return p.replace(/\/\/+/g, "/"); } - exports.normalizeSeparators = normalizeSeparators$1; /** * Normalizes the path separators and trims the trailing separator (when safe). * For example, `/foo/ => /foo` but `/ => /` */ - function safeTrimTrailingSeparator$1(p) { + function safeTrimTrailingSeparator(p) { if (!p) return ""; - p = normalizeSeparators$1(p); - if (!p.endsWith(path$12.sep)) return p; - if (p === path$12.sep) return p; - if (IS_WINDOWS$10 && /^[A-Z]:\\$/i.test(p)) return p; + p = normalizeSeparators(p); + if (!p.endsWith(path$8.sep)) return p; + if (p === path$8.sep) return p; + if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) return p; return p.substr(0, p.length - 1); } - exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator$1; -} }); +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-match-kind.js"(exports) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-match-kind.js +var require_internal_match_kind = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.MatchKind = void 0; /** * Indicates whether a pattern matches a path */ - var MatchKind$1; - (function(MatchKind$2) { + var MatchKind; + (function(MatchKind) { /** Not matched */ - MatchKind$2[MatchKind$2["None"] = 0] = "None"; + MatchKind[MatchKind["None"] = 0] = "None"; /** Matched if the path is a directory */ - MatchKind$2[MatchKind$2["Directory"] = 1] = "Directory"; + MatchKind[MatchKind["Directory"] = 1] = "Directory"; /** Matched if the path is a regular file */ - MatchKind$2[MatchKind$2["File"] = 2] = "File"; + MatchKind[MatchKind["File"] = 2] = "File"; /** Matched */ - MatchKind$2[MatchKind$2["All"] = 3] = "All"; - })(MatchKind$1 = exports.MatchKind || (exports.MatchKind = {})); -} }); + MatchKind[MatchKind["All"] = 3] = "All"; + })(MatchKind || (exports.MatchKind = MatchKind = {})); +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports) { - var __createBinding$23 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-pattern-helper.js +var require_internal_pattern_helper = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } - }); - } : function(o, m$1, k, k2) { + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$22 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$23 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$23(result, mod, k); - } - __setModuleDefault$22(result, mod); - return result; - }; + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); Object.defineProperty(exports, "__esModule", { value: true }); - exports.partialMatch = exports.match = exports.getSearchPaths = void 0; - const pathHelper$5 = __importStar$23(require_internal_path_helper$1()); - const internal_match_kind_1$5 = require_internal_match_kind$1(); - const IS_WINDOWS$9 = process.platform === "win32"; + exports.getSearchPaths = getSearchPaths; + exports.match = match; + exports.partialMatch = partialMatch; + const pathHelper = __importStar(require_internal_path_helper()); + const internal_match_kind_1 = require_internal_match_kind(); + const IS_WINDOWS = process.platform === "win32"; /** * Given an array of patterns, returns an array of paths to search. * Duplicates and paths under other included paths are filtered out. */ - function getSearchPaths$1(patterns) { + function getSearchPaths(patterns) { patterns = patterns.filter((x) => !x.negate); const searchPathMap = {}; for (const pattern of patterns) { - const key = IS_WINDOWS$9 ? pattern.searchPath.toUpperCase() : pattern.searchPath; + const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; searchPathMap[key] = "candidate"; } const result = []; for (const pattern of patterns) { - const key = IS_WINDOWS$9 ? pattern.searchPath.toUpperCase() : pattern.searchPath; + const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; if (searchPathMap[key] === "included") continue; let foundAncestor = false; let tempKey = key; - let parent = pathHelper$5.dirname(tempKey); + let parent = pathHelper.dirname(tempKey); while (parent !== tempKey) { if (searchPathMap[parent]) { foundAncestor = true; break; } tempKey = parent; - parent = pathHelper$5.dirname(tempKey); + parent = pathHelper.dirname(tempKey); } if (!foundAncestor) { result.push(pattern.searchPath); @@ -298,29 +343,26 @@ var require_internal_pattern_helper$1 = __commonJS({ "node_modules/.deno/@action } return result; } - exports.getSearchPaths = getSearchPaths$1; /** * Matches the patterns against the path */ - function match$1(patterns, itemPath) { - let result = internal_match_kind_1$5.MatchKind.None; + function match(patterns, itemPath) { + let result = internal_match_kind_1.MatchKind.None; for (const pattern of patterns) if (pattern.negate) result &= ~pattern.match(itemPath); else result |= pattern.match(itemPath); return result; } - exports.match = match$1; /** * Checks whether to descend further into the directory */ - function partialMatch$1(patterns, itemPath) { + function partialMatch(patterns, itemPath) { return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); } - exports.partialMatch = partialMatch$1; -} }); +})); //#endregion //#region node_modules/.deno/concat-map@0.0.1/node_modules/concat-map/index.js -var require_concat_map = __commonJS({ "node_modules/.deno/concat-map@0.0.1/node_modules/concat-map/index.js"(exports, module) { +var require_concat_map = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = function(xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { @@ -333,16 +375,16 @@ var require_concat_map = __commonJS({ "node_modules/.deno/concat-map@0.0.1/node_ var isArray = Array.isArray || function(xs) { return Object.prototype.toString.call(xs) === "[object Array]"; }; -} }); +})); //#endregion //#region node_modules/.deno/balanced-match@1.0.2/node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ "node_modules/.deno/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module) { - module.exports = balanced$1; - function balanced$1(a, b, str) { +var require_balanced_match = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = balanced; + function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); - var r = range$1(a, b, str); + var r = range(a, b, str); return r && { start: r[0], end: r[1], @@ -352,11 +394,11 @@ var require_balanced_match = __commonJS({ "node_modules/.deno/balanced-match@1.0 }; } function maybeMatch(reg, str) { - var m$1 = str.match(reg); - return m$1 ? m$1[0] : null; + var m = str.match(reg); + return m ? m[0] : null; } - balanced$1.range = range$1; - function range$1(a, b, str) { + balanced.range = range; + function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); @@ -384,11 +426,11 @@ var require_balanced_match = __commonJS({ "node_modules/.deno/balanced-match@1.0 } return result; } -} }); +})); //#endregion -//#region node_modules/.deno/brace-expansion@1.1.11/node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ "node_modules/.deno/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports, module) { +//#region node_modules/.deno/brace-expansion@1.1.12/node_modules/brace-expansion/index.js +var require_brace_expansion = /* @__PURE__ */ __commonJSMin(((exports, module) => { var concatMap = require_concat_map(); var balanced = require_balanced_match(); module.exports = expandTop; @@ -409,13 +451,13 @@ var require_brace_expansion = __commonJS({ "node_modules/.deno/brace-expansion@1 function parseCommaParts(str) { if (!str) return [""]; var parts = []; - var m$1 = balanced("{", "}", str); - if (!m$1) return str.split(","); - var pre = m$1.pre; - var body$1 = m$1.body; - var post = m$1.post; + var m = balanced("{", "}", str); + if (!m) return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; var p = pre.split(","); - p[p.length - 1] += "{" + body$1 + "}"; + p[p.length - 1] += "{" + body + "}"; var postParts = parseCommaParts(post); if (post.length) { p[p.length - 1] += postParts.shift(); @@ -427,7 +469,7 @@ var require_brace_expansion = __commonJS({ "node_modules/.deno/brace-expansion@1 function expandTop(str) { if (!str) return []; if (str.substr(0, 2) === "{}") str = "\\{\\}" + str.substr(2); - return expand$1(escapeBraces(str), true).map(unescapeBraces); + return expand(escapeBraces(str), true).map(unescapeBraces); } function embrace(str) { return "{" + str + "}"; @@ -435,58 +477,57 @@ var require_brace_expansion = __commonJS({ "node_modules/.deno/brace-expansion@1 function isPadded(el) { return /^-?0\d/.test(el); } - function lte(i, y$1) { - return i <= y$1; + function lte(i, y) { + return i <= y; } - function gte(i, y$1) { - return i >= y$1; + function gte(i, y) { + return i >= y; } - function expand$1(str, isTop) { + function expand(str, isTop) { var expansions = []; - var m$1 = balanced("{", "}", str); - if (!m$1 || /\$$/.test(m$1.pre)) return [str]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m$1.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m$1.body); + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m$1.body.indexOf(",") >= 0; + var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m$1.post.match(/,.*\}/)) { - str = m$1.pre + "{" + m$1.body + escClose + m$1.post; - return expand$1(str); + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str); } return [str]; } var n; - if (isSequence) n = m$1.body.split(/\.\./); + if (isSequence) n = m.body.split(/\.\./); else { - n = parseCommaParts(m$1.body); + n = parseCommaParts(m.body); if (n.length === 1) { - n = expand$1(n[0], false).map(embrace); + n = expand(n[0], false).map(embrace); if (n.length === 1) { - var post = m$1.post.length ? expand$1(m$1.post, false) : [""]; + var post = m.post.length ? expand(m.post, false) : [""]; return post.map(function(p) { - return m$1.pre + n[0] + p; + return m.pre + n[0] + p; }); } } } - var pre = m$1.pre; - var post = m$1.post.length ? expand$1(m$1.post, false) : [""]; + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; var N; if (isSequence) { var x = numeric(n[0]); - var y$1 = numeric(n[1]); + var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length); var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; - var reverse = y$1 < x; - if (reverse) { + if (y < x) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; - for (var i = x; test(i, y$1); i += incr) { + for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); @@ -505,7 +546,7 @@ var require_brace_expansion = __commonJS({ "node_modules/.deno/brace-expansion@1 N.push(c); } } else N = concatMap(n, function(el) { - return expand$1(el, false); + return expand(el, false); }); for (var j = 0; j < N.length; j++) for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; @@ -513,19 +554,19 @@ var require_brace_expansion = __commonJS({ "node_modules/.deno/brace-expansion@1 } return expansions; } -} }); +})); //#endregion //#region node_modules/.deno/minimatch@3.1.2/node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_modules/minimatch/minimatch.js"(exports, module) { +var require_minimatch = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = minimatch; minimatch.Minimatch = Minimatch; - var path$11 = function() { + var path$7 = function() { try { return __require("path"); } catch (e) {} }() || { sep: "/" }; - minimatch.sep = path$11.sep; + minimatch.sep = path$7.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -555,8 +596,8 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s$1) { - return s$1.split("").reduce(function(set, c) { + function charSet(s) { + return s.split("").reduce(function(set, c) { set[c] = true; return set; }, {}); @@ -583,31 +624,31 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo minimatch.defaults = function(def) { if (!def || typeof def !== "object" || !Object.keys(def).length) return minimatch; var orig = minimatch; - var m$1 = function minimatch$1(p, pattern, options) { + var m = function minimatch(p, pattern, options) { return orig(p, pattern, ext(def, options)); }; - m$1.Minimatch = function Minimatch$1(pattern, options) { + m.Minimatch = function Minimatch(pattern, options) { return new orig.Minimatch(pattern, ext(def, options)); }; - m$1.Minimatch.defaults = function defaults(options) { + m.Minimatch.defaults = function defaults(options) { return orig.defaults(ext(def, options)).Minimatch; }; - m$1.filter = function filter$1(pattern, options) { + m.filter = function filter(pattern, options) { return orig.filter(pattern, ext(def, options)); }; - m$1.defaults = function defaults(options) { + m.defaults = function defaults(options) { return orig.defaults(ext(def, options)); }; - m$1.makeRe = function makeRe$1(pattern, options) { + m.makeRe = function makeRe(pattern, options) { return orig.makeRe(pattern, ext(def, options)); }; - m$1.braceExpand = function braceExpand$1(pattern, options) { + m.braceExpand = function braceExpand(pattern, options) { return orig.braceExpand(pattern, ext(def, options)); }; - m$1.match = function(list, pattern, options) { + m.match = function(list, pattern, options) { return orig.match(list, pattern, ext(def, options)); }; - return m$1; + return m; }; Minimatch.defaults = function(def) { return minimatch.defaults(def).Minimatch; @@ -623,7 +664,7 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path$11.sep !== "/") pattern = pattern.split(path$11.sep).join("/"); + if (!options.allowWindowsEscape && path$7.sep !== "/") pattern = pattern.split(path$7.sep).join("/"); this.options = options; this.set = []; this.pattern = pattern; @@ -649,20 +690,20 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo } this.parseNegate(); var set = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug$3() { + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments); }; this.debug(this.pattern, set); - set = this.globParts = set.map(function(s$1) { - return s$1.split(slashSplit); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); }); this.debug(this.pattern, set); - set = set.map(function(s$1, si, set$1) { - return s$1.map(this.parse, this); + set = set.map(function(s, si, set) { + return s.map(this.parse, this); }, this); this.debug(this.pattern, set); - set = set.filter(function(s$1) { - return s$1.indexOf(false) === -1; + set = set.filter(function(s) { + return s.indexOf(false) === -1; }); this.debug(this.pattern, set); this.set = set; @@ -698,9 +739,9 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo if (typeof pattern !== "string") throw new TypeError("invalid pattern"); if (pattern.length > MAX_PATTERN_LENGTH) throw new TypeError("pattern is too long"); }; - Minimatch.prototype.parse = parse$2; + Minimatch.prototype.parse = parse; var SUBPARSE = {}; - function parse$2(pattern, isSub) { + function parse(pattern, isSub) { assertValidPattern(pattern); var options = this.options; if (pattern === "**") if (!options.noglobstar) return GLOBSTAR; @@ -716,7 +757,7 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo var reClassStart = -1; var classStart = -1; var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self$1 = this; + var self = this; function clearStateChar() { if (stateChar) { switch (stateChar) { @@ -732,7 +773,7 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo re += "\\" + stateChar; break; } - self$1.debug("clearStateChar %j %j", stateChar, re); + self.debug("clearStateChar %j %j", stateChar, re); stateChar = false; } } @@ -761,7 +802,7 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo re += c; continue; } - self$1.debug("call clearStateChar %j", stateChar); + self.debug("call clearStateChar %j", stateChar); clearStateChar(); stateChar = c; if (options.noext) clearStateChar(); @@ -884,8 +925,7 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo nlAfter = cleanAfter; var dollar = ""; if (nlAfter === "" && isSub !== SUBPARSE) dollar = "$"; - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; } if (re !== "" && hasMagic) re = "(?=.)" + re; if (addPatternStart) re = patternStart + re; @@ -894,8 +934,8 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo var flags = options.nocase ? "i" : ""; try { var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); + } catch (er) /* istanbul ignore next - should be impossible */ { + return /* @__PURE__ */ new RegExp("$."); } regExp._glob = pattern; regExp._src = re; @@ -924,7 +964,7 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo if (this.negate) re = "^(?!" + re + ").*$"; try { this.regexp = new RegExp(re, flags); - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false; } return this.regexp; @@ -938,14 +978,14 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo if (mm.options.nonull && !list.length) list.push(pattern); return list; }; - Minimatch.prototype.match = function match$2(f, partial) { + Minimatch.prototype.match = function match(f, partial) { if (typeof partial === "undefined") partial = this.partial; this.debug("match", f, this.pattern); if (this.comment) return false; if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path$11.sep !== "/") f = f.split(path$11.sep).join("/"); + if (path$7.sep !== "/") f = f.split(path$7.sep).join("/"); f = f.split(slashSplit); this.debug(this.pattern, "split", f); var set = this.set; @@ -960,8 +1000,7 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo var pattern = set[i]; var file = f; if (options.matchBase && pattern.length === 1) file = [filename]; - var hit = this.matchOne(file, pattern, partial); - if (hit) { + if (this.matchOne(file, pattern, partial)) { if (options.flipNegate) return true; return !this.negate; } @@ -1035,59 +1074,71 @@ var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_mo /* istanbul ignore next */ throw new Error("wtf?"); }; - function globUnescape(s$1) { - return s$1.replace(/\\(.)/g, "$1"); + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); } - function regExpEscape(s$1) { - return s$1.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } -} }); +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path.js -var require_internal_path$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path.js"(exports) { - var __createBinding$22 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-path.js +var require_internal_path = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } - }); - } : function(o, m$1, k, k2) { + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$21 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$22 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$22(result, mod, k); - } - __setModuleDefault$21(result, mod); - return result; - }; - var __importDefault$8 = exports && exports.__importDefault || function(mod) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Path = void 0; - const path$10 = __importStar$22(__require("path")); - const pathHelper$4 = __importStar$22(require_internal_path_helper$1()); - const assert_1$10 = __importDefault$8(__require("assert")); - const IS_WINDOWS$8 = process.platform === "win32"; + const path$6 = __importStar(__require("path")); + const pathHelper = __importStar(require_internal_path_helper()); + const assert_1$2 = __importDefault(__require("assert")); + const IS_WINDOWS = process.platform === "win32"; /** * Helper class for parsing paths into segments */ - var Path$1 = class { + var Path = class { /** * Constructs a Path * @param itemPath Path or array of segments @@ -1095,32 +1146,32 @@ var require_internal_path$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1 constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1$10.default(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper$4.safeTrimTrailingSeparator(itemPath); - if (!pathHelper$4.hasRoot(itemPath)) this.segments = itemPath.split(path$10.sep); + (0, assert_1$2.default)(itemPath, `Parameter 'itemPath' must not be empty`); + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + if (!pathHelper.hasRoot(itemPath)) this.segments = itemPath.split(path$6.sep); else { let remaining = itemPath; - let dir = pathHelper$4.dirname(remaining); + let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path$10.basename(remaining); + const basename = path$6.basename(remaining); this.segments.unshift(basename); remaining = dir; - dir = pathHelper$4.dirname(remaining); + dir = pathHelper.dirname(remaining); } this.segments.unshift(remaining); } } else { - assert_1$10.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1$2.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1$10.default(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper$4.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper$4.hasRoot(segment)) { - segment = pathHelper$4.safeTrimTrailingSeparator(segment); - assert_1$10.default(segment === pathHelper$4.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1$2.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); + segment = pathHelper.normalizeSeparators(itemPath[i]); + if (i === 0 && pathHelper.hasRoot(segment)) { + segment = pathHelper.safeTrimTrailingSeparator(segment); + (0, assert_1$2.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1$10.default(!segment.includes(path$10.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1$2.default)(!segment.includes(path$6.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -1131,64 +1182,76 @@ var require_internal_path$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1 */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path$10.sep) || IS_WINDOWS$8 && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path$6.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) skipSlash = false; - else result += path$10.sep; + else result += path$6.sep; result += this.segments[i]; } return result; } }; - exports.Path = Path$1; -} }); + exports.Path = Path; +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern.js"(exports) { - var __createBinding$21 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-pattern.js +var require_internal_pattern = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } - }); - } : function(o, m$1, k, k2) { + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$20 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$21 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$21(result, mod, k); - } - __setModuleDefault$20(result, mod); - return result; - }; - var __importDefault$7 = exports && exports.__importDefault || function(mod) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Pattern = void 0; - const os$3 = __importStar$21(__require("os")); - const path$9 = __importStar$21(__require("path")); - const pathHelper$3 = __importStar$21(require_internal_path_helper$1()); - const assert_1$9 = __importDefault$7(__require("assert")); - const minimatch_1$1 = require_minimatch(); - const internal_match_kind_1$4 = require_internal_match_kind$1(); - const internal_path_1$1 = require_internal_path$1(); - const IS_WINDOWS$7 = process.platform === "win32"; - var Pattern$1 = class Pattern$1 { + const os = __importStar(__require("os")); + const path$5 = __importStar(__require("path")); + const pathHelper = __importStar(require_internal_path_helper()); + const assert_1$1 = __importDefault(__require("assert")); + const minimatch_1 = require_minimatch(); + const internal_match_kind_1 = require_internal_match_kind(); + const internal_path_1 = require_internal_path(); + const IS_WINDOWS = process.platform === "win32"; + var Pattern = class Pattern { constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { /** * Indicates whether matches should be excluded from the result set @@ -1198,86 +1261,86 @@ var require_internal_pattern$1 = __commonJS({ "node_modules/.deno/@actions+glob@ if (typeof patternOrNegate === "string") pattern = patternOrNegate.trim(); else { segments = segments || []; - assert_1$9.default(segments.length, `Parameter 'segments' must not empty`); - const root = Pattern$1.getLiteral(segments[0]); - assert_1$9.default(root && pathHelper$3.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1$1.Path(segments).toString().trim(); + (0, assert_1$1.default)(segments.length, `Parameter 'segments' must not empty`); + const root = Pattern.getLiteral(segments[0]); + (0, assert_1$1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) pattern = `!${pattern}`; } while (pattern.startsWith("!")) { this.negate = !this.negate; pattern = pattern.substr(1).trim(); } - pattern = Pattern$1.fixupPattern(pattern, homedir); - this.segments = new internal_path_1$1.Path(pattern).segments; - this.trailingSeparator = pathHelper$3.normalizeSeparators(pattern).endsWith(path$9.sep); - pattern = pathHelper$3.safeTrimTrailingSeparator(pattern); + pattern = Pattern.fixupPattern(pattern, homedir); + this.segments = new internal_path_1.Path(pattern).segments; + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path$5.sep); + pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; - const searchSegments = this.segments.map((x) => Pattern$1.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1$1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(Pattern$1.regExpEscape(searchSegments[0]), IS_WINDOWS$7 ? "i" : ""); + const searchSegments = this.segments.map((x) => Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); + this.searchPath = new internal_path_1.Path(searchSegments).toString(); + this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); this.isImplicitPattern = isImplicitPattern; const minimatchOptions = { dot: true, nobrace: true, - nocase: IS_WINDOWS$7, + nocase: IS_WINDOWS, nocomment: true, noext: true, nonegate: true }; - pattern = IS_WINDOWS$7 ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1$1.Minimatch(pattern, minimatchOptions); + pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; + this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); } /** * Matches the pattern against the specified path */ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper$3.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path$9.sep) && this.isImplicitPattern === false) itemPath = `${itemPath}${path$9.sep}`; - } else itemPath = pathHelper$3.safeTrimTrailingSeparator(itemPath); - if (this.minimatch.match(itemPath)) return this.trailingSeparator ? internal_match_kind_1$4.MatchKind.Directory : internal_match_kind_1$4.MatchKind.All; - return internal_match_kind_1$4.MatchKind.None; + itemPath = pathHelper.normalizeSeparators(itemPath); + if (!itemPath.endsWith(path$5.sep) && this.isImplicitPattern === false) itemPath = `${itemPath}${path$5.sep}`; + } else itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + if (this.minimatch.match(itemPath)) return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; + return internal_match_kind_1.MatchKind.None; } /** * Indicates whether the pattern may match descendants of the specified path */ partialMatch(itemPath) { - itemPath = pathHelper$3.safeTrimTrailingSeparator(itemPath); - if (pathHelper$3.dirname(itemPath) === itemPath) return this.rootRegExp.test(itemPath); - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS$7 ? /\\+/ : /\/+/), this.minimatch.set[0], true); + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + if (pathHelper.dirname(itemPath) === itemPath) return this.rootRegExp.test(itemPath); + return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); } /** * Escapes glob patterns within a path */ - static globEscape(s$1) { - return (IS_WINDOWS$7 ? s$1 : s$1.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); + static globEscape(s) { + return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); } /** * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1$9.default(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1$1.Path(pattern).segments.map((x) => Pattern$1.getLiteral(x)); - assert_1$9.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1$9.default(!pathHelper$3.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper$3.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path$9.sep}`)) pattern = Pattern$1.globEscape(process.cwd()) + pattern.substr(1); - else if (pattern === "~" || pattern.startsWith(`~${path$9.sep}`)) { - homedir = homedir || os$3.homedir(); - assert_1$9.default(homedir, "Unable to determine HOME directory"); - assert_1$9.default(pathHelper$3.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); - pattern = Pattern$1.globEscape(homedir) + pattern.substr(1); - } else if (IS_WINDOWS$7 && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper$3.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); + (0, assert_1$1.default)(pattern, "pattern cannot be empty"); + const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => Pattern.getLiteral(x)); + (0, assert_1$1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1$1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + pattern = pathHelper.normalizeSeparators(pattern); + if (pattern === "." || pattern.startsWith(`.${path$5.sep}`)) pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1); + else if (pattern === "~" || pattern.startsWith(`~${path$5.sep}`)) { + homedir = homedir || os.homedir(); + (0, assert_1$1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1$1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + pattern = Pattern.globEscape(homedir) + pattern.substr(1); + } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { + let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); if (pattern.length > 2 && !root.endsWith("\\")) root += "\\"; - pattern = Pattern$1.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS$7 && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper$3.ensureAbsoluteRoot("C:\\dummy-root", "\\"); + pattern = Pattern.globEscape(root) + pattern.substr(2); + } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { + let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); if (!root.endsWith("\\")) root += "\\"; - pattern = Pattern$1.globEscape(root) + pattern.substr(1); - } else pattern = pathHelper$3.ensureAbsoluteRoot(Pattern$1.globEscape(process.cwd()), pattern); - return pathHelper$3.normalizeSeparators(pattern); + pattern = Pattern.globEscape(root) + pattern.substr(1); + } else pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern); + return pathHelper.normalizeSeparators(pattern); } /** * Attempts to unescape a pattern segment to create a literal path segment. @@ -1287,7 +1350,7 @@ var require_internal_pattern$1 = __commonJS({ "node_modules/.deno/@actions+glob@ let literal = ""; for (let i = 0; i < segment.length; i++) { const c = segment[i]; - if (c === "\\" && !IS_WINDOWS$7 && i + 1 < segment.length) { + if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { literal += segment[++i]; continue; } else if (c === "*" || c === "?") return ""; @@ -1296,7 +1359,7 @@ var require_internal_pattern$1 = __commonJS({ "node_modules/.deno/@actions+glob@ let closed = -1; for (let i2 = i + 1; i2 < segment.length; i2++) { const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS$7 && i2 + 1 < segment.length) { + if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { set += segment[++i2]; continue; } else if (c2 === "]") { @@ -1321,60 +1384,72 @@ var require_internal_pattern$1 = __commonJS({ "node_modules/.deno/@actions+glob@ * Escapes regexp special characters * https://javascript.info/regexp-escaping */ - static regExpEscape(s$1) { - return s$1.replace(/[[\\^$.|?*+()]/g, "\\$&"); + static regExpEscape(s) { + return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); } }; - exports.Pattern = Pattern$1; -} }); + exports.Pattern = Pattern; +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-search-state.js"(exports) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-search-state.js +var require_internal_search_state = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.SearchState = void 0; - var SearchState$1 = class { - constructor(path$13, level) { - this.path = path$13; + var SearchState = class { + constructor(path, level) { + this.path = path; this.level = level; } }; - exports.SearchState = SearchState$1; -} }); + exports.SearchState = SearchState; +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-globber.js"(exports) { - var __createBinding$20 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-globber.js +var require_internal_globber = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } - }); - } : function(o, m$1, k, k2) { + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$19 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$20 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$20(result, mod, k); - } - __setModuleDefault$19(result, mod); - return result; - }; - var __awaiter$18 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -1401,10 +1476,10 @@ var require_internal_globber$1 = __commonJS({ "node_modules/.deno/@actions+glob@ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues$4 = exports && exports.__asyncValues || function(o) { + var __asyncValues = exports && exports.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m$1 = o[Symbol.asyncIterator], i; - return m$1 ? m$1.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { @@ -1414,37 +1489,45 @@ var require_internal_globber$1 = __commonJS({ "node_modules/.deno/@actions+glob@ }); }; } - function settle(resolve, reject, d$1, v) { - Promise.resolve(v).then(function(v$1) { + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v) { resolve({ - value: v$1, - done: d$1 + value: v, + done: d }); }, reject); } }; - var __await$2 = exports && exports.__await || function(v) { - return this instanceof __await$2 ? (this.v = v, this) : new __await$2(v); + var __await = exports && exports.__await || function(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); }; - var __asyncGenerator$2 = exports && exports.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator = exports && exports.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { return this; }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([ - n, - v, - a, - b - ]) > 1 || resume$1(n, v); - }); + function awaitReturn(f) { + return function(v) { + return Promise.resolve(v).then(f, reject); }; } - function resume$1(n, v) { + function verb(n, f) { + if (g[n]) { + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([ + n, + v, + a, + b + ]) > 1 || resume(n, v); + }); + }; + if (f) i[n] = f(i[n]); + } + } + function resume(n, v) { try { step(g[n](v)); } catch (e) { @@ -1452,52 +1535,54 @@ var require_internal_globber$1 = __commonJS({ "node_modules/.deno/@actions+glob@ } } function step(r) { - r.value instanceof __await$2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { - resume$1("next", value); + resume("next", value); } function reject(value) { - resume$1("throw", value); + resume("throw", value); } function settle(f, v) { - if (f(v), q.shift(), q.length) resume$1(q[0][0], q[0][1]); + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DefaultGlobber = void 0; - const core$10 = __importStar$20(require_core()); - const fs$6 = __importStar$20(__require("fs")); - const globOptionsHelper$1 = __importStar$20(require_internal_glob_options_helper$1()); - const path$8 = __importStar$20(__require("path")); - const patternHelper$1 = __importStar$20(require_internal_pattern_helper$1()); - const internal_match_kind_1$3 = require_internal_match_kind$1(); - const internal_pattern_1$1 = require_internal_pattern$1(); - const internal_search_state_1$1 = require_internal_search_state$1(); - const IS_WINDOWS$6 = process.platform === "win32"; - var DefaultGlobber$1 = class DefaultGlobber$1 { + const core = __importStar(require_core()); + const fs$4 = __importStar(__require("fs")); + const globOptionsHelper = __importStar(require_internal_glob_options_helper()); + const path$4 = __importStar(__require("path")); + const patternHelper = __importStar(require_internal_pattern_helper()); + const internal_match_kind_1 = require_internal_match_kind(); + const internal_pattern_1 = require_internal_pattern(); + const internal_search_state_1 = require_internal_search_state(); + const IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class DefaultGlobber { constructor(options) { this.patterns = []; this.searchPaths = []; - this.options = globOptionsHelper$1.getOptions(options); + this.options = globOptionsHelper.getOptions(options); } getSearchPaths() { return this.searchPaths.slice(); } glob() { - var e_1, _a$2; - return __awaiter$18(this, void 0, void 0, function* () { + return __awaiter(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; const result = []; try { - for (var _b$1 = __asyncValues$4(this.globGenerator()), _c$1; _c$1 = yield _b$1.next(), !_c$1.done;) { - const itemPath = _c$1.value; + for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c$1 && !_c$1.done && (_a$2 = _b$1.return)) yield _a$2.call(_b$1); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -1506,42 +1591,40 @@ var require_internal_globber$1 = __commonJS({ "node_modules/.deno/@actions+glob@ }); } globGenerator() { - return __asyncGenerator$2(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper$1.getOptions(this.options); + return __asyncGenerator(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) patterns.push(new internal_pattern_1$1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); } const stack = []; - for (const searchPath of patternHelper$1.getSearchPaths(patterns)) { - core$10.debug(`Search path '${searchPath}'`); + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core.debug(`Search path '${searchPath}'`); try { - yield __await$2(fs$6.promises.lstat(searchPath)); + yield __await(fs$4.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") continue; throw err; } - stack.unshift(new internal_search_state_1$1.SearchState(searchPath, 1)); + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); } const traversalChain = []; while (stack.length) { const item = stack.pop(); - const match$2 = patternHelper$1.match(patterns, item.path); - const partialMatch$2 = !!match$2 || patternHelper$1.partialMatch(patterns, item.path); - if (!match$2 && !partialMatch$2) continue; - const stats = yield __await$2( - DefaultGlobber$1.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists -); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) continue; + const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain)); if (!stats) continue; + if (options.excludeHiddenFiles && path$4.basename(item.path).match(/^\./)) continue; if (stats.isDirectory()) { - if (match$2 & internal_match_kind_1$3.MatchKind.Directory) yield yield __await$2(item.path); - else if (!partialMatch$2) continue; + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) yield yield __await(item.path); + else if (!partialMatch) continue; const childLevel = item.level + 1; - const childItems = (yield __await$2(fs$6.promises.readdir(item.path))).map((x) => new internal_search_state_1$1.SearchState(path$8.join(item.path, x), childLevel)); + const childItems = (yield __await(fs$4.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path$4.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); - } else if (match$2 & internal_match_kind_1$3.MatchKind.File) yield yield __await$2(item.path); + } else if (match & internal_match_kind_1.MatchKind.File) yield yield __await(item.path); } }); } @@ -1549,41 +1632,41 @@ var require_internal_globber$1 = __commonJS({ "node_modules/.deno/@actions+glob@ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter$18(this, void 0, void 0, function* () { - const result = new DefaultGlobber$1(options); - if (IS_WINDOWS$6) { + return __awaiter(this, void 0, void 0, function* () { + const result = new DefaultGlobber(options); + if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); patterns = patterns.replace(/\r/g, "\n"); } const lines = patterns.split("\n").map((x) => x.trim()); for (const line of lines) if (!line || line.startsWith("#")) continue; - else result.patterns.push(new internal_pattern_1$1.Pattern(line)); - result.searchPaths.push(...patternHelper$1.getSearchPaths(result.patterns)); + else result.patterns.push(new internal_pattern_1.Pattern(line)); + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; }); } static stat(item, options, traversalChain) { - return __awaiter$18(this, void 0, void 0, function* () { + return __awaiter(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) try { - stats = yield fs$6.promises.stat(item.path); + stats = yield fs$4.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core$10.debug(`Broken symlink '${item.path}'`); - return void 0; + core.debug(`Broken symlink '${item.path}'`); + return; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); } throw err; } - else stats = yield fs$6.promises.lstat(item.path); + else stats = yield fs$4.promises.lstat(item.path); if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs$6.promises.realpath(item.path); + const realPath = yield fs$4.promises.realpath(item.path); while (traversalChain.length >= item.level) traversalChain.pop(); if (traversalChain.some((x) => x === realPath)) { - core$10.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; + core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return; } traversalChain.push(realPath); } @@ -1591,13 +1674,164 @@ var require_internal_globber$1 = __commonJS({ "node_modules/.deno/@actions+glob@ }); } }; - exports.DefaultGlobber = DefaultGlobber$1; -} }); + exports.DefaultGlobber = DefaultGlobber; +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/glob.js -var require_glob$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/glob.js"(exports) { - var __awaiter$17 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues = exports && exports.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v) { + resolve({ + value: v, + done: d + }); + }, reject); + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.hashFiles = hashFiles; + const crypto$2 = __importStar(__require("crypto")); + const core = __importStar(require_core()); + const fs$3 = __importStar(__require("fs")); + const stream$1 = __importStar(__require("stream")); + const util$3 = __importStar(__require("util")); + const path$3 = __importStar(__require("path")); + function hashFiles(globber_1, currentWorkspace_1) { + return __awaiter(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + const writeDelegate = verbose ? core.info : core.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto$2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path$3.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs$3.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto$2.createHash("sha256"); + yield util$3.promisify(stream$1.pipeline)(fs$3.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) hasMatch = true; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } +})); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.5.1/node_modules/@actions/glob/lib/glob.js +var require_glob = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -1625,42 +1859,59 @@ var require_glob$1 = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_m }); }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.create = void 0; - const internal_globber_1$1 = require_internal_globber$1(); + exports.create = create; + exports.hashFiles = hashFiles; + const internal_globber_1 = require_internal_globber(); + const internal_hash_files_1 = require_internal_hash_files(); /** * Constructs a globber * * @param patterns Patterns separated by newlines * @param options Glob options */ - function create$1(patterns, options) { - return __awaiter$17(this, void 0, void 0, function* () { - return yield internal_globber_1$1.DefaultGlobber.create(patterns, options); + function create(patterns, options) { + return __awaiter(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } - exports.create = create$1; -} }); + /** + * Computes the sha256 hash of a glob + * + * @param patterns Patterns separated by newlines + * @param currentWorkspace Workspace used when matching files + * @param options Glob options + * @param verbose Enables verbose logging + */ + function hashFiles(patterns_1) { + return __awaiter(this, arguments, void 0, function* (patterns, currentWorkspace = "", options, verbose = false) { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") followSymbolicLinks = options.followSymbolicLinks; + const globber = yield create(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); + }); + } +})); //#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/constants.js -var require_constants$3 = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/constants.js"(exports) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/constants.js +var require_constants$5 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0; var CacheFilename; - (function(CacheFilename$1) { - CacheFilename$1["Gzip"] = "cache.tgz"; - CacheFilename$1["Zstd"] = "cache.tzst"; + (function(CacheFilename) { + CacheFilename["Gzip"] = "cache.tgz"; + CacheFilename["Zstd"] = "cache.tzst"; })(CacheFilename || (exports.CacheFilename = CacheFilename = {})); var CompressionMethod; - (function(CompressionMethod$1) { - CompressionMethod$1["Gzip"] = "gzip"; - CompressionMethod$1["ZstdWithoutLong"] = "zstd-without-long"; - CompressionMethod$1["Zstd"] = "zstd"; + (function(CompressionMethod) { + CompressionMethod["Gzip"] = "gzip"; + CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; + CompressionMethod["Zstd"] = "zstd"; })(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {})); var ArchiveToolType; - (function(ArchiveToolType$1) { - ArchiveToolType$1["GNU"] = "gnu"; - ArchiveToolType$1["BSD"] = "bsd"; + (function(ArchiveToolType) { + ArchiveToolType["GNU"] = "gnu"; + ArchiveToolType["BSD"] = "bsd"; })(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {})); exports.DefaultRetryAttempts = 2; exports.DefaultRetryDelay = 5e3; @@ -1670,43 +1921,53 @@ var require_constants$3 = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/ exports.TarFilename = "cache.tar"; exports.ManifestFilename = "manifest.txt"; exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); -} }); +})); //#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheUtils.js -var require_cacheUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports) { - var __createBinding$19 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/cacheUtils.js +var require_cacheUtils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } }; Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$18 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$19 = exports && exports.__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$19(result, mod, k); - } - __setModuleDefault$18(result, mod); - return result; - }; - var __awaiter$16 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -1733,10 +1994,10 @@ var require_cacheUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/n step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues$3 = exports && exports.__asyncValues || function(o) { + var __asyncValues = exports && exports.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m$1 = o[Symbol.asyncIterator], i; - return m$1 ? m$1.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { @@ -1746,63 +2007,70 @@ var require_cacheUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/n }); }; } - function settle(resolve, reject, d$1, v) { - Promise.resolve(v).then(function(v$1) { + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v) { resolve({ - value: v$1, - done: d$1 + value: v, + done: d }); }, reject); } }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.getRuntimeToken = exports.getCacheVersion = exports.assertDefined = exports.getGnuTarPathOnWindows = exports.getCacheFileName = exports.getCompressionMethod = exports.unlinkFile = exports.resolvePaths = exports.getArchiveFileSizeInBytes = exports.createTempDirectory = void 0; - const core$9 = __importStar$19(require_core()); - const exec$1 = __importStar$19(require_exec()); - const glob = __importStar$19(require_glob$1()); - const io$1 = __importStar$19(require_io()); - const crypto$2 = __importStar$19(__require("crypto")); - const fs$5 = __importStar$19(__require("fs")); - const path$7 = __importStar$19(__require("path")); - const semver = __importStar$19(require_semver()); - const util$4 = __importStar$19(__require("util")); - const constants_1$4 = require_constants$3(); + exports.createTempDirectory = createTempDirectory; + exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports.resolvePaths = resolvePaths; + exports.unlinkFile = unlinkFile; + exports.getCompressionMethod = getCompressionMethod; + exports.getCacheFileName = getCacheFileName; + exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports.assertDefined = assertDefined; + exports.getCacheVersion = getCacheVersion; + exports.getRuntimeToken = getRuntimeToken; + const core = __importStar(require_core()); + const exec = __importStar(require_exec()); + const glob = __importStar(require_glob()); + const io = __importStar(require_io()); + const crypto$1 = __importStar(__require("crypto")); + const fs$2 = __importStar(__require("fs")); + const path$2 = __importStar(__require("path")); + const semver = __importStar(require_semver()); + const util$2 = __importStar(__require("util")); + const constants_1 = require_constants$5(); const versionSalt = "1.0"; function createTempDirectory() { - return __awaiter$16(this, void 0, void 0, function* () { - const IS_WINDOWS$11 = process.platform === "win32"; + return __awaiter(this, void 0, void 0, function* () { + const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { let baseLocation; - if (IS_WINDOWS$11) baseLocation = process.env["USERPROFILE"] || "C:\\"; + if (IS_WINDOWS) baseLocation = process.env["USERPROFILE"] || "C:\\"; else if (process.platform === "darwin") baseLocation = "/Users"; else baseLocation = "/home"; - tempDirectory = path$7.join(baseLocation, "actions", "temp"); + tempDirectory = path$2.join(baseLocation, "actions", "temp"); } - const dest = path$7.join(tempDirectory, crypto$2.randomUUID()); - yield io$1.mkdirP(dest); + const dest = path$2.join(tempDirectory, crypto$1.randomUUID()); + yield io.mkdirP(dest); return dest; }); } - exports.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs$5.statSync(filePath).size; + return fs$2.statSync(filePath).size; } - exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a$2, e_1, _b$1, _c$1; - var _d$1; - return __awaiter$16(this, void 0, void 0, function* () { + return __awaiter(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; - const workspace = (_d$1 = process.env["GITHUB_WORKSPACE"]) !== null && _d$1 !== void 0 ? _d$1 : process.cwd(); + const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues$3(globber.globGenerator()), _g; _g = yield _f.next(), _a$2 = _g.done, !_a$2; _e = true) { - _c$1 = _g.value; + for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; _e = false; - const file = _c$1; - const relativeFile = path$7.relative(workspace, file).replace(new RegExp(`\\${path$7.sep}`, "g"), "/"); - core$9.debug(`Matched: ${relativeFile}`); + const file = _c; + const relativeFile = path$2.relative(workspace, file).replace(new RegExp(`\\${path$2.sep}`, "g"), "/"); + core.debug(`Matched: ${relativeFile}`); if (relativeFile === "") paths.push("."); else paths.push(`${relativeFile}`); } @@ -1810,7 +2078,7 @@ var require_cacheUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/n e_1 = { error: e_1_1 }; } finally { try { - if (!_e && !_a$2 && (_b$1 = _f.return)) yield _b$1.call(_f); + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); } finally { if (e_1) throw e_1.error; } @@ -1818,20 +2086,18 @@ var require_cacheUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/n return paths; }); } - exports.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter$16(this, void 0, void 0, function* () { - return util$4.promisify(fs$5.unlink)(filePath); + return __awaiter(this, void 0, void 0, function* () { + return util$2.promisify(fs$2.unlink)(filePath); }); } - exports.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter$16(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); - core$9.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { - yield exec$1.exec(`${app}`, additionalArgs, { + yield exec.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, silent: true, listeners: { @@ -1840,632 +2106,594 @@ var require_cacheUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/n } }); } catch (err) { - core$9.debug(err.message); + core.debug(err.message); } versionOutput = versionOutput.trim(); - core$9.debug(versionOutput); + core.debug(versionOutput); return versionOutput; }); } function getCompressionMethod() { - return __awaiter$16(this, void 0, void 0, function* () { + return __awaiter(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); - const version$1 = semver.clean(versionOutput); - core$9.debug(`zstd version: ${version$1}`); - if (versionOutput === "") return constants_1$4.CompressionMethod.Gzip; - else return constants_1$4.CompressionMethod.ZstdWithoutLong; + const version = semver.clean(versionOutput); + core.debug(`zstd version: ${version}`); + if (versionOutput === "") return constants_1.CompressionMethod.Gzip; + else return constants_1.CompressionMethod.ZstdWithoutLong; }); } - exports.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { - return compressionMethod === constants_1$4.CompressionMethod.Gzip ? constants_1$4.CacheFilename.Gzip : constants_1$4.CacheFilename.Zstd; + return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter$16(this, void 0, void 0, function* () { - if (fs$5.existsSync(constants_1$4.GnuTarPathOnWindows)) return constants_1$4.GnuTarPathOnWindows; - const versionOutput = yield getVersion("tar"); - return versionOutput.toLowerCase().includes("gnu tar") ? io$1.which("tar") : ""; + return __awaiter(this, void 0, void 0, function* () { + if (fs$2.existsSync(constants_1.GnuTarPathOnWindows)) return constants_1.GnuTarPathOnWindows; + return (yield getVersion("tar")).toLowerCase().includes("gnu tar") ? io.which("tar") : ""; }); } - exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) throw Error(`Expected ${name} but value was undefiend`); return value; } - exports.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) components.push(compressionMethod); if (process.platform === "win32" && !enableCrossOsArchive) components.push("windows-only"); components.push(versionSalt); - return crypto$2.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto$1.createHash("sha256").update(components.join("|")).digest("hex"); } - exports.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable"); return token; } - exports.getRuntimeToken = getRuntimeToken; -} }); - -//#endregion -//#region node_modules/.deno/tslib@2.8.1/node_modules/tslib/tslib.js -var require_tslib = __commonJS({ "node_modules/.deno/tslib@2.8.1/node_modules/tslib/tslib.js"(exports, module) { - /****************************************************************************** - - Copyright (c) Microsoft Corporation. - - - - Permission to use, copy, modify, and/or distribute this software for any - - purpose with or without fee is hereby granted. - - - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - - PERFORMANCE OF THIS SOFTWARE. - - ***************************************************************************** */ - var __extends; - var __assign; - var __rest; - var __decorate; - var __param; - var __esDecorate; - var __runInitializers; - var __propKey; - var __setFunctionName; - var __metadata; - var __awaiter$15; - var __generator; - var __exportStar$1; - var __values$1; - var __read; - var __spread; - var __spreadArrays; - var __spreadArray; - var __await$1; - var __asyncGenerator$1; - var __asyncDelegator; - var __asyncValues$2; - var __makeTemplateObject; - var __importStar$18; - var __importDefault$6; - var __classPrivateFieldGet; - var __classPrivateFieldSet; - var __classPrivateFieldIn; - var __createBinding$18; - var __addDisposableResource; - var __disposeResources; - var __rewriteRelativeImportExtension; - (function(factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) define("tslib", ["exports"], function(exports$1) { - factory(createExporter(root, createExporter(exports$1))); - }); - else if (typeof module === "object" && typeof module.exports === "object") factory(createExporter(root, createExporter(module.exports))); - else factory(createExporter(root)); - function createExporter(exports$1, previous) { - if (exports$1 !== root) if (typeof Object.create === "function") Object.defineProperty(exports$1, "__esModule", { value: true }); - else exports$1.__esModule = true; - return function(id, v) { - return exports$1[id] = previous ? previous(id, v) : v; - }; - } - })(function(exporter) { - var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d$1, b) { - d$1.__proto__ = b; - } || function(d$1, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d$1[p] = b[p]; - }; - __extends = function(d$1, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d$1, b); - function __() { - this.constructor = d$1; - } - d$1.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +})); + +//#endregion +//#region node_modules/.deno/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +var tslib_es6_exports = /* @__PURE__ */ __exportAll({ + __addDisposableResource: () => __addDisposableResource, + __assign: () => __assign, + __asyncDelegator: () => __asyncDelegator, + __asyncGenerator: () => __asyncGenerator, + __asyncValues: () => __asyncValues, + __await: () => __await, + __awaiter: () => __awaiter, + __classPrivateFieldGet: () => __classPrivateFieldGet, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet, + __createBinding: () => __createBinding, + __decorate: () => __decorate, + __disposeResources: () => __disposeResources, + __esDecorate: () => __esDecorate, + __exportStar: () => __exportStar, + __extends: () => __extends, + __generator: () => __generator, + __importDefault: () => __importDefault, + __importStar: () => __importStar, + __makeTemplateObject: () => __makeTemplateObject, + __metadata: () => __metadata, + __param: () => __param, + __propKey: () => __propKey, + __read: () => __read, + __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values$1, + default: () => tslib_es6_default +}); +function __extends(d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") { + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { + if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); + return f; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function(f) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f || null)); }; - __assign = Object.assign || function(t) { - for (var s$1, i = 1, n = arguments.length; i < n; i++) { - s$1 = arguments[i]; - for (var p in s$1) if (Object.prototype.hasOwnProperty.call(s$1, p)) t[p] = s$1[p]; + var result = (0, decorators[i])(kind === "accessor" ? { + get: descriptor.get, + set: descriptor.set + } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } else if (_ = accept(result)) if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + return useValue ? value : void 0; +} +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { + configurable: true, + value: prefix ? "".concat(prefix, " ", name) : name + }); +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } - return t; - }; - __rest = function(s$1, e) { - var t = {}; - for (var p in s$1) if (Object.prototype.hasOwnProperty.call(s$1, p) && e.indexOf(p) < 0) t[p] = s$1[p]; - if (s$1 != null && typeof Object.getOwnPropertySymbols === "function") { - for (var i = 0, p = Object.getOwnPropertySymbols(s$1); i < p.length; i++) if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s$1, p[i])) t[p[i]] = s$1[p[i]]; + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } - return t; - }; - __decorate = function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$1; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d$1 = decorators[i]) r = (c < 3 ? d$1(r) : c > 3 ? d$1(target, key, r) : d$1(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - __param = function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept$1(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context$2 = {}; - for (var p in contextIn) context$2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context$2.access[p] = contextIn.access[p]; - context$2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept$1(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { - get: descriptor.get, - set: descriptor.set - } : descriptor[key], context$2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept$1(result.get)) descriptor.get = _; - if (_ = accept$1(result.set)) descriptor.set = _; - if (_ = accept$1(result.init)) initializers.unshift(_); - } else if (_ = accept$1(result)) if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - __runInitializers = function(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - return useValue ? value : void 0; - }; - __propKey = function(x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - __setFunctionName = function(f, name, prefix$1) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { - configurable: true, - value: prefix$1 ? "".concat(prefix$1, " ", name) : name - }); - }; - __metadata = function(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { + label: 0, + sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); }; - __awaiter$15 = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { + value: op[1], + done: false + }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - __generator = function(thisArg, body$1) { - var _ = { - label: 0, - sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, f, y$1, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y$1 && (t = op[0] & 2 ? y$1["return"] : op[0] ? y$1["throw"] || ((t = y$1["return"]) && t.call(y$1), 0) : y$1.next) && !(t = t.call(y$1, op[1])).done) return t; - if (y$1 = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y$1 = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; } - op = body$1.call(thisArg, _); - } catch (e) { - op = [6, e]; - y$1 = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } - }; - __exportStar$1 = function(m$1, o) { - for (var p in m$1) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding$18(o, m$1, p); - }; - __createBinding$18 = Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }; - __values$1 = function(o) { - var s$1 = typeof Symbol === "function" && Symbol.iterator, m$1 = s$1 && o[s$1], i = 0; - if (m$1) return m$1.call(o); - if (o && typeof o.length === "number") return { next: function() { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } }; - throw new TypeError(s$1 ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - __read = function(o, n) { - var m$1 = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m$1) return o; - var i = m$1.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { error }; - } finally { - try { - if (r && !r.done && (m$1 = i["return"])) m$1.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; - }; - /** @deprecated */ - __spread = function() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; - }; - /** @deprecated */ - __spreadArrays = function() { - for (var s$1 = 0, i = 0, il = arguments.length; i < il; i++) s$1 += arguments[i].length; - for (var r = Array(s$1), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; - return r; - }; - __spreadArray = function(to, from, pack) { - if (pack || arguments.length === 2) { - for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - __await$1 = function(v) { - return this instanceof __await$1 ? (this.v = v, this) : new __await$1(v); - }; - __asyncGenerator$1 = function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([ - n, - v, - a, - b - ]) > 1 || resume$1(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume$1(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await$1 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume$1("next", value); - } - function reject(value) { - resume$1("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume$1(q[0][0], q[0][1]); - } - }; - __asyncDelegator = function(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { - value: __await$1(o[n](v)), - done: false - } : f ? f(v) : v; - } : f; - } - }; - __asyncValues$2 = function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m$1 = o[Symbol.asyncIterator], i; - return m$1 ? m$1.call(o) : (o = typeof __values$1 === "function" ? __values$1(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d$1, v) { - Promise.resolve(v).then(function(v$1) { - resolve({ - value: v$1, - done: d$1 - }); - }, reject); + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true }; - __makeTemplateObject = function(cooked, raw) { - if (Object.defineProperty) Object.defineProperty(cooked, "raw", { value: raw }); - else cooked.raw = raw; - return cooked; + } +} +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} +function __values$1(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { next: function() { + if (o && i >= o.length) o = void 0; + return { + value: o && o[i++], + done: !o }; - var __setModuleDefault$25 = Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; + } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; +} +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +} +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; + return r; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) { + for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function awaitReturn(f) { + return function(v) { + return Promise.resolve(v).then(f, reject); }; - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o$1) { - var ar = []; - for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k; - return ar; + } + function verb(n, f) { + if (g[n]) { + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([ + n, + v, + a, + b + ]) > 1 || resume(n, v); + }); }; - return ownKeys(o); + if (f) i[n] = f(i[n]); + } + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { + value: __await(o[n](v)), + done: false + } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values$1 === "function" ? __values$1(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); }; - __importStar$18 = function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$18(result, mod, k[i]); + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v) { + resolve({ + value: v, + done: d + }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) Object.defineProperty(cooked, "raw", { value: raw }); + else cooked.raw = raw; + return cooked; +} +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet(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); +} +function __classPrivateFieldSet(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; +} +function __classPrivateFieldIn(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} +function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { + try { + inner.call(this); + } catch (e) { + return Promise.reject(e); } - __setModuleDefault$25(result, mod); - return result; - }; - __importDefault$6 = function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - __classPrivateFieldGet = function(receiver, state$1, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state$1 === "function" ? receiver !== state$1 || !f : !state$1.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$1.get(receiver); }; - __classPrivateFieldSet = function(receiver, state$1, 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$1 === "function" ? receiver !== state$1 || !f : !state$1.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$1.set(receiver, value), value; - }; - __classPrivateFieldIn = function(state$1, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state$1 === "function" ? receiver === state$1 : state$1.has(receiver); - }; - __addDisposableResource = function(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ - value, - dispose, - async + env.stack.push({ + value, + dispose, + async + }); + } else if (async) env.stack.push({ async: true }); + return value; +} +function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { + fail(e); + return next(); }); - } else if (async) env.stack.push({ async: true }); - return value; + } else s |= 1; + } catch (e) { + fail(e); + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} +function __rewriteRelativeImportExtension(path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + return path; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esmMin((() => { + extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + return extendStatics(d, b); + }; + __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; }; - __disposeResources = function(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s$1 = 0; - function next() { - while (r = env.stack.pop()) try { - if (!r.async && s$1 === 1) return s$1 = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s$1 |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s$1 |= 1; - } catch (e) { - fail(e); - } - if (s$1 === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; + return __assign.apply(this, arguments); + }; + __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]; } - return next(); }; - __rewriteRelativeImportExtension = function(path$13, preserveJsx) { - if (typeof path$13 === "string" && /^\.\.?\//.test(path$13)) return path$13.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m$1, tsx, d$1, ext$1, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d$1 && (!ext$1 || !cm) ? m$1 : d$1 + ext$1 + "." + cm.toLowerCase() + "js"; - }); - return path$13; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; }; - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter$15); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar$1); - exporter("__createBinding", __createBinding$18); - exporter("__values", __values$1); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await$1); - exporter("__asyncGenerator", __asyncGenerator$1); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues$2); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar$18); - exporter("__importDefault", __importDefault$6); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); - }); -} }); - -//#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js -var require_AbortError$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports) { + return ownKeys(o); + }; + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values: __values$1, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources, + __rewriteRelativeImportExtension + }; +})); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AbortError = void 0; /** @@ -2497,34 +2725,34 @@ var require_AbortError$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-ru * } * ``` */ - var AbortError$2 = class extends Error { + var AbortError = class extends Error { constructor(message) { super(message); this.name = "AbortError"; } }; - exports.AbortError = AbortError$2; -} }); + exports.AbortError = AbortError; +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js -var require_log$3 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log$5 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.log = log$1; - const tslib_1$9 = require_tslib(); - const node_os_1 = __require("node:os"); - const node_util_1$1 = tslib_1$9.__importDefault(__require("node:util")); - const process$4 = tslib_1$9.__importStar(__require("node:process")); - function log$1(message, ...args) { - process$4.stderr.write(`${node_util_1$1.default.format(message, ...args)}${node_os_1.EOL}`); + exports.log = log; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const node_os_1$2 = __require("node:os"); + const node_util_1$2 = tslib_1.__importDefault(__require("node:util")); + const node_process_1$2 = tslib_1.__importDefault(__require("node:process")); + function log(message, ...args) { + node_process_1$2.default.stderr.write(`${node_util_1$2.default.format(message, ...args)}${node_os_1$2.EOL}`); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js -var require_debug = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - const log_js_1$10 = require_log$3(); + const log_js_1 = require_log$5(); const debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; let enabledString; let enabledNamespaces = []; @@ -2537,38 +2765,94 @@ var require_debug = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0 enable, enabled, disable, - log: log_js_1$10.log + log: log_js_1.log }); function enable(namespaces) { enabledString = namespaces; enabledNamespaces = []; skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) if (ns.startsWith("-")) skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - else enabledNamespaces.push(new RegExp(`^${ns}$`)); + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) if (ns.startsWith("-")) skippedNamespaces.push(ns.substring(1)); + else enabledNamespaces.push(ns); for (const instance of debuggers) instance.enabled = enabled(instance.namespace); } function enabled(namespace) { if (namespace.endsWith("*")) return true; - for (const skipped of skippedNamespaces) if (skipped.test(namespace)) return false; - for (const enabledNamespace of enabledNamespaces) if (enabledNamespace.test(namespace)) return true; + for (const skipped of skippedNamespaces) if (namespaceMatches(namespace, skipped)) return false; + for (const enabledNamespace of enabledNamespaces) if (namespaceMatches(namespace, enabledNamespace)) return true; return false; } + /** + * Given a namespace, check if it matches a pattern. + * Patterns only have a single wildcard character which is *. + * The behavior of * is that it matches zero or more other characters. + */ + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) return namespace === patternToMatch; + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) if (character === "*" && lastCharacter === "*") continue; + else { + lastCharacter = character; + patternParts.push(character); + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) return true; + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) return false; + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) return false; + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) return false; + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else return false; + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } function disable() { const result = enabledString || ""; enable(""); return result; } function createDebugger(namespace) { - const newDebugger = Object.assign(debug$3, { + const newDebugger = Object.assign(debug, { enabled: enabled(namespace), destroy, log: debugObj.log, namespace, extend }); - function debug$3(...args) { + function debug(...args) { if (!newDebugger.enabled) return; if (args.length > 0) args[0] = `${namespace} ${args[0]}`; newDebugger.log(...args); @@ -2590,19 +2874,18 @@ var require_debug = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0 return newDebugger; } exports.default = debugObj; -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js -var require_logger$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.TypeSpecRuntimeLogger = void 0; exports.createLoggerContext = createLoggerContext; - exports.setLogLevel = setLogLevel$1; - exports.getLogLevel = getLogLevel$1; - exports.createClientLogger = createClientLogger$1; - const tslib_1$8 = require_tslib(); - const debug_js_1 = tslib_1$8.__importDefault(require_debug()); + exports.setLogLevel = setLogLevel; + exports.getLogLevel = getLogLevel; + exports.createClientLogger = createClientLogger; + const debug_js_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)).__importDefault(require_debug()); const TYPESPEC_RUNTIME_LOG_LEVELS = [ "verbose", "info", @@ -2629,53 +2912,56 @@ var require_logger$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtim * @returns The logger context. */ function createLoggerContext(options) { - const registeredLoggers = new Set(); + const registeredLoggers = /* @__PURE__ */ new Set(); const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; let logLevel; const clientLogger = (0, debug_js_1.default)(options.namespace); clientLogger.log = (...args) => { debug_js_1.default.log(...args); }; - if (logLevelFromEnv) if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) setLogLevel$1(logLevelFromEnv); + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) if (shouldEnable(logger)) enabledNamespaces.push(logger.namespace); + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) contextSetLogLevel(logLevelFromEnv); else console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); - function shouldEnable(logger$2) { - return Boolean(logLevel && levelMap[logger$2.level] <= levelMap[logLevel]); + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); } function createLogger(parent, level) { - const logger$2 = Object.assign(parent.extend(level), { level }); - patchLogMethod(parent, logger$2); - if (shouldEnable(logger$2)) { - const enabledNamespaces$1 = debug_js_1.default.disable(); - debug_js_1.default.enable(enabledNamespaces$1 + "," + logger$2.namespace); + const logger = Object.assign(parent.extend(level), { level }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); } - registeredLoggers.add(logger$2); - return logger$2; + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; } return { - setLogLevel(level) { - if (level && !isTypeSpecRuntimeLogLevel(level)) throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); - logLevel = level; - const enabledNamespaces$1 = []; - for (const logger$2 of registeredLoggers) if (shouldEnable(logger$2)) enabledNamespaces$1.push(logger$2.namespace); - debug_js_1.default.enable(enabledNamespaces$1.join(",")); - }, - getLogLevel() { - return logLevel; - }, - createClientLogger(namespace) { - const clientRootLogger = clientLogger.extend(namespace); - patchLogMethod(clientLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - }, + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, logger: clientLogger }; } - const context$1 = createLoggerContext({ + const context = createLoggerContext({ logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", namespace: "typeSpecRuntime" }); @@ -2688,34 +2974,34 @@ var require_logger$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtim * - warning * - error */ - exports.TypeSpecRuntimeLogger = context$1.logger; + exports.TypeSpecRuntimeLogger = context.logger; /** * Retrieves the currently specified log level. */ - function setLogLevel$1(logLevel) { - context$1.setLogLevel(logLevel); + function setLogLevel(logLevel) { + context.setLogLevel(logLevel); } /** * Retrieves the currently specified log level. */ - function getLogLevel$1() { - return context$1.getLogLevel(); + function getLogLevel() { + return context.getLogLevel(); } /** * Creates a logger for use by the SDKs that inherits from `TypeSpecRuntimeLogger`. * @param namespace - The name of the SDK package. * @hidden */ - function createClientLogger$1(namespace) { - return context$1.createClientLogger(namespace); + function createClientLogger(namespace) { + return context.createClientLogger(namespace); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js -var require_httpHeaders$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js +var require_httpHeaders$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.createHttpHeaders = createHttpHeaders$1; + exports.createHttpHeaders = createHttpHeaders; function normalizeName(name) { return name.toLowerCase(); } @@ -2723,8 +3009,9 @@ var require_httpHeaders$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r for (const entry of map.values()) yield [entry.name, entry.value]; } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { - this._headersMap = new Map(); + this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) for (const headerName of Object.keys(rawHeaders)) this.set(headerName, rawHeaders[headerName]); } /** @@ -2745,8 +3032,7 @@ var require_httpHeaders$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a$2; - return (_a$2 = this._headersMap.get(normalizeName(name))) === null || _a$2 === void 0 ? void 0 : _a$2.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -2788,69 +3074,85 @@ var require_httpHeaders$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r * Creates an object that satisfies the `HttpHeaders` interface. * @param rawHeaders - A simple object representing initial headers */ - function createHttpHeaders$1(rawHeaders) { + function createHttpHeaders(rawHeaders) { return new HttpHeadersImpl(rawHeaders); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js -var require_schemes = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js -var require_oauth2Flows = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js -var require_uuidUtils = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports) { - var _a$1; +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.randomUUID = randomUUID$1; - const node_crypto_1$1 = __require("node:crypto"); - const uuidFunction = typeof ((_a$1 = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a$1 === void 0 ? void 0 : _a$1.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : node_crypto_1$1.randomUUID; + exports.randomUUID = randomUUID; /** * Generated Universally Unique Identifier * * @returns RFC4122 v4 UUID. */ - function randomUUID$1() { - return uuidFunction(); + function randomUUID() { + return crypto.randomUUID(); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js -var require_pipelineRequest$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.createPipelineRequest = createPipelineRequest$1; - const httpHeaders_js_1$7 = require_httpHeaders$1(); - const uuidUtils_js_1$2 = require_uuidUtils(); + exports.createPipelineRequest = createPipelineRequest; + const httpHeaders_js_1 = require_httpHeaders$1(); + const uuidUtils_js_1 = require_uuidUtils(); var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; constructor(options) { - var _a$2, _b$1, _c$1, _d$1, _e, _f, _g; this.url = options.url; this.body = options.body; - this.headers = (_a$2 = options.headers) !== null && _a$2 !== void 0 ? _a$2 : (0, httpHeaders_js_1$7.createHttpHeaders)(); - this.method = (_b$1 = options.method) !== null && _b$1 !== void 0 ? _b$1 : "GET"; - this.timeout = (_c$1 = options.timeout) !== null && _c$1 !== void 0 ? _c$1 : 0; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; this.multipartBody = options.multipartBody; this.formData = options.formData; - this.disableKeepAlive = (_d$1 = options.disableKeepAlive) !== null && _d$1 !== void 0 ? _d$1 : false; + this.disableKeepAlive = options.disableKeepAlive ?? false; this.proxySettings = options.proxySettings; this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; + this.withCredentials = options.withCredentials ?? false; this.abortSignal = options.abortSignal; this.onUploadProgress = options.onUploadProgress; this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, uuidUtils_js_1$2.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; } }; /** @@ -2858,16 +3160,16 @@ var require_pipelineRequest$1 = __commonJS({ "node_modules/.deno/@typespec+ts-ht * This method is to allow for the easy setting of default values and not required. * @param options - The options to create the request with. */ - function createPipelineRequest$1(options) { + function createPipelineRequest(options) { return new PipelineRequestImpl(options); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js -var require_pipeline$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.createEmptyPipeline = createEmptyPipeline$1; + exports.createEmptyPipeline = createEmptyPipeline; const ValidPhaseNames = new Set([ "Deserialize", "Serialize", @@ -2880,10 +3182,10 @@ var require_pipeline$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runt * @internal */ var HttpPipeline = class HttpPipeline { + _policies = []; + _orderedPolicies; constructor(policies) { - var _a$2; - this._policies = []; - this._policies = (_a$2 = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a$2 !== void 0 ? _a$2 : []; + this._policies = policies?.slice(0) ?? []; this._orderedPolicies = void 0; } addPolicy(policy, options = {}) { @@ -2908,13 +3210,11 @@ var require_pipeline$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runt return removedPolicies; } sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req$1) => { - return policy.sendRequest(req$1, next); + return this.getOrderedPolicies().reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); }; - }, (req$1) => httpClient.sendRequest(req$1)); - return pipeline(request); + }, (req) => httpClient.sendRequest(req))(request); } getOrderedPolicies() { if (!this._orderedPolicies) this._orderedPolicies = this.orderPolicies(); @@ -2963,11 +3263,11 @@ var require_pipeline$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runt * */ const result = []; - const policyMap = new Map(); + const policyMap = /* @__PURE__ */ new Map(); function createPhase(name) { return { name, - policies: new Set(), + policies: /* @__PURE__ */ new Set(), hasRun: false, hasAfterPolicies: false }; @@ -2998,16 +3298,15 @@ var require_pipeline$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runt if (policyMap.has(policyName)) throw new Error("Duplicate policy names not allowed in pipeline"); const node = { policy, - dependsOn: new Set(), - dependants: new Set() + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() }; if (options.afterPhase) { node.afterPhase = getPhase(options.afterPhase); node.afterPhase.hasAfterPolicies = true; } policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); + getPhase(options.phase).policies.add(node); } for (const descriptor of this._policies) { const { policy, options } = descriptor; @@ -3065,60 +3364,60 @@ var require_pipeline$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runt * Creates a totally empty pipeline. * Useful for testing or creating a custom one. */ - function createEmptyPipeline$1() { + function createEmptyPipeline() { return HttpPipeline.create(); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js -var require_object = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.isObject = isObject$1; + exports.isObject = isObject; /** * Helper to determine when an input is a generic JS object. * @returns true when input is an object type that is not null, Array, RegExp, or Date. */ - function isObject$1(input) { + function isObject(input) { return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js -var require_error$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.isError = isError$1; - const object_js_1$2 = require_object(); + exports.isError = isError; + const object_js_1 = require_object(); /** * Typeguard for an error object shape (has name and message) * @param e - Something caught by a catch clause. */ - function isError$1(e) { - if ((0, object_js_1$2.isObject)(e)) { + function isError(e) { + if ((0, object_js_1.isObject)(e)) { const hasName = typeof e.name === "string"; const hasMessage = typeof e.message === "string"; return hasName && hasMessage; } return false; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.custom = void 0; - const node_util_1 = __require("node:util"); - exports.custom = node_util_1.inspect.custom; -} }); + const node_util_1$1 = __require("node:util"); + exports.custom = node_util_1$1.inspect.custom; +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Sanitizer = void 0; - const object_js_1$1 = require_object(); + const object_js_1 = require_object(); const RedactedString = "REDACTED"; const defaultAllowedHeaderNames = [ "x-ms-client-request-id", @@ -3166,6 +3465,8 @@ var require_sanitizer = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti * A utility class to sanitize objects for logging. */ var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); @@ -3178,19 +3479,20 @@ var require_sanitizer = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti * @returns - The sanitized object as a string */ sanitize(obj) { - const seen = new Set(); + const seen = /* @__PURE__ */ new Set(); return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) return Object.assign(Object.assign({}, value), { + if (value instanceof Error) return { + ...value, name: value.name, message: value.message - }); + }; if (key === "headers") return this.sanitizeHeaders(value); else if (key === "url") return this.sanitizeUrl(value); else if (key === "query") return this.sanitizeQuery(value); - else if (key === "body") return void 0; - else if (key === "response") return void 0; - else if (key === "operationSpec") return void 0; - else if (Array.isArray(value) || (0, object_js_1$1.isObject)(value)) { + else if (key === "body") return; + else if (key === "response") return; + else if (key === "operationSpec") return; + else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { if (seen.has(value)) return "[Circular]"; seen.add(value); } @@ -3204,10 +3506,10 @@ var require_sanitizer = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti */ sanitizeUrl(value) { if (typeof value !== "string" || value === null || value === "") return value; - const url$1 = new URL(value); - if (!url$1.search) return value; - for (const [key] of url$1.searchParams) if (!this.allowedQueryParameters.has(key.toLowerCase())) url$1.searchParams.set(key, RedactedString); - return url$1.toString(); + const url = new URL(value); + if (!url.search) return value; + for (const [key] of url.searchParams) if (!this.allowedQueryParameters.has(key.toLowerCase())) url.searchParams.set(key, RedactedString); + return url.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -3224,22 +3526,54 @@ var require_sanitizer = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti } }; exports.Sanitizer = Sanitizer; -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js -var require_restError$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.RestError = void 0; - exports.isRestError = isRestError$1; - const error_js_1$2 = require_error$1(); + exports.isRestError = isRestError; + const error_js_1 = require_error$1(); const inspect_js_1 = require_inspect(); - const sanitizer_js_1$3 = require_sanitizer(); - const errorSanitizer = new sanitizer_js_1$3.Sanitizer(); + const errorSanitizer = new (require_sanitizer()).Sanitizer(); /** * A custom error type for failed pipeline requests. */ - var RestError$1 = class RestError$1 extends Error { + var RestError = class RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; constructor(message, options = {}) { super(message); this.name = "RestError"; @@ -3253,53 +3587,50 @@ var require_restError$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-run value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; Object.defineProperty(this, inspect_js_1.custom, { value: () => { - return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { - request: this.request, + return `RestError: ${this.message} \n ${errorSanitizer.sanitize({ + ...this, + request: { + ...this.request, + agent + }, response: this.response - }))}`; + })}`; }, enumerable: false }); - Object.setPrototypeOf(this, RestError$1.prototype); + Object.setPrototypeOf(this, RestError.prototype); } }; - exports.RestError = RestError$1; - /** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ - RestError$1.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - /** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ - RestError$1.PARSE_ERROR = "PARSE_ERROR"; + exports.RestError = RestError; /** * Typeguard for RestError * @param e - Something caught by a catch clause. */ - function isRestError$1(e) { - if (e instanceof RestError$1) return true; - return (0, error_js_1$2.isError)(e) && e.name === "RestError"; + function isRestError(e) { + if (e instanceof RestError) return true; + return (0, error_js_1.isError)(e) && e.name === "RestError"; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js -var require_bytesEncoding = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.uint8ArrayToString = uint8ArrayToString$1; - exports.stringToUint8Array = stringToUint8Array$1; + exports.uint8ArrayToString = uint8ArrayToString; + exports.stringToUint8Array = stringToUint8Array; /** * The helper that transforms bytes with specific character encoding into string * @param bytes - the uint8array bytes * @param format - the format we use to encode the byte * @returns a string of the encoded string */ - function uint8ArrayToString$1(bytes, format) { + function uint8ArrayToString(bytes, format) { return Buffer.from(bytes).toString(format); } /** @@ -3308,58 +3639,60 @@ var require_bytesEncoding = __commonJS({ "node_modules/.deno/@typespec+ts-http-r * @param format - the format we use to decode the value * @returns a uint8array */ - function stringToUint8Array$1(value, format) { + function stringToUint8Array(value, format) { return Buffer.from(value, format); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js -var require_log$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log$4 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = void 0; - const logger_js_1$6 = require_logger$1(); - exports.logger = (0, logger_js_1$6.createClientLogger)("ts-http-runtime"); -} }); + const logger_js_1 = require_logger$1(); + exports.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getBodyLength = getBodyLength; exports.createNodeHttpClient = createNodeHttpClient; - const tslib_1$7 = require_tslib(); - const http$2 = tslib_1$7.__importStar(__require("node:http")); - const https$1 = tslib_1$7.__importStar(__require("node:https")); - const zlib = tslib_1$7.__importStar(__require("node:zlib")); - const node_stream_1 = __require("node:stream"); - const AbortError_js_1$4 = require_AbortError$1(); - const httpHeaders_js_1$6 = require_httpHeaders$1(); - const restError_js_1$7 = require_restError$2(); - const log_js_1$9 = require_log$2(); - const sanitizer_js_1$2 = require_sanitizer(); + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const node_http_1 = tslib_1.__importDefault(__require("node:http")); + const node_https_1 = tslib_1.__importDefault(__require("node:https")); + const node_zlib_1 = tslib_1.__importDefault(__require("node:zlib")); + const node_stream_1$3 = __require("node:stream"); + const AbortError_js_1 = require_AbortError$1(); + const httpHeaders_js_1 = require_httpHeaders$1(); + const restError_js_1 = require_restError$2(); + const log_js_1 = require_log$4(); + const sanitizer_js_1 = require_sanitizer(); const DEFAULT_TLS_SETTINGS = {}; - function isReadableStream$1(body$1) { - return body$1 && typeof body$1.pipe === "function"; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; } - function isStreamComplete(stream$3) { - if (stream$3.readable === false) return Promise.resolve(); + function isStreamComplete(stream) { + if (stream.readable === false) return Promise.resolve(); return new Promise((resolve) => { const handler = () => { resolve(); - stream$3.removeListener("close", handler); - stream$3.removeListener("end", handler); - stream$3.removeListener("error", handler); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); }; - stream$3.on("close", handler); - stream$3.on("end", handler); - stream$3.on("error", handler); + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); }); } - function isArrayBuffer(body$1) { - return body$1 && typeof body$1.byteLength === "number"; + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; } - var ReportTransform = class extends node_stream_1.Transform { + var ReportTransform = class extends node_stream_1$3.Transform { + loadedBytes = 0; + progressCallback; _transform(chunk, _encoding, callback) { this.push(chunk); this.loadedBytes += chunk.length; @@ -3372,7 +3705,6 @@ var require_nodeHttpClient = __commonJS({ "node_modules/.deno/@typespec+ts-http- } constructor(progressCallback) { super(); - this.loadedBytes = 0; this.progressCallback = progressCallback; } }; @@ -3381,55 +3713,52 @@ var require_nodeHttpClient = __commonJS({ "node_modules/.deno/@typespec+ts-http- * @internal */ var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = new WeakMap(); - } + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); /** * Makes a request over an underlying transport layer and returns the response. * @param request - The request to be made. */ async sendRequest(request) { - var _a$2, _b$1, _c$1; - const abortController$1 = new AbortController(); + const abortController = new AbortController(); let abortListener; if (request.abortSignal) { - if (request.abortSignal.aborted) throw new AbortError_js_1$4.AbortError("The operation was aborted. Request has already been canceled."); + if (request.abortSignal.aborted) throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); abortListener = (event) => { - if (event.type === "abort") abortController$1.abort(); + if (event.type === "abort") abortController.abort(); }; request.abortSignal.addEventListener("abort", abortListener); } let timeoutId; if (request.timeout > 0) timeoutId = setTimeout(() => { - const sanitizer = new sanitizer_js_1$2.Sanitizer(); - log_js_1$9.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); - abortController$1.abort(); + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); }, request.timeout); const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body$1 = typeof request.body === "function" ? request.body() : request.body; - if (body$1 && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body$1); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); if (bodyLength !== null) request.headers.set("Content-Length", bodyLength); } let responseStream; try { - if (body$1 && request.onUploadProgress) { + if (body && request.onUploadProgress) { const onUploadProgress = request.onUploadProgress; const uploadReportStream = new ReportTransform(onUploadProgress); uploadReportStream.on("error", (e) => { - log_js_1$9.logger.error("Error in upload progress", e); + log_js_1.logger.error("Error in upload progress", e); }); - if (isReadableStream$1(body$1)) body$1.pipe(uploadReportStream); - else uploadReportStream.end(body$1); - body$1 = uploadReportStream; + if (isReadableStream(body)) body.pipe(uploadReportStream); + else uploadReportStream.end(body); + body = uploadReportStream; } - const res = await this.makeRequest(request, abortController$1, body$1); + const res = await this.makeRequest(request, abortController, body); if (timeoutId !== void 0) clearTimeout(timeoutId); const headers = getResponseHeaders(res); - const status = (_a$2 = res.statusCode) !== null && _a$2 !== void 0 ? _a$2 : 0; const response = { - status, + status: res.statusCode ?? 0, headers, request }; @@ -3442,88 +3771,87 @@ var require_nodeHttpClient = __commonJS({ "node_modules/.deno/@typespec+ts-http- if (onDownloadProgress) { const downloadReportStream = new ReportTransform(onDownloadProgress); downloadReportStream.on("error", (e) => { - log_js_1$9.logger.error("Error in download progress", e); + log_js_1.logger.error("Error in download progress", e); }); responseStream.pipe(downloadReportStream); responseStream = downloadReportStream; } - if (((_b$1 = request.streamResponseStatusCodes) === null || _b$1 === void 0 ? void 0 : _b$1.has(Number.POSITIVE_INFINITY)) || ((_c$1 = request.streamResponseStatusCodes) === null || _c$1 === void 0 ? void 0 : _c$1.has(response.status))) response.readableStreamBody = responseStream; + if (request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status)) response.readableStreamBody = responseStream; else response.bodyAsText = await streamToText(responseStream); return response; } finally { if (request.abortSignal && abortListener) { let uploadStreamDone = Promise.resolve(); - if (isReadableStream$1(body$1)) uploadStreamDone = isStreamComplete(body$1); + if (isReadableStream(body)) uploadStreamDone = isStreamComplete(body); let downloadStreamDone = Promise.resolve(); - if (isReadableStream$1(responseStream)) downloadStreamDone = isStreamComplete(responseStream); + if (isReadableStream(responseStream)) downloadStreamDone = isStreamComplete(responseStream); Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a$3; - if (abortListener) (_a$3 = request.abortSignal) === null || _a$3 === void 0 || _a$3.removeEventListener("abort", abortListener); + if (abortListener) request.abortSignal?.removeEventListener("abort", abortListener); }).catch((e) => { - log_js_1$9.logger.warning("Error when cleaning up abortListener on httpRequest", e); + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); }); } } } - makeRequest(request, abortController$1, body$1) { - var _a$2; - const url$1 = new URL(request.url); - const isInsecure = url$1.protocol !== "https:"; + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); - const agent = (_a$2 = request.agent) !== null && _a$2 !== void 0 ? _a$2 : this.getOrCreateAgent(request, isInsecure); - const options = Object.assign({ - agent, - hostname: url$1.hostname, - path: `${url$1.pathname}${url$1.search}`, - port: url$1.port, + const options = { + agent: request.agent ?? this.getOrCreateAgent(request, isInsecure), + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }, request.requestOverrides); + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; return new Promise((resolve, reject) => { - const req$1 = isInsecure ? http$2.request(options, resolve) : https$1.request(options, resolve); - req$1.once("error", (err) => { - var _a$3; - reject(new restError_js_1$7.RestError(err.message, { - code: (_a$3 = err.code) !== null && _a$3 !== void 0 ? _a$3 : restError_js_1$7.RestError.REQUEST_SEND_ERROR, + const req = isInsecure ? node_http_1.default.request(options, resolve) : node_https_1.default.request(options, resolve); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { + code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); }); - abortController$1.signal.addEventListener("abort", () => { - const abortError = new AbortError_js_1$4.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); - req$1.destroy(abortError); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); reject(abortError); }); - if (body$1 && isReadableStream$1(body$1)) body$1.pipe(req$1); - else if (body$1) if (typeof body$1 === "string" || Buffer.isBuffer(body$1)) req$1.end(body$1); - else if (isArrayBuffer(body$1)) req$1.end(ArrayBuffer.isView(body$1) ? Buffer.from(body$1.buffer) : Buffer.from(body$1)); + if (body && isReadableStream(body)) body.pipe(req); + else if (body) if (typeof body === "string" || Buffer.isBuffer(body)) req.end(body); + else if (isArrayBuffer(body)) req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); else { - log_js_1$9.logger.error("Unrecognized body type", body$1); - reject(new restError_js_1$7.RestError("Unrecognized body type")); + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); } - else req$1.end(); + else req.end(); }); } getOrCreateAgent(request, isInsecure) { - var _a$2; const disableKeepAlive = request.disableKeepAlive; if (isInsecure) { - if (disableKeepAlive) return http$2.globalAgent; - if (!this.cachedHttpAgent) this.cachedHttpAgent = new http$2.Agent({ keepAlive: true }); + if (disableKeepAlive) return node_http_1.default.globalAgent; + if (!this.cachedHttpAgent) this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); return this.cachedHttpAgent; } else { - if (disableKeepAlive && !request.tlsSettings) return https$1.globalAgent; - const tlsSettings = (_a$2 = request.tlsSettings) !== null && _a$2 !== void 0 ? _a$2 : DEFAULT_TLS_SETTINGS; + if (disableKeepAlive && !request.tlsSettings) return node_https_1.default.globalAgent; + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; let agent = this.cachedHttpsAgents.get(tlsSettings); if (agent && agent.options.keepAlive === !disableKeepAlive) return agent; - log_js_1$9.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https$1.Agent(Object.assign({ keepAlive: !disableKeepAlive }, tlsSettings)); + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + keepAlive: !disableKeepAlive, + ...tlsSettings + }); this.cachedHttpsAgents.set(tlsSettings, agent); return agent; } } }; function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1$6.createHttpHeaders)(); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); for (const header of Object.keys(res.headers)) { const value = res.headers[header]; if (Array.isArray(value)) { @@ -3532,42 +3860,42 @@ var require_nodeHttpClient = __commonJS({ "node_modules/.deno/@typespec+ts-http- } return headers; } - function getDecodedResponseStream(stream$3, headers) { + function getDecodedResponseStream(stream, headers) { const contentEncoding = headers.get("Content-Encoding"); if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream$3.pipe(unzip); + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); return unzip; } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream$3.pipe(inflate); + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); return inflate; } - return stream$3; + return stream; } - function streamToText(stream$3) { + function streamToText(stream) { return new Promise((resolve, reject) => { - const buffer$2 = []; - stream$3.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) buffer$2.push(chunk); - else buffer$2.push(Buffer.from(chunk)); + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) buffer.push(chunk); + else buffer.push(Buffer.from(chunk)); }); - stream$3.on("end", () => { - resolve(Buffer.concat(buffer$2).toString("utf8")); + stream.on("end", () => { + resolve(Buffer.concat(buffer).toString("utf8")); }); - stream$3.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") reject(e); - else reject(new restError_js_1$7.RestError(`Error reading response as text: ${e.message}`, { code: restError_js_1$7.RestError.PARSE_ERROR })); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") reject(e); + else reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { code: restError_js_1.RestError.PARSE_ERROR })); }); }); } /** @internal */ - function getBodyLength(body$1) { - if (!body$1) return 0; - else if (Buffer.isBuffer(body$1)) return body$1.length; - else if (isReadableStream$1(body$1)) return null; - else if (isArrayBuffer(body$1)) return body$1.byteLength; - else if (typeof body$1 === "string") return Buffer.from(body$1).length; + function getBodyLength(body) { + if (!body) return 0; + else if (Buffer.isBuffer(body)) return body.length; + else if (isReadableStream(body)) return null; + else if (isArrayBuffer(body)) return body.byteLength; + else if (typeof body === "string") return Buffer.from(body).length; else return null; } /** @@ -3577,30 +3905,30 @@ var require_nodeHttpClient = __commonJS({ "node_modules/.deno/@typespec+ts-http- function createNodeHttpClient() { return new NodeHttpClient(); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.createDefaultHttpClient = createDefaultHttpClient$1; + exports.createDefaultHttpClient = createDefaultHttpClient; const nodeHttpClient_js_1 = require_nodeHttpClient(); /** * Create the correct HttpClient for the current environment. */ - function createDefaultHttpClient$1() { + function createDefaultHttpClient() { return (0, nodeHttpClient_js_1.createNodeHttpClient)(); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js -var require_logPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.logPolicyName = void 0; - exports.logPolicy = logPolicy$1; - const log_js_1$8 = require_log$2(); - const sanitizer_js_1$1 = require_sanitizer(); + exports.logPolicy = logPolicy; + const log_js_1 = require_log$4(); + const sanitizer_js_1 = require_sanitizer(); /** * The programmatic identifier of the logPolicy. */ @@ -3609,33 +3937,32 @@ var require_logPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-run * A policy that logs all requests and responses. * @param options - Options to configure logPolicy. */ - function logPolicy$1(options = {}) { - var _a$2; - const logger$2 = (_a$2 = options.logger) !== null && _a$2 !== void 0 ? _a$2 : log_js_1$8.logger.info; - const sanitizer = new sanitizer_js_1$1.Sanitizer({ + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); return { name: exports.logPolicyName, async sendRequest(request, next) { - if (!logger$2.enabled) return next(request); - logger$2(`Request: ${sanitizer.sanitize(request)}`); + if (!logger.enabled) return next(request); + logger(`Request: ${sanitizer.sanitize(request)}`); const response = await next(request); - logger$2(`Response status code: ${response.status}`); - logger$2(`Headers: ${sanitizer.sanitize(response.headers)}`); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); return response; } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.redirectPolicyName = void 0; - exports.redirectPolicy = redirectPolicy$1; + exports.redirectPolicy = redirectPolicy; /** * The programmatic identifier of the redirectPolicy. */ @@ -3650,13 +3977,12 @@ var require_redirectPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-htt * In the browser, this policy is not used. * @param options - Options to control policy behavior. */ - function redirectPolicy$1(options = {}) { + function redirectPolicy(options = {}) { const { maxRetries = 20 } = options; return { name: exports.redirectPolicyName, async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); + return handleRedirect(next, await next(request), maxRetries); } }; } @@ -3664,68 +3990,66 @@ var require_redirectPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-htt const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url$1 = new URL(locationHeader, request.url); - request.url = url$1.toString(); + request.url = new URL(locationHeader, request.url).toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); delete request.body; } request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); + return handleRedirect(next, await next(request), maxRetries, currentRetries + 1); } return response; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.getHeaderName = getHeaderName$1; - exports.setPlatformSpecificData = setPlatformSpecificData$1; - const tslib_1$6 = require_tslib(); - const os$2 = tslib_1$6.__importStar(__require("node:os")); - const process$3 = tslib_1$6.__importStar(__require("node:process")); + exports.getHeaderName = getHeaderName; + exports.setPlatformSpecificData = setPlatformSpecificData; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const node_os_1$1 = tslib_1.__importDefault(__require("node:os")); + const node_process_1$1 = tslib_1.__importDefault(__require("node:process")); /** * @internal */ - function getHeaderName$1() { + function getHeaderName() { return "User-Agent"; } /** * @internal */ - async function setPlatformSpecificData$1(map) { - if (process$3 && process$3.versions) { - const versions = process$3.versions; - if (versions.bun) map.set("Bun", versions.bun); - else if (versions.deno) map.set("Deno", versions.deno); - else if (versions.node) map.set("Node", versions.node); + async function setPlatformSpecificData(map) { + if (node_process_1$1.default && node_process_1$1.default.versions) { + const osInfo = `${node_os_1$1.default.type()} ${node_os_1$1.default.release()}; ${node_os_1$1.default.arch()}`; + const versions = node_process_1$1.default.versions; + if (versions.bun) map.set("Bun", `${versions.bun} (${osInfo})`); + else if (versions.deno) map.set("Deno", `${versions.deno} (${osInfo})`); + else if (versions.node) map.set("Node", `${versions.node} (${osInfo})`); } - map.set("OS", `(${os$2.arch()}-${os$2.type()}-${os$2.release()})`); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js -var require_constants$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; - exports.SDK_VERSION = "0.2.2"; + exports.SDK_VERSION = "0.3.3"; exports.DEFAULT_RETRY_POLICY_COUNT = 3; -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js -var require_userAgent$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.getUserAgentHeaderName = getUserAgentHeaderName$1; - exports.getUserAgentValue = getUserAgentValue$1; - const userAgentPlatform_js_1$1 = require_userAgentPlatform$1(); - const constants_js_1$11 = require_constants$2(); - function getUserAgentString$2(telemetryInfo) { + exports.getUserAgentHeaderName = getUserAgentHeaderName; + exports.getUserAgentValue = getUserAgentValue; + const userAgentPlatform_js_1 = require_userAgentPlatform$1(); + const constants_js_1 = require_constants$4(); + function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { const token = value ? `${key}/${value}` : key; @@ -3736,30 +4060,29 @@ var require_userAgent$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-run /** * @internal */ - function getUserAgentHeaderName$1() { - return (0, userAgentPlatform_js_1$1.getHeaderName)(); + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); } /** * @internal */ - async function getUserAgentValue$1(prefix$1) { - const runtimeInfo = new Map(); - runtimeInfo.set("ts-http-runtime", constants_js_1$11.SDK_VERSION); - await (0, userAgentPlatform_js_1$1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString$2(runtimeInfo); - const userAgentValue = prefix$1 ? `${prefix$1} ${defaultAgent}` : defaultAgent; - return userAgentValue; + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + return prefix ? `${prefix} ${defaultAgent}` : defaultAgent; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.userAgentPolicyName = void 0; - exports.userAgentPolicy = userAgentPolicy$1; - const userAgent_js_1$2 = require_userAgent$1(); - const UserAgentHeaderName$1 = (0, userAgent_js_1$2.getUserAgentHeaderName)(); + exports.userAgentPolicy = userAgentPolicy; + const userAgent_js_1 = require_userAgent$1(); + const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** * The programmatic identifier of the userAgentPolicy. */ @@ -3769,24 +4092,24 @@ var require_userAgentPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-ht * the library version. * @param options - Options to customize the user agent value. */ - function userAgentPolicy$1(options = {}) { - const userAgentValue = (0, userAgent_js_1$2.getUserAgentValue)(options.userAgentPrefix); + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); return { name: exports.userAgentPolicyName, async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName$1)) request.headers.set(UserAgentHeaderName$1, await userAgentValue); + if (!request.headers.has(UserAgentHeaderName)) request.headers.set(UserAgentHeaderName, await userAgentValue); return next(request); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.decompressResponsePolicyName = void 0; - exports.decompressResponsePolicy = decompressResponsePolicy$1; + exports.decompressResponsePolicy = decompressResponsePolicy; /** * The programmatic identifier of the decompressResponsePolicy. */ @@ -3795,7 +4118,7 @@ var require_decompressResponsePolicy$1 = __commonJS({ "node_modules/.deno/@types * A policy to enable response decompression according to Accept-Encoding header * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding */ - function decompressResponsePolicy$1() { + function decompressResponsePolicy() { return { name: exports.decompressResponsePolicyName, async sendRequest(request, next) { @@ -3804,13 +4127,13 @@ var require_decompressResponsePolicy$1 = __commonJS({ "node_modules/.deno/@types } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js -var require_random = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.getRandomIntegerInclusive = getRandomIntegerInclusive$1; + exports.getRandomIntegerInclusive = getRandomIntegerInclusive; /** * Returns a random integer value between a lower and upper bound, * inclusive of both bounds. @@ -3819,42 +4142,40 @@ var require_random = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@ * @param min - The smallest integer value allowed. * @param max - The largest integer value allowed. */ - function getRandomIntegerInclusive$1(min, max) { + function getRandomIntegerInclusive(min, max) { min = Math.ceil(min); max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; + return Math.floor(Math.random() * (max - min + 1)) + min; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js -var require_delay$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.calculateRetryDelay = calculateRetryDelay$2; - const random_js_1$1 = require_random(); + exports.calculateRetryDelay = calculateRetryDelay; + const random_js_1 = require_random(); /** * Calculates the delay interval for retry attempts using exponential delay with jitter. * @param retryAttempt - The current retry attempt number. * @param config - The exponential retry configuration. * @returns An object containing the calculated retry delay. */ - function calculateRetryDelay$2(retryAttempt, config) { + function calculateRetryDelay(retryAttempt, config) { const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1$1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; + return { retryAfterInMs: clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2) }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js -var require_helpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.delay = delay$3; + exports.delay = delay; exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - const AbortError_js_1$3 = require_AbortError$1(); - const StandardAbortMessage$1 = "The operation was aborted."; + const AbortError_js_1 = require_AbortError$1(); + const StandardAbortMessage = "The operation was aborted."; /** * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. * @param delayInMs - The number of milliseconds to be delayed. @@ -3864,27 +4185,27 @@ var require_helpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti * - abortErrorMsg - The abort error message associated with containing operation. * @returns Resolved promise */ - function delay$3(delayInMs, value, options) { + function delay(delayInMs, value, options) { return new Promise((resolve, reject) => { let timer = void 0; let onAborted = void 0; const rejectOnAbort = () => { - return reject(new AbortError_js_1$3.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage$1)); + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); }; const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) options.abortSignal.removeEventListener("abort", onAborted); + if (options?.abortSignal && onAborted) options.abortSignal.removeEventListener("abort", onAborted); }; onAborted = () => { if (timer) clearTimeout(timer); removeListeners(); return rejectOnAbort(); }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) return rejectOnAbort(); + if (options?.abortSignal && options.abortSignal.aborted) return rejectOnAbort(); timer = setTimeout(() => { removeListeners(); resolve(value); }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) options.abortSignal.addEventListener("abort", onAborted); + if (options?.abortSignal) options.abortSignal.addEventListener("abort", onAborted); }); } /** @@ -3898,15 +4219,15 @@ var require_helpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti if (Number.isNaN(valueAsNum)) return; return valueAsNum; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isThrottlingRetryResponse = isThrottlingRetryResponse; exports.throttlingRetryStrategy = throttlingRetryStrategy; - const helpers_js_1$1 = require_helpers$1(); + const helpers_js_1 = require_helpers$1(); /** * The header that comes back from services representing * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). @@ -3937,19 +4258,15 @@ var require_throttlingRetryStrategy = __commonJS({ "node_modules/.deno/@typespec if (!(response && [429, 503].includes(response.status))) return void 0; try { for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1$1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) return retryAfterValue * (header === RetryAfterHeader ? 1e3 : 1); } const retryAfterHeader = response.headers.get(RetryAfterHeader); if (!retryAfterHeader) return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); + const diff = Date.parse(retryAfterHeader) - Date.now(); return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a$2) { - return void 0; + } catch { + return; } } /** @@ -3969,17 +4286,17 @@ var require_throttlingRetryStrategy = __commonJS({ "node_modules/.deno/@typespec } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.exponentialRetryStrategy = exponentialRetryStrategy; exports.isExponentialRetryResponse = isExponentialRetryResponse; exports.isSystemError = isSystemError; - const delay_js_1$2 = require_delay$1(); - const throttlingRetryStrategy_js_1$2 = require_throttlingRetryStrategy(); + const delay_js_1 = require_delay$1(); + const throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); const DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; /** @@ -3988,9 +4305,8 @@ var require_exponentialRetryStrategy = __commonJS({ "node_modules/.deno/@typespe * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). */ function exponentialRetryStrategy(options = {}) { - var _a$2, _b$1; - const retryInterval = (_a$2 = options.retryDelayInMs) !== null && _a$2 !== void 0 ? _a$2 : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b$1 = options.maxRetryDelayInMs) !== null && _b$1 !== void 0 ? _b$1 : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; return { name: "exponentialRetryStrategy", retry({ retryCount, response, responseError }) { @@ -3998,10 +4314,9 @@ var require_exponentialRetryStrategy = __commonJS({ "node_modules/.deno/@typespe const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; const isExponential = isExponentialRetryResponse(response); const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1$2.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) return { skipStrategy: true }; + if (response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential) || ignoreExponentialResponse || ignoreSystemErrors) return { skipStrategy: true }; if (responseError && !matchedSystemError && !isExponential) return { errorToThrow: responseError }; - return (0, delay_js_1$2.calculateRetryDelay)(retryCount, { + return (0, delay_js_1.calculateRetryDelay)(retryCount, { retryDelayInMs: retryInterval, maxRetryDelayInMs: maxRetryInterval }); @@ -4023,18 +4338,18 @@ var require_exponentialRetryStrategy = __commonJS({ "node_modules/.deno/@typespe if (!err) return false; return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.retryPolicy = retryPolicy$1; + exports.retryPolicy = retryPolicy; const helpers_js_1 = require_helpers$1(); - const AbortError_js_1$2 = require_AbortError$1(); - const logger_js_1$5 = require_logger$1(); - const constants_js_1$10 = require_constants$2(); - const retryPolicyLogger$1 = (0, logger_js_1$5.createClientLogger)("ts-http-runtime retryPolicy"); + const AbortError_js_1 = require_AbortError$1(); + const logger_js_1 = require_logger$1(); + const constants_js_1 = require_constants$4(); + const retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); /** * The programmatic identifier of the retryPolicy. */ @@ -4042,12 +4357,11 @@ var require_retryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r /** * retryPolicy is a generic policy to enable retrying requests when certain conditions are met */ - function retryPolicy$1(strategies, options = { maxRetries: constants_js_1$10.DEFAULT_RETRY_POLICY_COUNT }) { - const logger$2 = options.logger || retryPolicyLogger$1; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; return { name: retryPolicyName, async sendRequest(request, next) { - var _a$2, _b$1; let response; let responseError; let retryCount = -1; @@ -4056,29 +4370,28 @@ var require_retryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r response = void 0; responseError = void 0; try { - logger$2.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); response = await next(request); - logger$2.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); } catch (e) { - logger$2.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); responseError = e; if (!e || responseError.name !== "RestError") throw e; response = responseError.response; } - if ((_a$2 = request.abortSignal) === null || _a$2 === void 0 ? void 0 : _a$2.aborted) { - logger$2.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new AbortError_js_1$2.AbortError(); - throw abortError; + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + throw new AbortError_js_1.AbortError(); } - if (retryCount >= ((_b$1 = options.maxRetries) !== null && _b$1 !== void 0 ? _b$1 : constants_js_1$10.DEFAULT_RETRY_POLICY_COUNT)) { - logger$2.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); if (responseError) throw responseError; else if (response) return response; else throw new Error("Maximum retries reached with no response or error to throw"); } - logger$2.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || logger$2; + const strategyLogger = strategy.logger || logger; strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); const modifiers = strategy.retry({ retryCount, @@ -4106,29 +4419,29 @@ var require_retryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r } } if (responseError) { - logger$2.info(`None of the retry strategies could work with the received error. Throwing it.`); + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); throw responseError; } if (response) { - logger$2.info(`None of the retry strategies could work with the received response. Returning it.`); + logger.info(`None of the retry strategies could work with the received response. Returning it.`); return response; } } } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultRetryPolicyName = void 0; - exports.defaultRetryPolicy = defaultRetryPolicy$1; - const exponentialRetryStrategy_js_1$2 = require_exponentialRetryStrategy(); - const throttlingRetryStrategy_js_1$1 = require_throttlingRetryStrategy(); - const retryPolicy_js_1$5 = require_retryPolicy$1(); - const constants_js_1$9 = require_constants$2(); + exports.defaultRetryPolicy = defaultRetryPolicy; + const exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + const throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + const retryPolicy_js_1 = require_retryPolicy$1(); + const constants_js_1 = require_constants$4(); /** * Name of the {@link defaultRetryPolicy} */ @@ -4139,19 +4452,17 @@ var require_defaultRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. */ - function defaultRetryPolicy$1(options = {}) { - var _a$2; + function defaultRetryPolicy(options = {}) { return { name: exports.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1$5.retryPolicy)([(0, throttlingRetryStrategy_js_1$1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1$2.exponentialRetryStrategy)(options)], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$9.DEFAULT_RETRY_POLICY_COUNT }).sendRequest + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js -var require_checkEnvironment = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports) { - var _a, _b, _c, _d; +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; /** @@ -4161,7 +4472,7 @@ var require_checkEnvironment = __commonJS({ "node_modules/.deno/@typespec+ts-htt /** * A constant that indicates whether the environment the code is running is a Web Worker. */ - exports.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); + exports.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); /** * A constant that indicates whether the environment the code is running is Deno. */ @@ -4173,7 +4484,7 @@ var require_checkEnvironment = __commonJS({ "node_modules/.deno/@typespec+ts-htt /** * A constant that indicates whether the environment the code is running is a Node.js compatible environment. */ - exports.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); + exports.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); /** * A constant that indicates whether the environment the code is running is Node.JS. */ @@ -4181,27 +4492,26 @@ var require_checkEnvironment = __commonJS({ "node_modules/.deno/@typespec+ts-htt /** * A constant that indicates whether the environment the code is running is in React-Native. */ - exports.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; -} }); + exports.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js -var require_formDataPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.formDataPolicyName = void 0; - exports.formDataPolicy = formDataPolicy$1; - const bytesEncoding_js_1$5 = require_bytesEncoding(); - const checkEnvironment_js_1$3 = require_checkEnvironment(); - const httpHeaders_js_1$5 = require_httpHeaders$1(); + exports.formDataPolicy = formDataPolicy; + const bytesEncoding_js_1 = require_bytesEncoding(); + const checkEnvironment_js_1 = require_checkEnvironment(); + const httpHeaders_js_1 = require_httpHeaders$1(); /** * The programmatic identifier of the formDataPolicy. */ exports.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a$2; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a$2 = formDataMap[key]) !== null && _a$2 !== void 0 || (formDataMap[key] = []); + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -4209,17 +4519,17 @@ var require_formDataPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-htt /** * A policy that encodes FormData on the request into the body. */ - function formDataPolicy$1() { + function formDataPolicy() { return { name: exports.formDataPolicyName, async sendRequest(request, next) { - if (checkEnvironment_js_1$3.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } if (request.formData) { - const contentType$1 = request.headers.get("Content-Type"); - if (contentType$1 && contentType$1.indexOf("application/x-www-form-urlencoded") !== -1) request.body = wwwFormUrlEncode(request.formData); + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) request.body = wwwFormUrlEncode(request.formData); else await prepareFormData(request.formData, request); request.formData = void 0; } @@ -4234,18 +4544,18 @@ var require_formDataPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-htt return urlSearchParams.toString(); } async function prepareFormData(formData, request) { - const contentType$1 = request.headers.get("Content-Type"); - if (contentType$1 && !contentType$1.startsWith("multipart/form-data")) return; - request.headers.set("Content-Type", contentType$1 !== null && contentType$1 !== void 0 ? contentType$1 : "multipart/form-data"); + const contentType = request.headers.get("Content-Type"); + if (contentType && !contentType.startsWith("multipart/form-data")) return; + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) for (const value of Array.isArray(values) ? values : [values]) if (typeof value === "string") parts.push({ - headers: (0, httpHeaders_js_1$5.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, bytesEncoding_js_1$5.stringToUint8Array)(value, "utf-8") + headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); else if (value === void 0 || value === null || typeof value !== "object") throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); else { const fileName = value.name || "blob"; - const headers = (0, httpHeaders_js_1$5.createHttpHeaders)(); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); headers.set("Content-Type", value.type || "application/octet-stream"); parts.push({ @@ -4255,11 +4565,11 @@ var require_formDataPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-htt } request.multipartBody = { parts }; } -} }); +})); //#endregion //#region node_modules/.deno/ms@2.1.3/node_modules/ms/index.js -var require_ms = __commonJS({ "node_modules/.deno/ms@2.1.3/node_modules/ms/index.js"(exports, module) { +var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** * Helpers. */ @@ -4285,7 +4595,7 @@ var require_ms = __commonJS({ "node_modules/.deno/ms@2.1.3/node_modules/ms/index module.exports = function(val, options) { options = options || {}; var type = typeof val; - if (type === "string" && val.length > 0) return parse$1(val); + if (type === "string" && val.length > 0) return parse(val); else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val); throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); }; @@ -4296,14 +4606,13 @@ var require_ms = __commonJS({ "node_modules/.deno/ms@2.1.3/node_modules/ms/index * @return {Number} * @api private */ - function parse$1(str) { + function parse(str) { str = String(str); if (str.length > 100) return; - var match$2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - if (!match$2) return; - var n = parseFloat(match$2[1]); - var type = (match$2[2] || "ms").toLowerCase(); - switch (type) { + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + if (!match) return; + var n = parseFloat(match[1]); + switch ((match[2] || "ms").toLowerCase()) { case "years": case "year": case "yrs": @@ -4335,7 +4644,7 @@ var require_ms = __commonJS({ "node_modules/.deno/ms@2.1.3/node_modules/ms/index case "msecs": case "msec": case "ms": return n; - default: return void 0; + default: return; } } /** @@ -4375,11 +4684,11 @@ var require_ms = __commonJS({ "node_modules/.deno/ms@2.1.3/node_modules/ms/index var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); } -} }); +})); //#endregion -//#region node_modules/.deno/debug@4.4.1/node_modules/debug/src/common.js -var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/debug/src/common.js"(exports, module) { +//#region node_modules/.deno/debug@4.4.3/node_modules/debug/src/common.js +var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. @@ -4388,11 +4697,11 @@ var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/d createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; - createDebug.disable = disable$1; - createDebug.enable = enable$1; - createDebug.enabled = enabled$1; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; createDebug.humanize = require_ms(); - createDebug.destroy = destroy$1; + createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); @@ -4434,40 +4743,38 @@ var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/d let enableOverride = null; let namespacesCache; let enabledCache; - function debug$3(...args) { - if (!debug$3.enabled) return; - const self$1 = debug$3; - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self$1.diff = ms; - self$1.prev = prevTime; - self$1.curr = curr; + function debug(...args) { + if (!debug.enabled) return; + const self = debug; + const curr = Number(/* @__PURE__ */ new Date()); + self.diff = curr - (prevTime || curr); + self.prev = prevTime; + self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") args.unshift("%O"); let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match$2, format) => { - if (match$2 === "%%") return "%"; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") return "%"; index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { const val = args[index]; - match$2 = formatter.call(self$1, val); + match = formatter.call(self, val); args.splice(index, 1); index--; } - return match$2; + return match; }); - createDebug.formatArgs.call(self$1, args); - const logFn = self$1.log || createDebug.log; - logFn.apply(self$1, args); - } - debug$3.namespace = namespace; - debug$3.useColors = createDebug.useColors(); - debug$3.color = createDebug.selectColor(namespace); - debug$3.extend = extend$1; - debug$3.destroy = createDebug.destroy; - Object.defineProperty(debug$3, "enabled", { + createDebug.formatArgs.call(self, args); + (self.log || createDebug.log).apply(self, args); + } + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; + Object.defineProperty(debug, "enabled", { enumerable: true, configurable: false, get: () => { @@ -4482,11 +4789,11 @@ var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/d enableOverride = v; } }); - if (typeof createDebug.init === "function") createDebug.init(debug$3); - return debug$3; + if (typeof createDebug.init === "function") createDebug.init(debug); + return debug; } - function extend$1(namespace, delimiter$1) { - const newDebug = createDebug(this.namespace + (typeof delimiter$1 === "undefined" ? ":" : delimiter$1) + namespace); + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } @@ -4497,7 +4804,7 @@ var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/d * @param {String} namespaces * @api public */ - function enable$1(namespaces) { + function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; @@ -4541,7 +4848,7 @@ var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/d * @return {String} namespaces * @api public */ - function disable$1() { + function disable() { const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(","); createDebug.enable(""); return namespaces; @@ -4553,7 +4860,7 @@ var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/d * @return {Boolean} * @api public */ - function enabled$1(name) { + function enabled(name) { for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false; for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true; return false; @@ -4573,25 +4880,25 @@ var require_common = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/d * XXX DO NOT USE. This is a temporary stub function. * XXX It WILL be removed in the next major release. */ - function destroy$1() { + function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } createDebug.enable(createDebug.load()); return createDebug; } module.exports = setup; -} }); +})); //#endregion -//#region node_modules/.deno/debug@4.4.1/node_modules/debug/src/browser.js -var require_browser = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/debug/src/browser.js"(exports, module) { +//#region node_modules/.deno/debug@4.4.3/node_modules/debug/src/browser.js +var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** * This is the web browser implementation of `debug()`. */ - exports.formatArgs = formatArgs$1; - exports.save = save$1; - exports.load = load$1; - exports.useColors = useColors$1; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = (() => { let warned = false; @@ -4690,28 +4997,28 @@ var require_browser = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/ * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ - function useColors$1() { + function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true; if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false; - let m$1; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m$1 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m$1[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + let m; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } /** * Colorize log arguments if enabled. * * @api public */ - function formatArgs$1(args) { + function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff); if (!this.useColors) return; const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); let index = 0; let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match$2) => { - if (match$2 === "%%") return; + args[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") return; index++; - if (match$2 === "%c") lastC = index; + if (match === "%c") lastC = index; }); args.splice(lastC, 0, c); } @@ -4730,7 +5037,7 @@ var require_browser = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/ * @param {String} namespaces * @api private */ - function save$1(namespaces) { + function save(namespaces) { try { if (namespaces) exports.storage.setItem("debug", namespaces); else exports.storage.removeItem("debug"); @@ -4742,7 +5049,7 @@ var require_browser = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/ * @return {String} returns the previously persisted debug modes * @api private */ - function load$1() { + function load() { let r; try { r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG"); @@ -4766,27 +5073,27 @@ var require_browser = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/ } catch (error) {} } module.exports = require_common()(exports); - const { formatters: formatters$1 } = module.exports; + const { formatters } = module.exports; /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ - formatters$1.j = function(v) { + formatters.j = function(v) { try { return JSON.stringify(v); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; -} }); +})); //#endregion -//#region node_modules/.deno/debug@4.4.1/node_modules/debug/src/node.js -var require_node = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/debug/src/node.js"(exports, module) { +//#region node_modules/.deno/debug@4.4.3/node_modules/debug/src/node.js +var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** * Module dependencies. */ const tty = __require("tty"); - const util$3 = __require("util"); + const util$1 = __require("util"); /** * This is the Node.js implementation of `debug()`. */ @@ -4796,7 +5103,7 @@ var require_node = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/deb exports.save = save; exports.load = load; exports.useColors = useColors; - exports.destroy = util$3.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + exports.destroy = util$1.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); /** * Colors. */ @@ -4920,24 +5227,24 @@ var require_node = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/deb * @api public */ function formatArgs(args) { - const { namespace: name, useColors: useColors$2 } = this; - if (useColors$2) { + const { namespace: name, useColors } = this; + if (useColors) { const c = this.color; const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); - const prefix$1 = ` ${colorCode};1m${name} \u001B[0m`; - args[0] = prefix$1 + args[0].split("\n").join("\n" + prefix$1); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m"); } else args[0] = getDate() + name + " " + args[0]; } function getDate() { if (exports.inspectOpts.hideDate) return ""; - return new Date().toISOString() + " "; + return (/* @__PURE__ */ new Date()).toISOString() + " "; } /** * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. */ function log(...args) { - return process.stderr.write(util$3.formatWithOptions(exports.inspectOpts, ...args) + "\n"); + return process.stderr.write(util$1.formatWithOptions(exports.inspectOpts, ...args) + "\n"); } /** * Save `namespaces`. @@ -4964,10 +5271,10 @@ var require_node = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/deb * Create a new `inspectOpts` object in case `useColors` is set * differently for a particular `debug` instance. */ - function init(debug$3) { - debug$3.inspectOpts = {}; + function init(debug) { + debug.inspectOpts = {}; const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) debug$3.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + for (let i = 0; i < keys.length; i++) debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } module.exports = require_common()(exports); const { formatters } = module.exports; @@ -4976,79 +5283,78 @@ var require_node = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/deb */ formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util$3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + return util$1.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; /** * Map %O to `util.inspect()`, allowing multiple lines if needed. */ formatters.O = function(v) { this.inspectOpts.colors = this.useColors; - return util$3.inspect(v, this.inspectOpts); + return util$1.inspect(v, this.inspectOpts); }; -} }); +})); //#endregion -//#region node_modules/.deno/debug@4.4.1/node_modules/debug/src/index.js -var require_src = __commonJS({ "node_modules/.deno/debug@4.4.1/node_modules/debug/src/index.js"(exports, module) { +//#region node_modules/.deno/debug@4.4.3/node_modules/debug/src/index.js +var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** * Detect Electron renderer / nwjs process, which is node, but we should * treat as a browser. */ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module.exports = require_browser(); else module.exports = require_node(); -} }); +})); //#endregion -//#region node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js -var require_helpers = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports) { - var __createBinding$17 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js +var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } }; Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$17 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$17 = exports && exports.__importStar || function(mod) { + var __importStar = exports && exports.__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$17(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } - __setModuleDefault$17(result, mod); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.req = exports.json = exports.toBuffer = void 0; - const http$1 = __importStar$17(__require("http")); - const https = __importStar$17(__require("https")); - async function toBuffer(stream$3) { + const http$1 = __importStar(__require("http")); + const https = __importStar(__require("https")); + async function toBuffer(stream) { let length = 0; const chunks = []; - for await (const chunk of stream$3) { + for await (const chunk of stream) { length += chunk.length; chunks.push(chunk); } return Buffer.concat(chunks, length); } exports.toBuffer = toBuffer; - async function json(stream$3) { - const buf = await toBuffer(stream$3); - const str = buf.toString("utf8"); + async function json(stream) { + const str = (await toBuffer(stream)).toString("utf8"); try { return JSON.parse(str); } catch (_err) { @@ -5058,59 +5364,58 @@ var require_helpers = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_mod } } exports.json = json; - function req(url$1, opts = {}) { - const href = typeof url$1 === "string" ? url$1 : url$1.href; - const req$1 = (href.startsWith("https:") ? https : http$1).request(url$1, opts); + function req(url, opts = {}) { + const req = ((typeof url === "string" ? url : url.href).startsWith("https:") ? https : http$1).request(url, opts); const promise = new Promise((resolve, reject) => { - req$1.once("response", resolve).once("error", reject).end(); + req.once("response", resolve).once("error", reject).end(); }); - req$1.then = promise.then.bind(promise); - return req$1; + req.then = promise.then.bind(promise); + return req; } exports.req = req; -} }); +})); //#endregion -//#region node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/index.js -var require_dist$4 = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/index.js"(exports) { - var __createBinding$16 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/agent-base@7.1.4/node_modules/agent-base/dist/index.js +var require_dist$3 = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } }; Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$16 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$16 = exports && exports.__importStar || function(mod) { + var __importStar = exports && exports.__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$16(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } - __setModuleDefault$16(result, mod); + __setModuleDefault(result, mod); return result; }; - var __exportStar = exports && exports.__exportStar || function(m$1, exports$1) { - for (var p in m$1) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding$16(exports$1, m$1, p); + var __exportStar = exports && exports.__exportStar || function(m, exports$1) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Agent = void 0; - const net$2 = __importStar$16(__require("net")); - const http = __importStar$16(__require("http")); + const net$2 = __importStar(__require("net")); + const http = __importStar(__require("http")); const https_1 = __require("https"); __exportStar(require_helpers(), exports); const INTERNAL = Symbol("AgentBaseInternalState"); @@ -5127,7 +5432,7 @@ var require_dist$4 = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_modu if (typeof options.secureEndpoint === "boolean") return options.secureEndpoint; if (typeof options.protocol === "string") return options.protocol === "https:"; } - const { stack } = new Error(); + const { stack } = /* @__PURE__ */ new Error(); if (typeof stack !== "string") return false; return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); } @@ -5150,26 +5455,25 @@ var require_dist$4 = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_modu } } getName(options) { - const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options); - if (secureEndpoint) return https_1.Agent.prototype.getName.call(this, options); + if (this.isSecureEndpoint(options)) return https_1.Agent.prototype.getName.call(this, options); return super.getName(options); } - createSocket(req$1, options, cb) { + createSocket(req, options, cb) { const connectOpts = { ...options, secureEndpoint: this.isSecureEndpoint(options) }; const name = this.getName(connectOpts); const fakeSocket = this.incrementSockets(name); - Promise.resolve().then(() => this.connect(req$1, connectOpts)).then((socket) => { + Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => { this.decrementSockets(name, fakeSocket); if (socket instanceof http.Agent) try { - return socket.addRequest(req$1, connectOpts); + return socket.addRequest(req, connectOpts); } catch (err) { return cb(err); } this[INTERNAL].currentSocket = socket; - super.createSocket(req$1, options, cb); + super.createSocket(req, options, cb); }, (err) => { this.decrementSockets(name, fakeSocket); cb(err); @@ -5195,18 +5499,17 @@ var require_dist$4 = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_modu } }; exports.Agent = Agent; -} }); +})); //#endregion //#region node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js -var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) { - var __importDefault$5 = exports && exports.__importDefault || function(mod) { +var require_parse_proxy_response = /* @__PURE__ */ __commonJSMin(((exports) => { + var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseProxyResponse = void 0; - const debug_1$2 = __importDefault$5(require_src()); - const debug$2 = (0, debug_1$2.default)("https-proxy-agent:parse-proxy-response"); + const debug = (0, __importDefault(require_src$1()).default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve, reject) => { let buffersLength = 0; @@ -5223,12 +5526,12 @@ var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy- } function onend() { cleanup(); - debug$2("onend"); - reject(new Error("Proxy connection ended before receiving CONNECT response")); + debug("onend"); + reject(/* @__PURE__ */ new Error("Proxy connection ended before receiving CONNECT response")); } function onerror(err) { cleanup(); - debug$2("onerror %o", err); + debug("onerror %o", err); reject(err); } function ondata(b) { @@ -5237,7 +5540,7 @@ var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy- const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { - debug$2("have not received end of HTTP headers yet..."); + debug("have not received end of HTTP headers yet..."); read(); return; } @@ -5245,7 +5548,7 @@ var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy- const firstLine = headerParts.shift(); if (!firstLine) { socket.destroy(); - return reject(new Error("No header received from proxy CONNECT response")); + return reject(/* @__PURE__ */ new Error("No header received from proxy CONNECT response")); } const firstLineParts = firstLine.split(" "); const statusCode = +firstLineParts[1]; @@ -5256,7 +5559,7 @@ var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy- const firstColon = header.indexOf(":"); if (firstColon === -1) { socket.destroy(); - return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + return reject(/* @__PURE__ */ new Error(`Invalid header from proxy CONNECT response: "${header}"`)); } const key = header.slice(0, firstColon).toLowerCase(); const value = header.slice(firstColon + 1).trimStart(); @@ -5265,7 +5568,7 @@ var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy- else if (Array.isArray(current)) current.push(value); else headers[key] = value; } - debug$2("got proxy server response: %o %o", firstLine, headers); + debug("got proxy server response: %o %o", firstLine, headers); cleanup(); resolve({ connect: { @@ -5282,55 +5585,55 @@ var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy- }); } exports.parseProxyResponse = parseProxyResponse; -} }); +})); //#endregion //#region node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js -var require_dist$3 = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports) { - var __createBinding$15 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } }; Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$15 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$15 = exports && exports.__importStar || function(mod) { + var __importStar = exports && exports.__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$15(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } - __setModuleDefault$15(result, mod); + __setModuleDefault(result, mod); return result; }; - var __importDefault$4 = exports && exports.__importDefault || function(mod) { + var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpsProxyAgent = void 0; - const net$1 = __importStar$15(__require("net")); - const tls$1 = __importStar$15(__require("tls")); - const assert_1$8 = __importDefault$4(__require("assert")); - const debug_1$1 = __importDefault$4(require_src()); - const agent_base_1$1 = require_dist$4(); + const net$1 = __importStar(__require("net")); + const tls$1 = __importStar(__require("tls")); + const assert_1 = __importDefault(__require("assert")); + const debug_1 = __importDefault(require_src$1()); + const agent_base_1 = require_dist$3(); const url_1$2 = __require("url"); const parse_proxy_response_1 = require_parse_proxy_response(); - const debug$1 = (0, debug_1$1.default)("https-proxy-agent"); + const debug = (0, debug_1.default)("https-proxy-agent"); const setServernameFromNonIpHost = (options) => { if (options.servername === void 0 && options.host && !net$1.isIP(options.host)) return { ...options, @@ -5350,18 +5653,18 @@ var require_dist$3 = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/no * `https:` requests have their socket connection upgraded to TLS once * the connection to the proxy server has been established. */ - var HttpsProxyAgent = class extends agent_base_1$1.Agent { + var HttpsProxyAgent = class extends agent_base_1.Agent { constructor(proxy, opts) { super(opts); this.options = { path: void 0 }; this.proxy = typeof proxy === "string" ? new url_1$2.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug$1("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { ALPNProtocols: ["http/1.1"], - ...opts ? omit$1(opts, "headers") : null, + ...opts ? omit(opts, "headers") : null, host, port }; @@ -5370,15 +5673,15 @@ var require_dist$3 = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/no * Called when the node-core HTTP client library is creating a * new HTTP request. */ - async connect(req$1, opts) { + async connect(req, opts) { const { proxy } = this; if (!opts.host) throw new TypeError("No \"host\" provided"); let socket; if (proxy.protocol === "https:") { - debug$1("Creating `tls.Socket`: %o", this.connectOpts); + debug("Creating `tls.Socket`: %o", this.connectOpts); socket = tls$1.connect(setServernameFromNonIpHost(this.connectOpts)); } else { - debug$1("Creating `net.Socket`: %o", this.connectOpts); + debug("Creating `net.Socket`: %o", this.connectOpts); socket = net$1.connect(this.connectOpts); } const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; @@ -5394,14 +5697,14 @@ var require_dist$3 = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/no const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); socket.write(`${payload}\r\n`); const { connect, buffered } = await proxyResponsePromise; - req$1.emit("proxyConnect", connect); - this.emit("proxyConnect", connect, req$1); + req.emit("proxyConnect", connect); + this.emit("proxyConnect", connect, req); if (connect.statusCode === 200) { - req$1.once("socket", resume); + req.once("socket", resume); if (opts.secureEndpoint) { - debug$1("Upgrading socket connection to TLS"); + debug("Upgrading socket connection to TLS"); return tls$1.connect({ - ...omit$1(setServernameFromNonIpHost(opts), "host", "path", "port"), + ...omit(setServernameFromNonIpHost(opts), "host", "path", "port"), socket }); } @@ -5410,11 +5713,11 @@ var require_dist$3 = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/no socket.destroy(); const fakeSocket = new net$1.Socket({ writable: false }); fakeSocket.readable = true; - req$1.once("socket", (s$1) => { - debug$1("Replaying proxy buffer for failed request"); - (0, assert_1$8.default)(s$1.listenerCount("data") > 0); - s$1.push(buffered); - s$1.push(null); + req.once("socket", (s) => { + debug("Replaying proxy buffer for failed request"); + (0, assert_1.default)(s.listenerCount("data") > 0); + s.push(buffered); + s.push(null); }); return fakeSocket; } @@ -5424,58 +5727,58 @@ var require_dist$3 = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/no function resume(socket) { socket.resume(); } - function omit$1(obj, ...keys) { + function omit(obj, ...keys) { const ret = {}; let key; for (key in obj) if (!keys.includes(key)) ret[key] = obj[key]; return ret; } -} }); +})); //#endregion //#region node_modules/.deno/http-proxy-agent@7.0.2/node_modules/http-proxy-agent/dist/index.js -var require_dist$2 = __commonJS({ "node_modules/.deno/http-proxy-agent@7.0.2/node_modules/http-proxy-agent/dist/index.js"(exports) { - var __createBinding$14 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } }; Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$14 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$14 = exports && exports.__importStar || function(mod) { + var __importStar = exports && exports.__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$14(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } - __setModuleDefault$14(result, mod); + __setModuleDefault(result, mod); return result; }; - var __importDefault$3 = exports && exports.__importDefault || function(mod) { + var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpProxyAgent = void 0; - const net = __importStar$14(__require("net")); - const tls = __importStar$14(__require("tls")); - const debug_1 = __importDefault$3(require_src()); - const events_1 = __require("events"); - const agent_base_1 = require_dist$4(); + const net = __importStar(__require("net")); + const tls = __importStar(__require("tls")); + const debug_1 = __importDefault(require_src$1()); + const events_1$2 = __require("events"); + const agent_base_1 = require_dist$3(); const url_1$1 = __require("url"); const debug = (0, debug_1.default)("http-proxy-agent"); /** @@ -5496,19 +5799,17 @@ var require_dist$2 = __commonJS({ "node_modules/.deno/http-proxy-agent@7.0.2/nod port }; } - addRequest(req$1, opts) { - req$1._header = null; - this.setRequestProps(req$1, opts); - super.addRequest(req$1, opts); + addRequest(req, opts) { + req._header = null; + this.setRequestProps(req, opts); + super.addRequest(req, opts); } - setRequestProps(req$1, opts) { + setRequestProps(req, opts) { const { proxy } = this; - const protocol = opts.secureEndpoint ? "https:" : "http:"; - const hostname = req$1.getHeader("host") || "localhost"; - const base = `${protocol}//${hostname}`; - const url$1 = new url_1$1.URL(req$1.path, base); - if (opts.port !== 80) url$1.port = String(opts.port); - req$1.path = String(url$1); + const base = `${opts.secureEndpoint ? "https:" : "http:"}//${req.getHeader("host") || "localhost"}`; + const url = new url_1$1.URL(req.path, base); + if (opts.port !== 80) url.port = String(opts.port); + req.path = String(url); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -5517,22 +5818,22 @@ var require_dist$2 = __commonJS({ "node_modules/.deno/http-proxy-agent@7.0.2/nod if (!headers["Proxy-Connection"]) headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; for (const name of Object.keys(headers)) { const value = headers[name]; - if (value) req$1.setHeader(name, value); + if (value) req.setHeader(name, value); } } - async connect(req$1, opts) { - req$1._header = null; - if (!req$1.path.includes("://")) this.setRequestProps(req$1, opts); + async connect(req, opts) { + req._header = null; + if (!req.path.includes("://")) this.setRequestProps(req, opts); let first; let endOfHeaders; debug("Regenerating stored HTTP header string for request"); - req$1._implicitHeader(); - if (req$1.outputData && req$1.outputData.length > 0) { + req._implicitHeader(); + if (req.outputData && req.outputData.length > 0) { debug("Patching connection write() output buffer with updated header"); - first = req$1.outputData[0].data; + first = req.outputData[0].data; endOfHeaders = first.indexOf("\r\n\r\n") + 4; - req$1.outputData[0].data = req$1._header + first.substring(endOfHeaders); - debug("Output buffer: %o", req$1.outputData[0].data); + req.outputData[0].data = req._header + first.substring(endOfHeaders); + debug("Output buffer: %o", req.outputData[0].data); } let socket; if (this.proxy.protocol === "https:") { @@ -5542,7 +5843,7 @@ var require_dist$2 = __commonJS({ "node_modules/.deno/http-proxy-agent@7.0.2/nod debug("Creating `net.Socket`: %o", this.connectOpts); socket = net.connect(this.connectOpts); } - await (0, events_1.once)(socket, "connect"); + await (0, events_1$2.once)(socket, "connect"); return socket; } }; @@ -5554,19 +5855,19 @@ var require_dist$2 = __commonJS({ "node_modules/.deno/http-proxy-agent@7.0.2/nod for (key in obj) if (!keys.includes(key)) ret[key] = obj[key]; return ret; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js -var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.globalNoProxyList = exports.proxyPolicyName = void 0; exports.loadNoProxy = loadNoProxy; - exports.getDefaultProxySettings = getDefaultProxySettings$1; - exports.proxyPolicy = proxyPolicy$1; - const https_proxy_agent_1 = require_dist$3(); - const http_proxy_agent_1 = require_dist$2(); - const log_js_1$7 = require_log$2(); + exports.getDefaultProxySettings = getDefaultProxySettings; + exports.proxyPolicy = proxyPolicy; + const https_proxy_agent_1 = require_dist$2(); + const http_proxy_agent_1 = require_dist$1(); + const log_js_1 = require_log$4(); const HTTPS_PROXY = "HTTPS_PROXY"; const HTTP_PROXY = "HTTP_PROXY"; const ALL_PROXY = "ALL_PROXY"; @@ -5582,14 +5883,13 @@ var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r exports.globalNoProxyList = []; let noProxyListLoaded = false; /** A cache of whether a host should bypass the proxy. */ - const globalBypassedMap = new Map(); + const globalBypassedMap = /* @__PURE__ */ new Map(); function getEnvironmentValue(name) { if (process.env[name]) return process.env[name]; else if (process.env[name.toLowerCase()]) return process.env[name.toLowerCase()]; - return void 0; } function loadEnvironmentProxyValue() { - if (!process) return void 0; + if (!process) return; const httpsProxy = getEnvironmentValue(HTTPS_PROXY); const allProxy = getEnvironmentValue(ALL_PROXY); const httpProxy = getEnvironmentValue(HTTP_PROXY); @@ -5603,13 +5903,13 @@ var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r function isBypassed(uri, noProxyList, bypassedMap) { if (noProxyList.length === 0) return false; const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) return bypassedMap.get(host); + if (bypassedMap?.has(host)) return bypassedMap.get(host); let isBypassedFlag = false; for (const pattern of noProxyList) if (pattern[0] === ".") { if (host.endsWith(pattern)) isBypassedFlag = true; else if (host.length === pattern.length - 1 && host === pattern.slice(1)) isBypassedFlag = true; } else if (host === pattern) isBypassedFlag = true; - bypassedMap === null || bypassedMap === void 0 || bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -5625,15 +5925,14 @@ var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r * @param proxyUrl - The url of the proxy to use. May contain authentication information. * @deprecated - Internally this method is no longer necessary when setting proxy information. */ - function getDefaultProxySettings$1(proxyUrl) { + function getDefaultProxySettings(proxyUrl) { if (!proxyUrl) { proxyUrl = loadEnvironmentProxyValue(); - if (!proxyUrl) return void 0; + if (!proxyUrl) return; } const parsedUrl = new URL(proxyUrl); - const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; return { - host: schema + parsedUrl.hostname, + host: (parsedUrl.protocol ? parsedUrl.protocol + "//" : "") + parsedUrl.hostname, port: Number.parseInt(parsedUrl.port || "80"), username: parsedUrl.username, password: parsedUrl.password @@ -5651,7 +5950,7 @@ var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a$2) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -5661,9 +5960,8 @@ var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r } function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { if (request.agent) return; - const url$1 = new URL(request.url); - const isInsecure = url$1.protocol !== "https:"; - if (request.tlsSettings) log_js_1$7.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + const isInsecure = new URL(request.url).protocol !== "https:"; + if (request.tlsSettings) log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); const headers = request.headers.toJSON(); if (isInsecure) { if (!cachedAgents.httpProxyAgent) cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); @@ -5680,28 +5978,27 @@ var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r * @param proxySettings - ProxySettings to use on each request. * @param options - additional settings, for example, custom NO_PROXY patterns */ - function proxyPolicy$1(proxySettings, options) { + function proxyPolicy(proxySettings, options) { if (!noProxyListLoaded) exports.globalNoProxyList.push(...loadNoProxy()); const defaultProxy = proxySettings ? getUrlFromProxySettings(proxySettings) : getDefaultProxySettingsInternal(); const cachedAgents = {}; return { name: exports.proxyPolicyName, async sendRequest(request, next) { - var _a$2; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a$2 = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a$2 !== void 0 ? _a$2 : exports.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) setProxyAgentOnRequest(request, cachedAgents, defaultProxy); + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) setProxyAgentOnRequest(request, cachedAgents, defaultProxy); else if (request.proxySettings) setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); return next(request); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js -var require_agentPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.agentPolicyName = void 0; - exports.agentPolicy = agentPolicy$1; + exports.agentPolicy = agentPolicy; /** * Name of the Agent Policy */ @@ -5709,23 +6006,23 @@ var require_agentPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-r /** * Gets a pipeline policy that sets http.agent */ - function agentPolicy$1(agent) { + function agentPolicy(agent) { return { name: exports.agentPolicyName, - sendRequest: async (req$1, next) => { - if (!req$1.agent) req$1.agent = agent; - return next(req$1); + sendRequest: async (req, next) => { + if (!req.agent) req.agent = agent; + return next(req); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.tlsPolicyName = void 0; - exports.tlsPolicy = tlsPolicy$1; + exports.tlsPolicy = tlsPolicy; /** * Name of the TLS Policy */ @@ -5733,78 +6030,75 @@ var require_tlsPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-run /** * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. */ - function tlsPolicy$1(tlsSettings) { + function tlsPolicy(tlsSettings) { return { name: exports.tlsPolicyName, - sendRequest: async (req$1, next) => { - if (!req$1.tlsSettings) req$1.tlsSettings = tlsSettings; - return next(req$1); + sendRequest: async (req, next) => { + if (!req.tlsSettings) req.tlsSettings = tlsSettings; + return next(req); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js -var require_typeGuards$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.isNodeReadableStream = isNodeReadableStream$1; + exports.isNodeReadableStream = isNodeReadableStream; exports.isWebReadableStream = isWebReadableStream; exports.isBinaryBody = isBinaryBody; exports.isReadableStream = isReadableStream; exports.isBlob = isBlob; - function isNodeReadableStream$1(x) { + function isNodeReadableStream(x) { return Boolean(x && typeof x["pipe"] === "function"); } function isWebReadableStream(x) { return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); } - function isBinaryBody(body$1) { - return body$1 !== void 0 && (body$1 instanceof Uint8Array || isReadableStream(body$1) || typeof body$1 === "function" || body$1 instanceof Blob); + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); } function isReadableStream(x) { - return isNodeReadableStream$1(x) || isWebReadableStream(x); + return isNodeReadableStream(x) || isWebReadableStream(x); } function isBlob(x) { return typeof x.stream === "function"; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js -var require_concat = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.concat = concat; - const tslib_1$5 = require_tslib(); const stream_1 = __require("stream"); - const typeGuards_js_1$4 = require_typeGuards$1(); - function streamAsyncIterator() { - return tslib_1$5.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1$5.__await(reader.read()); - if (done) return yield tslib_1$5.__await(void 0); - yield yield tslib_1$5.__await(value); - } - } finally { - reader.releaseLock(); + const typeGuards_js_1 = require_typeGuards$1(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) return; + yield value; } - }); + } finally { + reader.releaseLock(); + } } function makeAsyncIterable(webStream) { if (!webStream[Symbol.asyncIterator]) webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); if (!webStream.values) webStream.values = streamAsyncIterator.bind(webStream); } - function ensureNodeStream(stream$3) { - if (stream$3 instanceof ReadableStream) { - makeAsyncIterable(stream$3); - return stream_1.Readable.fromWeb(stream$3); - } else return stream$3; + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else return stream; } function toStream(source) { if (source instanceof Uint8Array) return stream_1.Readable.from(Buffer.from(source)); - else if ((0, typeGuards_js_1$4.isBlob)(source)) return ensureNodeStream(source.stream()); + else if ((0, typeGuards_js_1.isBlob)(source)) return ensureNodeStream(source.stream()); else return ensureNodeStream(source); } /** @@ -5819,43 +6113,25 @@ var require_concat = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@ async function concat(sources) { return function() { const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return stream_1.Readable.from(function() { - return tslib_1$5.__asyncGenerator(this, arguments, function* () { - var _a$2, e_1, _b$1, _c$1; - for (const stream$3 of streams) try { - for (var _d$1 = true, stream_2 = (e_1 = void 0, tslib_1$5.__asyncValues(stream$3)), stream_2_1; stream_2_1 = yield tslib_1$5.__await(stream_2.next()), _a$2 = stream_2_1.done, !_a$2; _d$1 = true) { - _c$1 = stream_2_1.value; - _d$1 = false; - const chunk = _c$1; - yield yield tslib_1$5.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = stream_2.return)) yield tslib_1$5.__await(_b$1.call(stream_2)); - } finally { - if (e_1) throw e_1.error; - } - } - }); - }()); + return stream_1.Readable.from((async function* () { + for (const stream of streams) for await (const chunk of stream) yield chunk; + })()); }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.multipartPolicyName = void 0; - exports.multipartPolicy = multipartPolicy$1; - const bytesEncoding_js_1$4 = require_bytesEncoding(); - const typeGuards_js_1$3 = require_typeGuards$1(); - const uuidUtils_js_1$1 = require_uuidUtils(); + exports.multipartPolicy = multipartPolicy; + const bytesEncoding_js_1 = require_bytesEncoding(); + const typeGuards_js_1 = require_typeGuards$1(); + const uuidUtils_js_1 = require_uuidUtils(); const concat_js_1 = require_concat(); function generateBoundary() { - return `----AzSDKFormBoundary${(0, uuidUtils_js_1$1.randomUUID)()}`; + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; } function encodeHeaders(headers) { let result = ""; @@ -5864,32 +6140,32 @@ var require_multipartPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-ht } function getLength(source) { if (source instanceof Uint8Array) return source.byteLength; - else if ((0, typeGuards_js_1$3.isBlob)(source)) return source.size === -1 ? void 0 : source.size; - else return void 0; + else if ((0, typeGuards_js_1.isBlob)(source)) return source.size === -1 ? void 0 : source.size; + else return; } function getTotalLength(sources) { let total = 0; for (const source of sources) { const partLength = getLength(source); - if (partLength === void 0) return void 0; + if (partLength === void 0) return; else total += partLength; } return total; } async function buildRequestBody(request, parts, boundary) { const sources = [ - (0, bytesEncoding_js_1$4.stringToUint8Array)(`--${boundary}`, "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), ...parts.flatMap((part) => [ - (0, bytesEncoding_js_1$4.stringToUint8Array)("\r\n", "utf-8"), - (0, bytesEncoding_js_1$4.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, bytesEncoding_js_1$4.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), part.body, - (0, bytesEncoding_js_1$4.stringToUint8Array)(`\r\n--${boundary}`, "utf-8") + (0, bytesEncoding_js_1.stringToUint8Array)(`\r\n--${boundary}`, "utf-8") ]), - (0, bytesEncoding_js_1$4.stringToUint8Array)("--\r\n\r\n", "utf-8") + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") ]; - const contentLength$1 = getTotalLength(sources); - if (contentLength$1) request.headers.set("Content-Length", contentLength$1); + const contentLength = getTotalLength(sources); + if (contentLength) request.headers.set("Content-Length", contentLength); request.body = await (0, concat_js_1.concat)(sources); } /** @@ -5897,7 +6173,7 @@ var require_multipartPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-ht */ exports.multipartPolicyName = "multipartPolicy"; const maxBoundaryLength = 70; - const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + const validBoundaryCharacters = /* @__PURE__ */ new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); function assertValidBoundary(boundary) { if (boundary.length > maxBoundaryLength) throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); @@ -5905,73 +6181,72 @@ var require_multipartPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-ht /** * Pipeline policy for multipart requests */ - function multipartPolicy$1() { + function multipartPolicy() { return { name: exports.multipartPolicyName, async sendRequest(request, next) { - var _a$2; if (!request.multipartBody) return next(request); if (request.body) throw new Error("multipartBody and regular body cannot be set at the same time"); let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a$2 = request.headers.get("Content-Type")) !== null && _a$2 !== void 0 ? _a$2 : "multipart/mixed"; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); if (!parsedHeader) throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - const [, contentType$1, parsedBoundary] = parsedHeader; + const [, contentType, parsedBoundary] = parsedHeader; if (parsedBoundary && boundary && parsedBoundary !== boundary) throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - boundary !== null && boundary !== void 0 || (boundary = parsedBoundary); + boundary ??= parsedBoundary; if (boundary) assertValidBoundary(boundary); else boundary = generateBoundary(); - request.headers.set("Content-Type", `${contentType$1}; boundary=${boundary}`); + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); await buildRequestBody(request, request.multipartBody.parts, boundary); request.multipartBody = void 0; return next(request); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.createPipelineFromOptions = createPipelineFromOptions$1; - const logPolicy_js_1$3 = require_logPolicy$1(); - const pipeline_js_1$5 = require_pipeline$2(); - const redirectPolicy_js_1$3 = require_redirectPolicy$1(); - const userAgentPolicy_js_1$3 = require_userAgentPolicy$1(); - const decompressResponsePolicy_js_1$3 = require_decompressResponsePolicy$1(); - const defaultRetryPolicy_js_1$3 = require_defaultRetryPolicy$1(); - const formDataPolicy_js_1$3 = require_formDataPolicy$1(); - const checkEnvironment_js_1$2 = require_checkEnvironment(); - const proxyPolicy_js_1$3 = require_proxyPolicy$1(); - const agentPolicy_js_1$3 = require_agentPolicy$1(); - const tlsPolicy_js_1$3 = require_tlsPolicy$1(); - const multipartPolicy_js_1$3 = require_multipartPolicy$1(); + exports.createPipelineFromOptions = createPipelineFromOptions; + const logPolicy_js_1 = require_logPolicy$1(); + const pipeline_js_1 = require_pipeline$2(); + const redirectPolicy_js_1 = require_redirectPolicy$1(); + const userAgentPolicy_js_1 = require_userAgentPolicy$1(); + const decompressResponsePolicy_js_1 = require_decompressResponsePolicy$1(); + const defaultRetryPolicy_js_1 = require_defaultRetryPolicy$1(); + const formDataPolicy_js_1 = require_formDataPolicy$1(); + const checkEnvironment_js_1 = require_checkEnvironment(); + const proxyPolicy_js_1 = require_proxyPolicy$1(); + const agentPolicy_js_1 = require_agentPolicy$1(); + const tlsPolicy_js_1 = require_tlsPolicy$1(); + const multipartPolicy_js_1 = require_multipartPolicy$1(); /** * Create a new pipeline with a default set of customizable policies. * @param options - Options to configure a custom pipeline. */ - function createPipelineFromOptions$1(options) { - const pipeline = (0, pipeline_js_1$5.createEmptyPipeline)(); - if (checkEnvironment_js_1$2.isNodeLike) { - if (options.agent) pipeline.addPolicy((0, agentPolicy_js_1$3.agentPolicy)(options.agent)); - if (options.tlsOptions) pipeline.addPolicy((0, tlsPolicy_js_1$3.tlsPolicy)(options.tlsOptions)); - pipeline.addPolicy((0, proxyPolicy_js_1$3.proxyPolicy)(options.proxyOptions)); - pipeline.addPolicy((0, decompressResponsePolicy_js_1$3.decompressResponsePolicy)()); - } - pipeline.addPolicy((0, formDataPolicy_js_1$3.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1$3.multipartPolicyName] }); - pipeline.addPolicy((0, userAgentPolicy_js_1$3.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, multipartPolicy_js_1$3.multipartPolicy)(), { afterPhase: "Deserialize" }); - pipeline.addPolicy((0, defaultRetryPolicy_js_1$3.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - if (checkEnvironment_js_1$2.isNodeLike) pipeline.addPolicy((0, redirectPolicy_js_1$3.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); - pipeline.addPolicy((0, logPolicy_js_1$3.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + if (options.tlsOptions) pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); return pipeline; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js -var require_apiVersionPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.apiVersionPolicyName = void 0; exports.apiVersionPolicy = apiVersionPolicy; @@ -5984,18 +6259,18 @@ var require_apiVersionPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-htt function apiVersionPolicy(options) { return { name: exports.apiVersionPolicyName, - sendRequest: (req$1, next) => { - const url$1 = new URL(req$1.url); - if (!url$1.searchParams.get("api-version") && options.apiVersion) req$1.url = `${req$1.url}${Array.from(url$1.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; - return next(req$1); + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + return next(req); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js -var require_credentials = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isOAuth2TokenCredential = isOAuth2TokenCredential; exports.isBearerTokenCredential = isBearerTokenCredential; @@ -6025,14 +6300,14 @@ var require_credentials = __commonJS({ "node_modules/.deno/@typespec+ts-http-run function isApiKeyCredential(credential) { return "key" in credential; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js -var require_checkInsecureConnection = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.ensureSecureConnection = ensureSecureConnection; - const log_js_1$6 = require_log$2(); + const log_js_1 = require_log$4(); let insecureConnectionWarningEmmitted = false; /** * Checks if the request is allowed to be sent over an insecure connection. @@ -6044,8 +6319,8 @@ var require_checkInsecureConnection = __commonJS({ "node_modules/.deno/@typespec */ function allowInsecureConnection(request, options) { if (options.allowInsecureConnection && request.allowInsecureConnection) { - const url$1 = new URL(request.url); - if (url$1.hostname === "localhost" || url$1.hostname === "127.0.0.1") return true; + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") return true; } return false; } @@ -6056,8 +6331,8 @@ var require_checkInsecureConnection = __commonJS({ "node_modules/.deno/@typespec */ function emitInsecureConnectionWarning() { const warning = "Sending token over insecure transport. Assume any token issued is compromised."; - log_js_1$6.logger.warning(warning); - if (typeof (process === null || process === void 0 ? void 0 : process.emitWarning) === "function" && !insecureConnectionWarningEmmitted) { + log_js_1.logger.warning(warning); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { insecureConnectionWarningEmmitted = true; process.emitWarning(warning); } @@ -6070,15 +6345,15 @@ var require_checkInsecureConnection = __commonJS({ "node_modules/.deno/@typespec if (!request.url.toLowerCase().startsWith("https://")) if (allowInsecureConnection(request, options)) emitInsecureConnectionWarning(); else throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js -var require_apiKeyAuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.apiKeyAuthenticationPolicyName = void 0; exports.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; - const checkInsecureConnection_js_1$3 = require_checkInsecureConnection(); + const checkInsecureConnection_js_1 = require_checkInsecureConnection(); /** * Name of the API Key Authentication Policy */ @@ -6090,9 +6365,8 @@ var require_apiKeyAuthenticationPolicy = __commonJS({ "node_modules/.deno/@types return { name: exports.apiKeyAuthenticationPolicyName, async sendRequest(request, next) { - var _a$2, _b$1; - (0, checkInsecureConnection_js_1$3.ensureSecureConnection)(request, options); - const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "apiKey"); + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); if (!scheme) return next(request); if (scheme.apiKeyLocation !== "header") throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); request.headers.set(scheme.name, options.credential.key); @@ -6100,16 +6374,16 @@ var require_apiKeyAuthenticationPolicy = __commonJS({ "node_modules/.deno/@types } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js -var require_basicAuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.basicAuthenticationPolicyName = void 0; exports.basicAuthenticationPolicy = basicAuthenticationPolicy; - const bytesEncoding_js_1$3 = require_bytesEncoding(); - const checkInsecureConnection_js_1$2 = require_checkInsecureConnection(); + const bytesEncoding_js_1 = require_bytesEncoding(); + const checkInsecureConnection_js_1 = require_checkInsecureConnection(); /** * Name of the Basic Authentication Policy */ @@ -6121,26 +6395,24 @@ var require_basicAuthenticationPolicy = __commonJS({ "node_modules/.deno/@typesp return { name: exports.basicAuthenticationPolicyName, async sendRequest(request, next) { - var _a$2, _b$1; - (0, checkInsecureConnection_js_1$2.ensureSecureConnection)(request, options); - const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "http" && x.scheme === "basic"); - if (!scheme) return next(request); + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + if (!(request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic")) return next(request); const { username, password } = options.credential; - const headerValue = (0, bytesEncoding_js_1$3.uint8ArrayToString)((0, bytesEncoding_js_1$3.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); request.headers.set("Authorization", `Basic ${headerValue}`); return next(request); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js -var require_bearerAuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.bearerAuthenticationPolicyName = void 0; exports.bearerAuthenticationPolicy = bearerAuthenticationPolicy; - const checkInsecureConnection_js_1$1 = require_checkInsecureConnection(); + const checkInsecureConnection_js_1 = require_checkInsecureConnection(); /** * Name of the Bearer Authentication Policy */ @@ -6152,21 +6424,19 @@ var require_bearerAuthenticationPolicy = __commonJS({ "node_modules/.deno/@types return { name: exports.bearerAuthenticationPolicyName, async sendRequest(request, next) { - var _a$2, _b$1; - (0, checkInsecureConnection_js_1$1.ensureSecureConnection)(request, options); - const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "http" && x.scheme === "bearer"); - if (!scheme) return next(request); + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + if (!(request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer")) return next(request); const token = await options.credential.getBearerToken({ abortSignal: request.abortSignal }); request.headers.set("Authorization", `Bearer ${token}`); return next(request); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js -var require_oauth2AuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.oauth2AuthenticationPolicyName = void 0; exports.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; @@ -6182,9 +6452,8 @@ var require_oauth2AuthenticationPolicy = __commonJS({ "node_modules/.deno/@types return { name: exports.oauth2AuthenticationPolicyName, async sendRequest(request, next) { - var _a$2, _b$1; (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); - const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "oauth2"); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); if (!scheme) return next(request); const token = await options.credential.getOAuth2Token(scheme.flows, { abortSignal: request.abortSignal }); request.headers.set("Authorization", `Bearer ${token}`); @@ -6192,70 +6461,70 @@ var require_oauth2AuthenticationPolicy = __commonJS({ "node_modules/.deno/@types } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js -var require_clientHelpers = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.createDefaultPipeline = createDefaultPipeline$1; + exports.createDefaultPipeline = createDefaultPipeline; exports.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; - const defaultHttpClient_js_1$2 = require_defaultHttpClient$1(); - const createPipelineFromOptions_js_1$1 = require_createPipelineFromOptions$1(); + const defaultHttpClient_js_1 = require_defaultHttpClient$1(); + const createPipelineFromOptions_js_1 = require_createPipelineFromOptions$1(); const apiVersionPolicy_js_1 = require_apiVersionPolicy(); const credentials_js_1 = require_credentials(); const apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); const basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); const bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); const oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); - let cachedHttpClient$1; + let cachedHttpClient; /** * Creates a default rest pipeline to re-use accross Rest Level Clients */ - function createDefaultPipeline$1(options = {}) { - const pipeline = (0, createPipelineFromOptions_js_1$1.createPipelineFromOptions)(options); + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); - const { credential, authSchemes, allowInsecureConnection: allowInsecureConnection$1 } = options; + const { credential, authSchemes, allowInsecureConnection } = options; if (credential) { if ((0, credentials_js_1.isApiKeyCredential)(credential)) pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, - allowInsecureConnection: allowInsecureConnection$1 + allowInsecureConnection })); else if ((0, credentials_js_1.isBasicCredential)(credential)) pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, - allowInsecureConnection: allowInsecureConnection$1 + allowInsecureConnection })); else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, - allowInsecureConnection: allowInsecureConnection$1 + allowInsecureConnection })); else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, - allowInsecureConnection: allowInsecureConnection$1 + allowInsecureConnection })); } return pipeline; } function getCachedDefaultHttpsClient() { - if (!cachedHttpClient$1) cachedHttpClient$1 = (0, defaultHttpClient_js_1$2.createDefaultHttpClient)(); - return cachedHttpClient$1; + if (!cachedHttpClient) cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + return cachedHttpClient; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js -var require_multipart = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.buildBodyPart = buildBodyPart; exports.buildMultipartBody = buildMultipartBody; - const restError_js_1$6 = require_restError$2(); - const httpHeaders_js_1$4 = require_httpHeaders$1(); - const bytesEncoding_js_1$2 = require_bytesEncoding(); - const typeGuards_js_1$2 = require_typeGuards$1(); + const restError_js_1 = require_restError$2(); + const httpHeaders_js_1 = require_httpHeaders$1(); + const bytesEncoding_js_1 = require_bytesEncoding(); + const typeGuards_js_1 = require_typeGuards$1(); /** * Get value of a header in the part descriptor ignoring case */ @@ -6264,18 +6533,17 @@ var require_multipart = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); if (actualHeaderName) return descriptor.headers[actualHeaderName]; } - return void 0; } function getPartContentType(descriptor) { const contentTypeHeader = getHeaderValue(descriptor, "content-type"); if (contentTypeHeader) return contentTypeHeader; - if (descriptor.contentType === null) return void 0; + if (descriptor.contentType === null) return; if (descriptor.contentType) return descriptor.contentType; - const { body: body$1 } = descriptor; - if (body$1 === null || body$1 === void 0) return void 0; - if (typeof body$1 === "string" || typeof body$1 === "number" || typeof body$1 === "boolean") return "text/plain; charset=UTF-8"; - if (body$1 instanceof Blob) return body$1.type || "application/octet-stream"; - if ((0, typeGuards_js_1$2.isBinaryBody)(body$1)) return "application/octet-stream"; + const { body } = descriptor; + if (body === null || body === void 0) return; + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") return "text/plain; charset=UTF-8"; + if (body instanceof Blob) return body.type || "application/octet-stream"; + if ((0, typeGuards_js_1.isBinaryBody)(body)) return "application/octet-stream"; return "application/json"; } /** @@ -6285,12 +6553,10 @@ var require_multipart = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti return JSON.stringify(value); } function getContentDisposition(descriptor) { - var _a$2; const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); if (contentDispositionHeader) return contentDispositionHeader; - if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) return void 0; - const dispositionType = (_a$2 = descriptor.dispositionType) !== null && _a$2 !== void 0 ? _a$2 : "form-data"; - let disposition = dispositionType; + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) return; + let disposition = descriptor.dispositionType ?? "form-data"; if (descriptor.name) disposition += `; name=${escapeDispositionField(descriptor.name)}`; let filename = void 0; if (descriptor.filename) filename = descriptor.filename; @@ -6301,41 +6567,39 @@ var require_multipart = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti if (filename) disposition += `; filename=${escapeDispositionField(filename)}`; return disposition; } - function normalizeBody(body$1, contentType$1) { - if (body$1 === void 0) return new Uint8Array([]); - if ((0, typeGuards_js_1$2.isBinaryBody)(body$1)) return body$1; - if (typeof body$1 === "string" || typeof body$1 === "number" || typeof body$1 === "boolean") return (0, bytesEncoding_js_1$2.stringToUint8Array)(String(body$1), "utf-8"); - if (contentType$1 && /application\/(.+\+)?json(;.+)?/i.test(String(contentType$1))) return (0, bytesEncoding_js_1$2.stringToUint8Array)(JSON.stringify(body$1), "utf-8"); - throw new restError_js_1$6.RestError(`Unsupported body/content-type combination: ${body$1}, ${contentType$1}`); + function normalizeBody(body, contentType) { + if (body === void 0) return new Uint8Array([]); + if ((0, typeGuards_js_1.isBinaryBody)(body)) return body; + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); } function buildBodyPart(descriptor) { - var _a$2; - const contentType$1 = getPartContentType(descriptor); + const contentType = getPartContentType(descriptor); const contentDisposition = getContentDisposition(descriptor); - const headers = (0, httpHeaders_js_1$4.createHttpHeaders)((_a$2 = descriptor.headers) !== null && _a$2 !== void 0 ? _a$2 : {}); - if (contentType$1) headers.set("content-type", contentType$1); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) headers.set("content-type", contentType); if (contentDisposition) headers.set("content-disposition", contentDisposition); - const body$1 = normalizeBody(descriptor.body, contentType$1); return { headers, - body: body$1 + body: normalizeBody(descriptor.body, contentType) }; } function buildMultipartBody(parts) { return { parts: parts.map(buildBodyPart) }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js -var require_sendRequest = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.sendRequest = sendRequest; - const restError_js_1$5 = require_restError$2(); - const httpHeaders_js_1$3 = require_httpHeaders$1(); - const pipelineRequest_js_1$2 = require_pipelineRequest$1(); - const clientHelpers_js_1$1 = require_clientHelpers(); - const typeGuards_js_1$1 = require_typeGuards$1(); + const restError_js_1 = require_restError$2(); + const httpHeaders_js_1 = require_httpHeaders$1(); + const pipelineRequest_js_1 = require_pipelineRequest$1(); + const clientHelpers_js_1 = require_clientHelpers(); + const typeGuards_js_1 = require_typeGuards$1(); const multipart_js_1 = require_multipart(); /** * Helper function to send request used by the client @@ -6346,35 +6610,36 @@ var require_sendRequest = __commonJS({ "node_modules/.deno/@typespec+ts-http-run * @param customHttpClient - a custom HttpClient to use when making the request * @returns returns and HttpResponse */ - async function sendRequest(method, url$1, pipeline, options = {}, customHttpClient) { - var _a$2; - const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : (0, clientHelpers_js_1$1.getCachedDefaultHttpsClient)(); - const request = buildPipelineRequest(method, url$1, options); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); try { const response = await pipeline.sendRequest(httpClient, request); const headers = response.headers.toJSON(); - const stream$3 = (_a$2 = response.readableStreamBody) !== null && _a$2 !== void 0 ? _a$2 : response.browserStreamBody; - const parsedBody = options.responseAsStream || stream$3 !== void 0 ? void 0 : getResponseBody(response); - const body$1 = stream$3 !== null && stream$3 !== void 0 ? stream$3 : parsedBody; - if (options === null || options === void 0 ? void 0 : options.onResponse) options.onResponse(Object.assign(Object.assign({}, response), { + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) options.onResponse({ + ...response, request, rawHeaders: headers, parsedBody - })); + }); return { request, headers, status: `${response.status}`, - body: body$1 + body }; } catch (e) { - if ((0, restError_js_1$5.isRestError)(e) && e.response && options.onResponse) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { const { response } = e; const rawHeaders = response.headers.toJSON(); - options === null || options === void 0 || options.onResponse(Object.assign(Object.assign({}, response), { + options?.onResponse({ + ...response, request, rawHeaders - }), e); + }, e); } throw e; } @@ -6385,8 +6650,7 @@ var require_sendRequest = __commonJS({ "node_modules/.deno/@typespec+ts-http-run * @returns returns the content-type */ function getRequestContentType(options = {}) { - var _a$2, _b$1, _c$1; - return (_c$1 = (_a$2 = options.contentType) !== null && _a$2 !== void 0 ? _a$2 : (_b$1 = options.headers) === null || _b$1 === void 0 ? void 0 : _b$1["content-type"]) !== null && _c$1 !== void 0 ? _c$1 : getContentType(options.body); + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); } /** * Function to determine the content-type of a body @@ -6394,26 +6658,29 @@ var require_sendRequest = __commonJS({ "node_modules/.deno/@typespec+ts-http-run * @param body - body in the request * @returns returns the content-type */ - function getContentType(body$1) { - if (ArrayBuffer.isView(body$1)) return "application/octet-stream"; - if (typeof body$1 === "string") try { - JSON.parse(body$1); + function getContentType(body) { + if (body === void 0) return; + if (ArrayBuffer.isView(body)) return "application/octet-stream"; + if (typeof body === "string") try { + JSON.parse(body); return "application/json"; } catch (error) { - return void 0; + return; } return "application/json"; } - function buildPipelineRequest(method, url$1, options = {}) { - var _a$2, _b$1, _c$1; + function buildPipelineRequest(method, url, options = {}) { const requestContentType = getRequestContentType(options); - const { body: body$1, multipartBody } = getRequestBody(options.body, requestContentType); - const hasContent = body$1 !== void 0 || multipartBody !== void 0; - const headers = (0, httpHeaders_js_1$3.createHttpHeaders)(Object.assign(Object.assign(Object.assign({}, options.headers ? options.headers : {}), { accept: (_c$1 = (_a$2 = options.accept) !== null && _a$2 !== void 0 ? _a$2 : (_b$1 = options.headers) === null || _b$1 === void 0 ? void 0 : _b$1.accept) !== null && _c$1 !== void 0 ? _c$1 : "application/json" }), hasContent && requestContentType && { "content-type": requestContentType })); - return (0, pipelineRequest_js_1$2.createPipelineRequest)({ - url: url$1, + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...requestContentType && { "content-type": requestContentType } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, method, - body: body$1, + body, multipartBody, headers, allowInsecureConnection: options.allowInsecureConnection, @@ -6428,31 +6695,28 @@ var require_sendRequest = __commonJS({ "node_modules/.deno/@typespec+ts-http-run /** * Prepares the body before sending the request */ - function getRequestBody(body$1, contentType$1 = "") { - if (body$1 === void 0) return { body: void 0 }; - if (typeof FormData !== "undefined" && body$1 instanceof FormData) return { body: body$1 }; - if ((0, typeGuards_js_1$1.isReadableStream)(body$1)) return { body: body$1 }; - if (ArrayBuffer.isView(body$1)) return { body: body$1 instanceof Uint8Array ? body$1 : JSON.stringify(body$1) }; - const firstType = contentType$1.split(";")[0]; - switch (firstType) { - case "application/json": return { body: JSON.stringify(body$1) }; + function getRequestBody(body, contentType = "") { + if (body === void 0) return { body: void 0 }; + if (typeof FormData !== "undefined" && body instanceof FormData) return { body }; + if ((0, typeGuards_js_1.isReadableStream)(body)) return { body }; + if (ArrayBuffer.isView(body)) return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + switch (contentType.split(";")[0]) { + case "application/json": return { body: JSON.stringify(body) }; case "multipart/form-data": - if (Array.isArray(body$1)) return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body$1) }; - return { body: JSON.stringify(body$1) }; - case "text/plain": return { body: String(body$1) }; + if (Array.isArray(body)) return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + return { body: JSON.stringify(body) }; + case "text/plain": return { body: String(body) }; default: - if (typeof body$1 === "string") return { body: body$1 }; - return { body: JSON.stringify(body$1) }; + if (typeof body === "string") return { body }; + return { body: JSON.stringify(body) }; } } /** * Prepares the response body */ function getResponseBody(response) { - var _a$2, _b$1; - const contentType$1 = (_a$2 = response.headers.get("content-type")) !== null && _a$2 !== void 0 ? _a$2 : ""; - const firstType = contentType$1.split(";")[0]; - const bodyToParse = (_b$1 = response.bodyAsText) !== null && _b$1 !== void 0 ? _b$1 : ""; + const firstType = (response.headers.get("content-type") ?? "").split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; if (firstType === "text/plain") return String(bodyToParse); try { return bodyToParse ? JSON.parse(bodyToParse) : void 0; @@ -6462,25 +6726,24 @@ var require_sendRequest = __commonJS({ "node_modules/.deno/@typespec+ts-http-run } } function createParseError(response, err) { - var _a$2; const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; - const errCode = (_a$2 = err.code) !== null && _a$2 !== void 0 ? _a$2 : restError_js_1$5.RestError.PARSE_ERROR; - return new restError_js_1$5.RestError(msg, { + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { code: errCode, statusCode: response.status, request: response.request, response }); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js -var require_urlHelpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.buildRequestUrl = buildRequestUrl; exports.buildBaseUrl = buildBaseUrl; - exports.replaceAll = replaceAll$1; + exports.replaceAll = replaceAll; function isQueryParameterWithOptions(x) { const value = x.value; return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; @@ -6497,9 +6760,8 @@ var require_urlHelpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-ru if (routePath.startsWith("https://") || routePath.startsWith("http://")) return routePath; endpoint = buildBaseUrl(endpoint, options); routePath = buildRoutePath(routePath, pathParameters, options); - const requestUrl = appendQueryParams$1(`${endpoint}/${routePath}`, options); - const url$1 = new URL(requestUrl); - return url$1.toString().replace(/([^:]\/)\/+/g, "$1"); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + return new URL(requestUrl).toString().replace(/([^:]\/)\/+/g, "$1"); } function getQueryParamValue(key, allowReserved, style, param) { let separator; @@ -6518,10 +6780,9 @@ var require_urlHelpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-ru }).join(separator); return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; } - function appendQueryParams$1(url$1, options = {}) { - var _a$2, _b$1, _c$1, _d$1; - if (!options.queryParameters) return url$1; - const parsedUrl = new URL(url$1); + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) return url; + const parsedUrl = new URL(url); const queryParams = options.queryParameters; const paramStrings = []; for (const key of Object.keys(queryParams)) { @@ -6529,19 +6790,18 @@ var require_urlHelpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-ru if (param === void 0 || param === null) continue; const hasMetadata = isQueryParameterWithOptions(param); const rawValue = hasMetadata ? param.value : param; - const explode = hasMetadata ? (_a$2 = param.explode) !== null && _a$2 !== void 0 ? _a$2 : false : false; + const explode = hasMetadata ? param.explode ?? false : false; const style = hasMetadata && param.style ? param.style : "form"; - if (explode) if (Array.isArray(rawValue)) for (const item of rawValue) paramStrings.push(getQueryParamValue(key, (_b$1 = options.skipUrlEncoding) !== null && _b$1 !== void 0 ? _b$1 : false, style, item)); - else if (typeof rawValue === "object") for (const [actualKey, value] of Object.entries(rawValue)) paramStrings.push(getQueryParamValue(actualKey, (_c$1 = options.skipUrlEncoding) !== null && _c$1 !== void 0 ? _c$1 : false, style, value)); + if (explode) if (Array.isArray(rawValue)) for (const item of rawValue) paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + else if (typeof rawValue === "object") for (const [actualKey, value] of Object.entries(rawValue)) paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); else throw new Error("explode can only be set to true for objects and arrays"); - else paramStrings.push(getQueryParamValue(key, (_d$1 = options.skipUrlEncoding) !== null && _d$1 !== void 0 ? _d$1 : false, style, rawValue)); + else paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); } if (parsedUrl.search !== "") parsedUrl.search += "&"; parsedUrl.search += paramStrings.join("&"); return parsedUrl.toString(); } function buildBaseUrl(endpoint, options) { - var _a$2; if (!options.pathParameters) return endpoint; const pathParams = options.pathParameters; for (const [key, param] of Object.entries(pathParams)) { @@ -6549,14 +6809,13 @@ var require_urlHelpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-ru if (!param.toString || typeof param.toString !== "function") throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); let value = param.toISOString !== void 0 ? param.toISOString() : String(param); if (!options.skipUrlEncoding) value = encodeURIComponent(param); - endpoint = (_a$2 = replaceAll$1(endpoint, `{${key}}`, value)) !== null && _a$2 !== void 0 ? _a$2 : ""; + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; } return endpoint; } function buildRoutePath(routePath, pathParameters, options = {}) { - var _a$2; for (const pathParam of pathParameters) { - const allowReserved = typeof pathParam === "object" && ((_a$2 = pathParam.allowReserved) !== null && _a$2 !== void 0 ? _a$2 : false); + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); let value = typeof pathParam === "object" ? pathParam.value : pathParam; if (!options.skipUrlEncoding && !allowReserved) value = encodeURIComponent(value); routePath = routePath.replace(/\{[\w-]+\}/, String(value)); @@ -6570,20 +6829,20 @@ var require_urlHelpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-ru * @param replaceValue - The value to replace searchValue with in the value argument. * @returns The value where each instance of searchValue was replaced with replacedValue. */ - function replaceAll$1(value, searchValue, replaceValue) { + function replaceAll(value, searchValue, replaceValue) { return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js -var require_getClient = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getClient = getClient; const clientHelpers_js_1 = require_clientHelpers(); const sendRequest_js_1 = require_sendRequest(); - const urlHelpers_js_1$1 = require_urlHelpers$1(); - const checkEnvironment_js_1$1 = require_checkEnvironment(); + const urlHelpers_js_1 = require_urlHelpers$1(); + const checkEnvironment_js_1 = require_checkEnvironment(); /** * Creates a client with a default pipeline * @param endpoint - Base endpoint for the client @@ -6591,40 +6850,42 @@ var require_getClient = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti * @param options - Client options */ function getClient(endpoint, clientOptions = {}) { - var _a$2, _b$1, _c$1; - const pipeline = (_a$2 = clientOptions.pipeline) !== null && _a$2 !== void 0 ? _a$2 : (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); - if ((_b$1 = clientOptions.additionalPolicies) === null || _b$1 === void 0 ? void 0 : _b$1.length) for (const { policy, position } of clientOptions.additionalPolicies) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) for (const { policy, position } of clientOptions.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; pipeline.addPolicy(policy, { afterPhase }); } - const { allowInsecureConnection: allowInsecureConnection$1, httpClient } = clientOptions; - const endpointUrl = (_c$1 = clientOptions.endpoint) !== null && _c$1 !== void 0 ? _c$1 : endpoint; - const client = (path$13, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1$1.buildRequestUrl)(endpointUrl, path$13, args, Object.assign({ allowInsecureConnection: allowInsecureConnection$1 }, requestOptions)); + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, { + allowInsecureConnection, + ...requestOptions + }); return { get: (requestOptions = {}) => { - return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, post: (requestOptions = {}) => { - return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, put: (requestOptions = {}) => { - return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, patch: (requestOptions = {}) => { - return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, delete: (requestOptions = {}) => { - return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, head: (requestOptions = {}) => { - return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, options: (requestOptions = {}) => { - return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, trace: (requestOptions = {}) => { - return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); } }; }; @@ -6634,34 +6895,38 @@ var require_getClient = __commonJS({ "node_modules/.deno/@typespec+ts-http-runti pipeline }; } - function buildOperation(method, url$1, pipeline, options, allowInsecureConnection$1, httpClient) { - var _a$2; - allowInsecureConnection$1 = (_a$2 = options.allowInsecureConnection) !== null && _a$2 !== void 0 ? _a$2 : allowInsecureConnection$1; + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; return { then: function(onFulfilled, onrejected) { - return (0, sendRequest_js_1.sendRequest)(method, url$1, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection: allowInsecureConnection$1 }), httpClient).then(onFulfilled, onrejected); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { + ...options, + allowInsecureConnection + }, httpClient).then(onFulfilled, onrejected); }, async asBrowserStream() { - if (checkEnvironment_js_1$1.isNodeLike) throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); - else return (0, sendRequest_js_1.sendRequest)(method, url$1, pipeline, Object.assign(Object.assign({}, options), { - allowInsecureConnection: allowInsecureConnection$1, + if (checkEnvironment_js_1.isNodeLike) throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + else return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { + ...options, + allowInsecureConnection, responseAsStream: true - }), httpClient); + }, httpClient); }, async asNodeStream() { - if (checkEnvironment_js_1$1.isNodeLike) return (0, sendRequest_js_1.sendRequest)(method, url$1, pipeline, Object.assign(Object.assign({}, options), { - allowInsecureConnection: allowInsecureConnection$1, + if (checkEnvironment_js_1.isNodeLike) return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { + ...options, + allowInsecureConnection, responseAsStream: true - }), httpClient); + }, httpClient); else throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js -var require_operationOptionHelpers = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.operationOptionsToRequestParameters = operationOptionsToRequestParameters; /** @@ -6670,145 +6935,142 @@ var require_operationOptionHelpers = __commonJS({ "node_modules/.deno/@typespec+ * @returns the result of the conversion in RequestParameters of RLC layer */ function operationOptionsToRequestParameters(options) { - var _a$2, _b$1, _c$1, _d$1, _e, _f; return { - allowInsecureConnection: (_a$2 = options.requestOptions) === null || _a$2 === void 0 ? void 0 : _a$2.allowInsecureConnection, - timeout: (_b$1 = options.requestOptions) === null || _b$1 === void 0 ? void 0 : _b$1.timeout, - skipUrlEncoding: (_c$1 = options.requestOptions) === null || _c$1 === void 0 ? void 0 : _c$1.skipUrlEncoding, + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, abortSignal: options.abortSignal, - onUploadProgress: (_d$1 = options.requestOptions) === null || _d$1 === void 0 ? void 0 : _d$1.onUploadProgress, - onDownloadProgress: (_e = options.requestOptions) === null || _e === void 0 ? void 0 : _e.onDownloadProgress, - headers: Object.assign({}, (_f = options.requestOptions) === null || _f === void 0 ? void 0 : _f.headers), + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, onResponse: options.onResponse }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js -var require_restError$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createRestError = createRestError; - const restError_js_1$4 = require_restError$2(); - const httpHeaders_js_1$2 = require_httpHeaders$1(); + const restError_js_1 = require_restError$2(); + const httpHeaders_js_1 = require_httpHeaders$1(); function createRestError(messageOrResponse, response) { - var _a$2, _b$1, _c$1; const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; - const internalError = (_b$1 = (_a$2 = resp.body) === null || _a$2 === void 0 ? void 0 : _a$2.error) !== null && _b$1 !== void 0 ? _b$1 : resp.body; - const message = typeof messageOrResponse === "string" ? messageOrResponse : (_c$1 = internalError === null || internalError === void 0 ? void 0 : internalError.message) !== null && _c$1 !== void 0 ? _c$1 : `Unexpected status code: ${resp.status}`; - return new restError_js_1$4.RestError(message, { + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { statusCode: statusCodeToNumber(resp.status), - code: internalError === null || internalError === void 0 ? void 0 : internalError.code, + code: internalError?.code, request: resp.request, - response: toPipelineResponse$1(resp) + response: toPipelineResponse(resp) }); } - function toPipelineResponse$1(response) { - var _a$2; + function toPipelineResponse(response) { return { - headers: (0, httpHeaders_js_1$2.createHttpHeaders)(response.headers), + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), request: response.request, - status: (_a$2 = statusCodeToNumber(response.status)) !== null && _a$2 !== void 0 ? _a$2 : -1 + status: statusCodeToNumber(response.status) ?? -1 }; } function statusCodeToNumber(statusCode) { const status = Number.parseInt(statusCode); return Number.isNaN(status) ? void 0 : status; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js -var require_commonjs$12 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs$14 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createRestError = exports.operationOptionsToRequestParameters = exports.getClient = exports.createDefaultHttpClient = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isRestError = exports.RestError = exports.createEmptyPipeline = exports.createPipelineRequest = exports.createHttpHeaders = exports.TypeSpecRuntimeLogger = exports.setLogLevel = exports.getLogLevel = exports.createClientLogger = exports.AbortError = void 0; - const tslib_1$4 = require_tslib(); - var AbortError_js_1$1 = require_AbortError$1(); + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError$1(); Object.defineProperty(exports, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1$1.AbortError; + return AbortError_js_1.AbortError; } }); - var logger_js_1$4 = require_logger$1(); + var logger_js_1 = require_logger$1(); Object.defineProperty(exports, "createClientLogger", { enumerable: true, get: function() { - return logger_js_1$4.createClientLogger; + return logger_js_1.createClientLogger; } }); Object.defineProperty(exports, "getLogLevel", { enumerable: true, get: function() { - return logger_js_1$4.getLogLevel; + return logger_js_1.getLogLevel; } }); Object.defineProperty(exports, "setLogLevel", { enumerable: true, get: function() { - return logger_js_1$4.setLogLevel; + return logger_js_1.setLogLevel; } }); Object.defineProperty(exports, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { - return logger_js_1$4.TypeSpecRuntimeLogger; + return logger_js_1.TypeSpecRuntimeLogger; } }); - var httpHeaders_js_1$1 = require_httpHeaders$1(); + var httpHeaders_js_1 = require_httpHeaders$1(); Object.defineProperty(exports, "createHttpHeaders", { enumerable: true, get: function() { - return httpHeaders_js_1$1.createHttpHeaders; + return httpHeaders_js_1.createHttpHeaders; } }); - tslib_1$4.__exportStar(require_schemes(), exports); - tslib_1$4.__exportStar(require_oauth2Flows(), exports); - var pipelineRequest_js_1$1 = require_pipelineRequest$1(); + tslib_1.__exportStar(require_schemes(), exports); + tslib_1.__exportStar(require_oauth2Flows(), exports); + var pipelineRequest_js_1 = require_pipelineRequest$1(); Object.defineProperty(exports, "createPipelineRequest", { enumerable: true, get: function() { - return pipelineRequest_js_1$1.createPipelineRequest; + return pipelineRequest_js_1.createPipelineRequest; } }); - var pipeline_js_1$4 = require_pipeline$2(); + var pipeline_js_1 = require_pipeline$2(); Object.defineProperty(exports, "createEmptyPipeline", { enumerable: true, get: function() { - return pipeline_js_1$4.createEmptyPipeline; + return pipeline_js_1.createEmptyPipeline; } }); - var restError_js_1$3 = require_restError$2(); + var restError_js_1 = require_restError$2(); Object.defineProperty(exports, "RestError", { enumerable: true, get: function() { - return restError_js_1$3.RestError; + return restError_js_1.RestError; } }); Object.defineProperty(exports, "isRestError", { enumerable: true, get: function() { - return restError_js_1$3.isRestError; + return restError_js_1.isRestError; } }); - var bytesEncoding_js_1$1 = require_bytesEncoding(); + var bytesEncoding_js_1 = require_bytesEncoding(); Object.defineProperty(exports, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1$1.stringToUint8Array; + return bytesEncoding_js_1.stringToUint8Array; } }); Object.defineProperty(exports, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1$1.uint8ArrayToString; + return bytesEncoding_js_1.uint8ArrayToString; } }); - var defaultHttpClient_js_1$1 = require_defaultHttpClient$1(); + var defaultHttpClient_js_1 = require_defaultHttpClient$1(); Object.defineProperty(exports, "createDefaultHttpClient", { enumerable: true, get: function() { - return defaultHttpClient_js_1$1.createDefaultHttpClient; + return defaultHttpClient_js_1.createDefaultHttpClient; } }); var getClient_js_1 = require_getClient(); @@ -6832,47 +7094,46 @@ var require_commonjs$12 = __commonJS({ "node_modules/.deno/@typespec+ts-http-run return restError_js_2.createRestError; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline$1 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createEmptyPipeline = createEmptyPipeline; - const ts_http_runtime_1$4 = require_commonjs$12(); + const ts_http_runtime_1 = require_commonjs$14(); /** * Creates a totally empty pipeline. * Useful for testing or creating a custom one. */ function createEmptyPipeline() { - return (0, ts_http_runtime_1$4.createEmptyPipeline)(); + return (0, ts_http_runtime_1.createEmptyPipeline)(); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js -var require_internal$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createLoggerContext = void 0; - var logger_js_1$3 = require_logger$1(); + var logger_js_1 = require_logger$1(); Object.defineProperty(exports, "createLoggerContext", { enumerable: true, get: function() { - return logger_js_1$3.createLoggerContext; + return logger_js_1.createLoggerContext; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+logger@1.2.0/node_modules/@azure/logger/dist/commonjs/index.js -var require_commonjs$11 = __commonJS({ "node_modules/.deno/@azure+logger@1.2.0/node_modules/@azure/logger/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+logger@1.3.0/node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs$13 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AzureLogger = void 0; exports.setLogLevel = setLogLevel; exports.getLogLevel = getLogLevel; exports.createClientLogger = createClientLogger; - const logger_1$4 = require_internal$2(); - const context = (0, logger_1$4.createLoggerContext)({ + const context = (0, require_internal$2().createLoggerContext)({ logLevelEnvVarName: "AZURE_LOG_LEVEL", namespace: "azure" }); @@ -6908,26 +7169,26 @@ var require_commonjs$11 = __commonJS({ "node_modules/.deno/@azure+logger@1.2.0/n function createClientLogger(namespace) { return context.createClientLogger(namespace); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log$1 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log$3 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = void 0; - const logger_1$3 = require_commonjs$11(); - exports.logger = (0, logger_1$3.createClientLogger)("core-rest-pipeline"); -} }); + const logger_1 = require_commonjs$13(); + exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.exponentialRetryPolicyName = void 0; - exports.exponentialRetryPolicy = exponentialRetryPolicy$1; - const exponentialRetryStrategy_js_1$1 = require_exponentialRetryStrategy(); - const retryPolicy_js_1$4 = require_retryPolicy$1(); - const constants_js_1$8 = require_constants$2(); + exports.exponentialRetryPolicy = exponentialRetryPolicy; + const exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + const retryPolicy_js_1 = require_retryPolicy$1(); + const constants_js_1 = require_constants$4(); /** * The programmatic identifier of the exponentialRetryPolicy. */ @@ -6936,21 +7197,23 @@ var require_exponentialRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespe * A policy that attempts to retry requests while introducing an exponentially increasing delay. * @param options - Options that configure retry logic. */ - function exponentialRetryPolicy$1(options = {}) { - var _a$2; - return (0, retryPolicy_js_1$4.retryPolicy)([(0, exponentialRetryStrategy_js_1$1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true }))], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$8.DEFAULT_RETRY_POLICY_COUNT }); + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + })], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.systemErrorRetryPolicyName = void 0; - exports.systemErrorRetryPolicy = systemErrorRetryPolicy$1; + exports.systemErrorRetryPolicy = systemErrorRetryPolicy; const exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - const retryPolicy_js_1$3 = require_retryPolicy$1(); - const constants_js_1$7 = require_constants$2(); + const retryPolicy_js_1 = require_retryPolicy$1(); + const constants_js_1 = require_constants$4(); /** * Name of the {@link systemErrorRetryPolicy} */ @@ -6961,24 +7224,26 @@ var require_systemErrorRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespe * retryable error codes from the server itself. * @param options - Options that customize the policy. */ - function systemErrorRetryPolicy$1(options = {}) { - var _a$2; + function systemErrorRetryPolicy(options = {}) { return { name: exports.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1$3.retryPolicy)([(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true }))], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$7.DEFAULT_RETRY_POLICY_COUNT }).sendRequest + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + })], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.throttlingRetryPolicyName = void 0; - exports.throttlingRetryPolicy = throttlingRetryPolicy$1; + exports.throttlingRetryPolicy = throttlingRetryPolicy; const throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - const retryPolicy_js_1$2 = require_retryPolicy$1(); - const constants_js_1$6 = require_constants$2(); + const retryPolicy_js_1 = require_retryPolicy$1(); + const constants_js_1 = require_constants$4(); /** * Name of the {@link throttlingRetryPolicy} */ @@ -6987,242 +7252,244 @@ var require_throttlingRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec * A policy that retries when the server sends a 429 response with a Retry-After header. * * To learn more, please refer to - * https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + * https://learn.microsoft.com/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors * * @param options - Options that configure retry logic. */ - function throttlingRetryPolicy$1(options = {}) { - var _a$2; + function throttlingRetryPolicy(options = {}) { return { name: exports.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1$2.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$6.DEFAULT_RETRY_POLICY_COUNT }).sendRequest + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js -var require_internal$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.userAgentPolicyName = exports.userAgentPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.retryPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.defaultRetryPolicyName = exports.defaultRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.agentPolicyName = exports.agentPolicy = void 0; - var agentPolicy_js_1$2 = require_agentPolicy$1(); + var agentPolicy_js_1 = require_agentPolicy$1(); Object.defineProperty(exports, "agentPolicy", { enumerable: true, get: function() { - return agentPolicy_js_1$2.agentPolicy; + return agentPolicy_js_1.agentPolicy; } }); Object.defineProperty(exports, "agentPolicyName", { enumerable: true, get: function() { - return agentPolicy_js_1$2.agentPolicyName; + return agentPolicy_js_1.agentPolicyName; } }); - var decompressResponsePolicy_js_1$2 = require_decompressResponsePolicy$1(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy$1(); Object.defineProperty(exports, "decompressResponsePolicy", { enumerable: true, get: function() { - return decompressResponsePolicy_js_1$2.decompressResponsePolicy; + return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports, "decompressResponsePolicyName", { enumerable: true, get: function() { - return decompressResponsePolicy_js_1$2.decompressResponsePolicyName; + return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var defaultRetryPolicy_js_1$2 = require_defaultRetryPolicy$1(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy$1(); Object.defineProperty(exports, "defaultRetryPolicy", { enumerable: true, get: function() { - return defaultRetryPolicy_js_1$2.defaultRetryPolicy; + return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); Object.defineProperty(exports, "defaultRetryPolicyName", { enumerable: true, get: function() { - return defaultRetryPolicy_js_1$2.defaultRetryPolicyName; + return defaultRetryPolicy_js_1.defaultRetryPolicyName; } }); - var exponentialRetryPolicy_js_1$1 = require_exponentialRetryPolicy$1(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy$1(); Object.defineProperty(exports, "exponentialRetryPolicy", { enumerable: true, get: function() { - return exponentialRetryPolicy_js_1$1.exponentialRetryPolicy; + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); Object.defineProperty(exports, "exponentialRetryPolicyName", { enumerable: true, get: function() { - return exponentialRetryPolicy_js_1$1.exponentialRetryPolicyName; + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } }); - var retryPolicy_js_1$1 = require_retryPolicy$1(); + var retryPolicy_js_1 = require_retryPolicy$1(); Object.defineProperty(exports, "retryPolicy", { enumerable: true, get: function() { - return retryPolicy_js_1$1.retryPolicy; + return retryPolicy_js_1.retryPolicy; } }); - var systemErrorRetryPolicy_js_1$1 = require_systemErrorRetryPolicy$1(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy$1(); Object.defineProperty(exports, "systemErrorRetryPolicy", { enumerable: true, get: function() { - return systemErrorRetryPolicy_js_1$1.systemErrorRetryPolicy; + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports, "systemErrorRetryPolicyName", { enumerable: true, get: function() { - return systemErrorRetryPolicy_js_1$1.systemErrorRetryPolicyName; + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1$1 = require_throttlingRetryPolicy$1(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy$1(); Object.defineProperty(exports, "throttlingRetryPolicy", { enumerable: true, get: function() { - return throttlingRetryPolicy_js_1$1.throttlingRetryPolicy; + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports, "throttlingRetryPolicyName", { enumerable: true, get: function() { - return throttlingRetryPolicy_js_1$1.throttlingRetryPolicyName; + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var formDataPolicy_js_1$2 = require_formDataPolicy$1(); + var formDataPolicy_js_1 = require_formDataPolicy$1(); Object.defineProperty(exports, "formDataPolicy", { enumerable: true, get: function() { - return formDataPolicy_js_1$2.formDataPolicy; + return formDataPolicy_js_1.formDataPolicy; } }); Object.defineProperty(exports, "formDataPolicyName", { enumerable: true, get: function() { - return formDataPolicy_js_1$2.formDataPolicyName; + return formDataPolicy_js_1.formDataPolicyName; } }); - var logPolicy_js_1$2 = require_logPolicy$1(); + var logPolicy_js_1 = require_logPolicy$1(); Object.defineProperty(exports, "logPolicy", { enumerable: true, get: function() { - return logPolicy_js_1$2.logPolicy; + return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports, "logPolicyName", { enumerable: true, get: function() { - return logPolicy_js_1$2.logPolicyName; + return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1$2 = require_multipartPolicy$1(); + var multipartPolicy_js_1 = require_multipartPolicy$1(); Object.defineProperty(exports, "multipartPolicy", { enumerable: true, get: function() { - return multipartPolicy_js_1$2.multipartPolicy; + return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports, "multipartPolicyName", { enumerable: true, get: function() { - return multipartPolicy_js_1$2.multipartPolicyName; + return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1$2 = require_proxyPolicy$1(); + var proxyPolicy_js_1 = require_proxyPolicy$1(); Object.defineProperty(exports, "proxyPolicy", { enumerable: true, get: function() { - return proxyPolicy_js_1$2.proxyPolicy; + return proxyPolicy_js_1.proxyPolicy; } }); Object.defineProperty(exports, "proxyPolicyName", { enumerable: true, get: function() { - return proxyPolicy_js_1$2.proxyPolicyName; + return proxyPolicy_js_1.proxyPolicyName; } }); Object.defineProperty(exports, "getDefaultProxySettings", { enumerable: true, get: function() { - return proxyPolicy_js_1$2.getDefaultProxySettings; + return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1$2 = require_redirectPolicy$1(); + var redirectPolicy_js_1 = require_redirectPolicy$1(); Object.defineProperty(exports, "redirectPolicy", { enumerable: true, get: function() { - return redirectPolicy_js_1$2.redirectPolicy; + return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports, "redirectPolicyName", { enumerable: true, get: function() { - return redirectPolicy_js_1$2.redirectPolicyName; + return redirectPolicy_js_1.redirectPolicyName; } }); - var tlsPolicy_js_1$2 = require_tlsPolicy$1(); + var tlsPolicy_js_1 = require_tlsPolicy$1(); Object.defineProperty(exports, "tlsPolicy", { enumerable: true, get: function() { - return tlsPolicy_js_1$2.tlsPolicy; + return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports, "tlsPolicyName", { enumerable: true, get: function() { - return tlsPolicy_js_1$2.tlsPolicyName; + return tlsPolicy_js_1.tlsPolicyName; } }); - var userAgentPolicy_js_1$2 = require_userAgentPolicy$1(); + var userAgentPolicy_js_1 = require_userAgentPolicy$1(); Object.defineProperty(exports, "userAgentPolicy", { enumerable: true, get: function() { - return userAgentPolicy_js_1$2.userAgentPolicy; + return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports, "userAgentPolicyName", { enumerable: true, get: function() { - return userAgentPolicy_js_1$2.userAgentPolicyName; + return userAgentPolicy_js_1.userAgentPolicyName; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.logPolicyName = void 0; exports.logPolicy = logPolicy; - const log_js_1$5 = require_log$1(); - const policies_1$12 = require_internal$1(); + const log_js_1 = require_log$3(); + const policies_1 = require_internal$1(); /** * The programmatic identifier of the logPolicy. */ - exports.logPolicyName = policies_1$12.logPolicyName; + exports.logPolicyName = policies_1.logPolicyName; /** * A policy that logs all requests and responses. * @param options - Options to configure logPolicy. */ function logPolicy(options = {}) { - return (0, policies_1$12.logPolicy)(Object.assign({ logger: log_js_1$5.logger.info }, options)); + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.redirectPolicyName = void 0; exports.redirectPolicy = redirectPolicy; - const policies_1$11 = require_internal$1(); + const policies_1 = require_internal$1(); /** * The programmatic identifier of the redirectPolicy. */ - exports.redirectPolicyName = policies_1$11.redirectPolicyName; + exports.redirectPolicyName = policies_1.redirectPolicyName; /** * A policy to follow Location headers from the server in order * to support server-side redirection. @@ -7230,19 +7497,19 @@ var require_redirectPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-p * @param options - Options to control policy behavior. */ function redirectPolicy(options = {}) { - return (0, policies_1$11.redirectPolicy)(options); + return (0, policies_1.redirectPolicy)(options); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getHeaderName = getHeaderName; exports.setPlatformSpecificData = setPlatformSpecificData; - const tslib_1$3 = require_tslib(); - const os$1 = tslib_1$3.__importStar(__require("node:os")); - const process$2 = tslib_1$3.__importStar(__require("node:process")); + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const node_os_1 = tslib_1.__importDefault(__require("node:os")); + const node_process_1 = tslib_1.__importDefault(__require("node:process")); /** * @internal */ @@ -7253,34 +7520,34 @@ var require_userAgentPlatform = __commonJS({ "node_modules/.deno/@azure+core-res * @internal */ async function setPlatformSpecificData(map) { - if (process$2 && process$2.versions) { - const versions = process$2.versions; - if (versions.bun) map.set("Bun", versions.bun); - else if (versions.deno) map.set("Deno", versions.deno); - else if (versions.node) map.set("Node", versions.node); + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) map.set("Bun", `${versions.bun} (${osInfo})`); + else if (versions.deno) map.set("Deno", `${versions.deno} (${osInfo})`); + else if (versions.node) map.set("Node", `${versions.node} (${osInfo})`); } - map.set("OS", `(${os$1.arch()}-${os$1.type()}-${os$1.release()})`); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants$1 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; - exports.SDK_VERSION = "1.20.0"; + exports.SDK_VERSION = "1.22.2"; exports.DEFAULT_RETRY_POLICY_COUNT = 3; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getUserAgentHeaderName = getUserAgentHeaderName; exports.getUserAgentValue = getUserAgentValue; const userAgentPlatform_js_1 = require_userAgentPlatform(); - const constants_js_1$5 = require_constants$1(); - function getUserAgentString$1(telemetryInfo) { + const constants_js_1 = require_constants$3(); + function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { const token = value ? `${key}/${value}` : key; @@ -7297,24 +7564,23 @@ var require_userAgent = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeli /** * @internal */ - async function getUserAgentValue(prefix$1) { - const runtimeInfo = new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1$5.SDK_VERSION); + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString$1(runtimeInfo); - const userAgentValue = prefix$1 ? `${prefix$1} ${defaultAgent}` : defaultAgent; - return userAgentValue; + const defaultAgent = getUserAgentString(runtimeInfo); + return prefix ? `${prefix} ${defaultAgent}` : defaultAgent; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.userAgentPolicyName = void 0; exports.userAgentPolicy = userAgentPolicy; - const userAgent_js_1$1 = require_userAgent(); - const UserAgentHeaderName = (0, userAgent_js_1$1.getUserAgentHeaderName)(); + const userAgent_js_1 = require_userAgent(); + const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** * The programmatic identifier of the userAgentPolicy. */ @@ -7325,7 +7591,7 @@ var require_userAgentPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest- * @param options - Options to customize the user agent value. */ function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1$1.getUserAgentValue)(options.userAgentPrefix); + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); return { name: exports.userAgentPolicyName, async sendRequest(request, next) { @@ -7334,45 +7600,45 @@ var require_userAgentPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest- } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js -var require_sha256 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.computeSha256Hmac = computeSha256Hmac$1; - exports.computeSha256Hash = computeSha256Hash$1; - const node_crypto_1 = __require("node:crypto"); + exports.computeSha256Hmac = computeSha256Hmac; + exports.computeSha256Hash = computeSha256Hash; + const node_crypto_1$3 = __require("node:crypto"); /** * Generates a SHA-256 HMAC signature. * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. * @param stringToSign - The data to be signed. * @param encoding - The textual encoding to use for the returned HMAC digest. */ - async function computeSha256Hmac$1(key, stringToSign, encoding) { + async function computeSha256Hmac(key, stringToSign, encoding) { const decodedKey = Buffer.from(key, "base64"); - return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + return (0, node_crypto_1$3.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); } /** * Generates a SHA-256 hash. * @param content - The data to be included in the hash. * @param encoding - The textual encoding to use for the returned hash. */ - async function computeSha256Hash$1(content, encoding) { - return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1$3.createHash)("sha256").update(content).digest(encoding); } -} }); +})); //#endregion -//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js -var require_internal = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports) { +//#region node_modules/.deno/@typespec+ts-http-runtime@0.3.3/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Sanitizer = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isBrowser = exports.randomUUID = exports.computeSha256Hmac = exports.computeSha256Hash = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.calculateRetryDelay = void 0; - var delay_js_1$1 = require_delay$1(); + var delay_js_1 = require_delay$1(); Object.defineProperty(exports, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1$1.calculateRetryDelay; + return delay_js_1.calculateRetryDelay; } }); var random_js_1 = require_random(); @@ -7389,11 +7655,11 @@ var require_internal = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtim return object_js_1.isObject; } }); - var error_js_1$1 = require_error$1(); + var error_js_1 = require_error$1(); Object.defineProperty(exports, "isError", { enumerable: true, get: function() { - return error_js_1$1.isError; + return error_js_1.isError; } }); var sha256_js_1 = require_sha256(); @@ -7479,35 +7745,34 @@ var require_internal = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtim return sanitizer_js_1.Sanitizer; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports) { +//#region node_modules/.deno/@azure+core-util@1.13.1/node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.cancelablePromiseRace = cancelablePromiseRace; /** * promise.race() wrapper that aborts rest of promises as soon as the first promise settles. */ async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a$2, _b$1; const aborter = new AbortController(); function abortHandler() { aborter.abort(); } - (_a$2 = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a$2 === void 0 || _a$2.addEventListener("abort", abortHandler); + options?.abortSignal?.addEventListener("abort", abortHandler); try { return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); } finally { aborter.abort(); - (_b$1 = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b$1 === void 0 || _b$1.removeEventListener("abort", abortHandler); + options?.abortSignal?.removeEventListener("abort", abortHandler); } } -} }); +})); //#endregion //#region node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ "node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports) { +var require_AbortError = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AbortError = void 0; /** @@ -7528,18 +7793,18 @@ var require_AbortError = __commonJS({ "node_modules/.deno/@azure+abort-controlle * } * ``` */ - var AbortError$1 = class extends Error { + var AbortError = class extends Error { constructor(message) { super(message); this.name = "AbortError"; } }; - exports.AbortError = AbortError$1; -} }); + exports.AbortError = AbortError; +})); //#endregion //#region node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs$10 = __commonJS({ "node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports) { +var require_commonjs$12 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AbortError = void 0; var AbortError_js_1 = require_AbortError(); @@ -7549,14 +7814,14 @@ var require_commonjs$10 = __commonJS({ "node_modules/.deno/@azure+abort-controll return AbortError_js_1.AbortError; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports) { +//#region node_modules/.deno/@azure+core-util@1.13.1/node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createAbortablePromise = createAbortablePromise; - const abort_controller_1$1 = require_commonjs$10(); + const abort_controller_1 = require_commonjs$12(); /** * Creates an abortable promise. * @param buildPromise - A function that takes the resolve and reject functions as parameters. @@ -7564,20 +7829,20 @@ var require_createAbortablePromise = __commonJS({ "node_modules/.deno/@azure+cor * @returns A promise that can be aborted. */ function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal: abortSignal$1, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; return new Promise((resolve, reject) => { function rejectOnAbort() { - reject(new abort_controller_1$1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } function removeListeners() { - abortSignal$1 === null || abortSignal$1 === void 0 || abortSignal$1.removeEventListener("abort", onAbort); + abortSignal?.removeEventListener("abort", onAbort); } function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 || cleanupBeforeAbort(); + cleanupBeforeAbort?.(); removeListeners(); rejectOnAbort(); } - if (abortSignal$1 === null || abortSignal$1 === void 0 ? void 0 : abortSignal$1.aborted) return rejectOnAbort(); + if (abortSignal?.aborted) return rejectOnAbort(); try { buildPromise((x) => { removeListeners(); @@ -7589,19 +7854,19 @@ var require_createAbortablePromise = __commonJS({ "node_modules/.deno/@azure+cor } catch (err) { reject(err); } - abortSignal$1 === null || abortSignal$1 === void 0 || abortSignal$1.addEventListener("abort", onAbort); + abortSignal?.addEventListener("abort", onAbort); }); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/delay.js"(exports) { +//#region node_modules/.deno/@azure+core-util@1.13.1/node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.delay = delay$2; - exports.calculateRetryDelay = calculateRetryDelay$1; - const createAbortablePromise_js_1$1 = require_createAbortablePromise(); - const util_1$3 = require_internal(); + exports.delay = delay; + exports.calculateRetryDelay = calculateRetryDelay; + const createAbortablePromise_js_1 = require_createAbortablePromise(); + const util_1 = require_internal(); const StandardAbortMessage = "The delay was aborted."; /** * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. @@ -7609,15 +7874,15 @@ var require_delay = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/nod * @param options - The options for delay - currently abort options * @returns Promise that is resolved after timeInMs */ - function delay$2(timeInMs, options) { + function delay(timeInMs, options) { let token; - const { abortSignal: abortSignal$1, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1$1.createAbortablePromise)((resolve) => { + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { token = setTimeout(resolve, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), - abortSignal: abortSignal$1, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage }); } /** @@ -7626,20 +7891,19 @@ var require_delay = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/nod * @param config - The exponential retry configuration. * @returns An object containing the calculated retry delay. */ - function calculateRetryDelay$1(retryAttempt, config) { + function calculateRetryDelay(retryAttempt, config) { const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, util_1$3.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; + return { retryAfterInMs: clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2) }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/error.js"(exports) { +//#region node_modules/.deno/@azure+core-util@1.13.1/node_modules/@azure/core-util/dist/commonjs/error.js +var require_error = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getErrorMessage = getErrorMessage; - const util_1$2 = require_internal(); + const util_1 = require_internal(); /** * Given what is thought to be an error object, return the message if possible. * If the message is missing, returns a stringified version of the input. @@ -7647,7 +7911,7 @@ var require_error = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/nod * @returns The error message or a string of the input */ function getErrorMessage(e) { - if ((0, util_1$2.isError)(e)) return e.message; + if ((0, util_1.isError)(e)) return e.message; else { let stringified; try { @@ -7659,11 +7923,11 @@ var require_error = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/nod return `Unknown error ${stringified}`; } } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports) { +//#region node_modules/.deno/@azure+core-util@1.13.1/node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isDefined = isDefined; exports.isObjectWithProperties = isObjectWithProperties; @@ -7693,11 +7957,11 @@ var require_typeGuards = __commonJS({ "node_modules/.deno/@azure+core-util@1.12. function objectHasProperty(thing, property) { return isDefined(thing) && typeof thing === "object" && property in thing; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs$9 = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+core-util@1.13.1/node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs$11 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isWebWorker = exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isDeno = exports.isBun = exports.isBrowser = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.getErrorMessage = exports.delay = exports.createAbortablePromise = exports.cancelablePromiseRace = void 0; exports.calculateRetryDelay = calculateRetryDelay; @@ -7709,8 +7973,7 @@ var require_commonjs$9 = __commonJS({ "node_modules/.deno/@azure+core-util@1.12. exports.randomUUID = randomUUID; exports.uint8ArrayToString = uint8ArrayToString; exports.stringToUint8Array = stringToUint8Array; - const tslib_1$2 = require_tslib(); - const tspRuntime = tslib_1$2.__importStar(require_internal()); + const tspRuntime = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)).__importStar(require_internal()); var aborterUtils_js_1 = require_aborterUtils(); Object.defineProperty(exports, "cancelablePromiseRace", { enumerable: true, @@ -7880,17 +8143,17 @@ var require_commonjs$9 = __commonJS({ "node_modules/.deno/@azure+core-util@1.12. function stringToUint8Array(value, format) { return tspRuntime.stringToUint8Array(value, format); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.hasRawContent = hasRawContent; exports.getRawContent = getRawContent; exports.createFileFromStream = createFileFromStream; exports.createFile = createFile; - const core_util_1$7 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); function isNodeReadableStream(x) { return Boolean(x && typeof x["pipe"] === "function"); } @@ -7957,21 +8220,21 @@ var require_file = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1. * @param name - the name of the file. * @param options - optional metadata about the file, e.g. file name, file size, MIME type. */ - function createFileFromStream(stream$3, name, options = {}) { - var _a$2, _b$1, _c$1, _d$1; - return Object.assign(Object.assign({}, unimplementedMethods), { - type: (_a$2 = options.type) !== null && _a$2 !== void 0 ? _a$2 : "", - lastModified: (_b$1 = options.lastModified) !== null && _b$1 !== void 0 ? _b$1 : new Date().getTime(), - webkitRelativePath: (_c$1 = options.webkitRelativePath) !== null && _c$1 !== void 0 ? _c$1 : "", - size: (_d$1 = options.size) !== null && _d$1 !== void 0 ? _d$1 : -1, + function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, name, stream: () => { - const s$1 = stream$3(); - if (isNodeReadableStream(s$1)) throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - return s$1; + const s = stream(); + if (isNodeReadableStream(s)) throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + return s; }, - [rawContent]: stream$3 - }); + [rawContent]: stream + }; } /** * Create an object that implements the File interface. This object is intended to be @@ -7985,81 +8248,85 @@ var require_file = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1. * @param options - optional metadata about the file, e.g. file name, file size, MIME type. */ function createFile(content, name, options = {}) { - var _a$2, _b$1, _c$1; - if (core_util_1$7.isNodeLike) return Object.assign(Object.assign({}, unimplementedMethods), { - type: (_a$2 = options.type) !== null && _a$2 !== void 0 ? _a$2 : "", - lastModified: (_b$1 = options.lastModified) !== null && _b$1 !== void 0 ? _b$1 : new Date().getTime(), - webkitRelativePath: (_c$1 = options.webkitRelativePath) !== null && _c$1 !== void 0 ? _c$1 : "", + if (core_util_1.isNodeLike) return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, - stream: () => new Blob([content]).stream(), + stream: () => new Blob([toArrayBuffer(content)]).stream(), [rawContent]: () => content - }); - else return new File([content], name, options); + }; + else return new File([toArrayBuffer(content)], name, options); } -} }); + function toArrayBuffer(source) { + if ("resize" in source.buffer) return source; + return source.map((x) => x); + } +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.multipartPolicyName = void 0; exports.multipartPolicy = multipartPolicy; - const policies_1$10 = require_internal$1(); - const file_js_1$1 = require_file(); + const policies_1 = require_internal$1(); + const file_js_1 = require_file(); /** * Name of multipart policy */ - exports.multipartPolicyName = policies_1$10.multipartPolicyName; + exports.multipartPolicyName = policies_1.multipartPolicyName; /** * Pipeline policy for multipart requests */ function multipartPolicy() { - const tspPolicy = (0, policies_1$10.multipartPolicy)(); + const tspPolicy = (0, policies_1.multipartPolicy)(); return { name: exports.multipartPolicyName, sendRequest: async (request, next) => { if (request.multipartBody) { - for (const part of request.multipartBody.parts) if ((0, file_js_1$1.hasRawContent)(part.body)) part.body = (0, file_js_1$1.getRawContent)(part.body); + for (const part of request.multipartBody.parts) if ((0, file_js_1.hasRawContent)(part.body)) part.body = (0, file_js_1.getRawContent)(part.body); } return tspPolicy.sendRequest(request, next); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.decompressResponsePolicyName = void 0; exports.decompressResponsePolicy = decompressResponsePolicy; - const policies_1$9 = require_internal$1(); + const policies_1 = require_internal$1(); /** * The programmatic identifier of the decompressResponsePolicy. */ - exports.decompressResponsePolicyName = policies_1$9.decompressResponsePolicyName; + exports.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; /** * A policy to enable response decompression according to Accept-Encoding header * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding */ function decompressResponsePolicy() { - return (0, policies_1$9.decompressResponsePolicy)(); + return (0, policies_1.decompressResponsePolicy)(); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultRetryPolicyName = void 0; exports.defaultRetryPolicy = defaultRetryPolicy; - const policies_1$8 = require_internal$1(); + const policies_1 = require_internal$1(); /** * Name of the {@link defaultRetryPolicy} */ - exports.defaultRetryPolicyName = policies_1$8.defaultRetryPolicyName; + exports.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; /** * A policy that retries according to three strategies: * - When the server sends a 429 response with a Retry-After header. @@ -8067,41 +8334,41 @@ var require_defaultRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-re * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. */ function defaultRetryPolicy(options = {}) { - return (0, policies_1$8.defaultRetryPolicy)(options); + return (0, policies_1.defaultRetryPolicy)(options); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js -var require_formDataPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.formDataPolicyName = void 0; exports.formDataPolicy = formDataPolicy; - const policies_1$7 = require_internal$1(); + const policies_1 = require_internal$1(); /** * The programmatic identifier of the formDataPolicy. */ - exports.formDataPolicyName = policies_1$7.formDataPolicyName; + exports.formDataPolicyName = policies_1.formDataPolicyName; /** * A policy that encodes FormData on the request into the body. */ function formDataPolicy() { - return (0, policies_1$7.formDataPolicy)(); + return (0, policies_1.formDataPolicy)(); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js -var require_proxyPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.proxyPolicyName = void 0; exports.getDefaultProxySettings = getDefaultProxySettings; exports.proxyPolicy = proxyPolicy; - const policies_1$6 = require_internal$1(); + const policies_1 = require_internal$1(); /** * The programmatic identifier of the proxyPolicy. */ - exports.proxyPolicyName = policies_1$6.proxyPolicyName; + exports.proxyPolicyName = policies_1.proxyPolicyName; /** * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. * If no argument is given, it attempts to parse a proxy URL from the environment @@ -8110,7 +8377,7 @@ var require_proxyPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe * @deprecated - Internally this method is no longer necessary when setting proxy information. */ function getDefaultProxySettings(proxyUrl) { - return (0, policies_1$6.getDefaultProxySettings)(proxyUrl); + return (0, policies_1.getDefaultProxySettings)(proxyUrl); } /** * A policy that allows one to apply proxy settings to all requests. @@ -8120,13 +8387,13 @@ var require_proxyPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe * @param options - additional settings, for example, custom NO_PROXY patterns */ function proxyPolicy(proxySettings, options) { - return (0, policies_1$6.proxyPolicy)(proxySettings, options); + return (0, policies_1.proxyPolicy)(proxySettings, options); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js -var require_setClientRequestIdPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js +var require_setClientRequestIdPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.setClientRequestIdPolicyName = void 0; exports.setClientRequestIdPolicy = setClientRequestIdPolicy; @@ -8149,49 +8416,49 @@ var require_setClientRequestIdPolicy = __commonJS({ "node_modules/.deno/@azure+c } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js -var require_agentPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.agentPolicyName = void 0; exports.agentPolicy = agentPolicy; - const policies_1$5 = require_internal$1(); + const policies_1 = require_internal$1(); /** * Name of the Agent Policy */ - exports.agentPolicyName = policies_1$5.agentPolicyName; + exports.agentPolicyName = policies_1.agentPolicyName; /** * Gets a pipeline policy that sets http.agent */ function agentPolicy(agent) { - return (0, policies_1$5.agentPolicy)(agent); + return (0, policies_1.agentPolicy)(agent); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.tlsPolicyName = void 0; exports.tlsPolicy = tlsPolicy; - const policies_1$4 = require_internal$1(); + const policies_1 = require_internal$1(); /** * Name of the TLS Policy */ - exports.tlsPolicyName = policies_1$4.tlsPolicyName; + exports.tlsPolicyName = policies_1.tlsPolicyName; /** * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. */ function tlsPolicy(tlsSettings) { - return (0, policies_1$4.tlsPolicy)(tlsSettings); + return (0, policies_1.tlsPolicy)(tlsSettings); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js -var require_tracingContext = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports) { +//#region node_modules/.deno/@azure+core-tracing@1.3.1/node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js +var require_tracingContext = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.TracingContextImpl = exports.knownContextKeys = void 0; exports.createTracingContext = createTracingContext; @@ -8208,15 +8475,16 @@ var require_tracingContext = __commonJS({ "node_modules/.deno/@azure+core-tracin * @internal */ function createTracingContext(options = {}) { - let context$2 = new TracingContextImpl(options.parentContext); - if (options.span) context$2 = context$2.setValue(exports.knownContextKeys.span, options.span); - if (options.namespace) context$2 = context$2.setValue(exports.knownContextKeys.namespace, options.namespace); - return context$2; + let context = new TracingContextImpl(options.parentContext); + if (options.span) context = context.setValue(exports.knownContextKeys.span, options.span); + if (options.namespace) context = context.setValue(exports.knownContextKeys.namespace, options.namespace); + return context; } /** @internal */ var TracingContextImpl = class TracingContextImpl { + _contextMap; constructor(initialContext) { - this._contextMap = initialContext instanceof TracingContextImpl ? new Map(initialContext._contextMap) : new Map(); + this._contextMap = initialContext instanceof TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } setValue(key, value) { const newContext = new TracingContextImpl(this); @@ -8233,11 +8501,11 @@ var require_tracingContext = __commonJS({ "node_modules/.deno/@azure+core-tracin } }; exports.TracingContextImpl = TracingContextImpl; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/state.js -var require_state$1 = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/state.js"(exports) { +//#region node_modules/.deno/@azure+core-tracing@1.3.1/node_modules/@azure/core-tracing/dist/commonjs/state.js +var require_state$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.state = void 0; /** @@ -8246,18 +8514,18 @@ var require_state$1 = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0 * Holds the singleton instrumenter, to be shared across CJS and ESM imports. */ exports.state = { instrumenterImplementation: void 0 }; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js -var require_instrumenter = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports) { +//#region node_modules/.deno/@azure+core-tracing@1.3.1/node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js +var require_instrumenter = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createDefaultTracingSpan = createDefaultTracingSpan; exports.createDefaultInstrumenter = createDefaultInstrumenter; exports.useInstrumenter = useInstrumenter; exports.getInstrumenter = getInstrumenter; - const tracingContext_js_1$1 = require_tracingContext(); - const state_js_1$1 = require_state$1(); + const tracingContext_js_1 = require_tracingContext(); + const state_js_1 = require_state$1(); function createDefaultTracingSpan() { return { end: () => {}, @@ -8273,13 +8541,11 @@ var require_instrumenter = __commonJS({ "node_modules/.deno/@azure+core-tracing@ createRequestHeaders: () => { return {}; }, - parseTraceparentHeader: () => { - return void 0; - }, + parseTraceparentHeader: () => {}, startSpan: (_name, spanOptions) => { return { span: createDefaultTracingSpan(), - tracingContext: (0, tracingContext_js_1$1.createTracingContext)({ parentContext: spanOptions.tracingContext }) + tracingContext: (0, tracingContext_js_1.createTracingContext)({ parentContext: spanOptions.tracingContext }) }; }, withContext(_context, callback, ...callbackArgs) { @@ -8293,7 +8559,7 @@ var require_instrumenter = __commonJS({ "node_modules/.deno/@azure+core-tracing@ * @param instrumenter - The instrumenter implementation to use. */ function useInstrumenter(instrumenter) { - state_js_1$1.state.instrumenterImplementation = instrumenter; + state_js_1.state.instrumenterImplementation = instrumenter; } /** * Gets the currently set instrumenter, a No-Op instrumenter by default. @@ -8301,17 +8567,17 @@ var require_instrumenter = __commonJS({ "node_modules/.deno/@azure+core-tracing@ * @returns The currently set instrumenter */ function getInstrumenter() { - if (!state_js_1$1.state.instrumenterImplementation) state_js_1$1.state.instrumenterImplementation = createDefaultInstrumenter(); - return state_js_1$1.state.instrumenterImplementation; + if (!state_js_1.state.instrumenterImplementation) state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); + return state_js_1.state.instrumenterImplementation; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js -var require_tracingClient = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports) { +//#region node_modules/.deno/@azure+core-tracing@1.3.1/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js +var require_tracingClient = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createTracingClient = createTracingClient; - const instrumenter_js_1$1 = require_instrumenter(); + const instrumenter_js_1 = require_instrumenter(); const tracingContext_js_1 = require_tracingContext(); /** * Creates a new tracing client. @@ -8322,20 +8588,22 @@ var require_tracingClient = __commonJS({ "node_modules/.deno/@azure+core-tracing function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a$2; - const startSpanResult = (0, instrumenter_js_1$1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, packageName, packageVersion, - tracingContext: (_a$2 = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a$2 === void 0 ? void 0 : _a$2.tracingContext - })); + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); - const updatedOptions = Object.assign({}, operationOptions, { tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) }); return { span, - updatedOptions + updatedOptions: Object.assign({}, operationOptions, { tracingOptions: { + ...operationOptions?.tracingOptions, + tracingContext + } }) }; } async function withSpan(name, operationOptions, callback, spanOptions) { @@ -8354,8 +8622,8 @@ var require_tracingClient = __commonJS({ "node_modules/.deno/@azure+core-tracing span.end(); } } - function withContext(context$2, callback, ...callbackArgs) { - return (0, instrumenter_js_1$1.getInstrumenter)().withContext(context$2, callback, ...callbackArgs); + function withContext(context, callback, ...callbackArgs) { + return (0, instrumenter_js_1.getInstrumenter)().withContext(context, callback, ...callbackArgs); } /** * Parses a traceparent header value into a span identifier. @@ -8364,7 +8632,7 @@ var require_tracingClient = __commonJS({ "node_modules/.deno/@azure+core-tracing * @returns An implementation-specific identifier for the span. */ function parseTraceparentHeader(traceparentHeader) { - return (0, instrumenter_js_1$1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); + return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); } /** * Creates a set of request headers to propagate tracing information to a backend. @@ -8373,7 +8641,7 @@ var require_tracingClient = __commonJS({ "node_modules/.deno/@azure+core-tracing * @returns The set of headers to add to a request. */ function createRequestHeaders(tracingContext) { - return (0, instrumenter_js_1$1.getInstrumenter)().createRequestHeaders(tracingContext); + return (0, instrumenter_js_1.getInstrumenter)().createRequestHeaders(tracingContext); } return { startSpan, @@ -8383,11 +8651,11 @@ var require_tracingClient = __commonJS({ "node_modules/.deno/@azure+core-tracing createRequestHeaders }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs$8 = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+core-tracing@1.3.1/node_modules/@azure/core-tracing/dist/commonjs/index.js +var require_commonjs$10 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createTracingClient = exports.useInstrumenter = void 0; var instrumenter_js_1 = require_instrumenter(); @@ -8404,58 +8672,41 @@ var require_commonjs$8 = __commonJS({ "node_modules/.deno/@azure+core-tracing@1. return tracingClient_js_1.createTracingClient; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js +var require_restError = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.RestError = void 0; exports.isRestError = isRestError; - const ts_http_runtime_1$3 = require_commonjs$12(); + const ts_http_runtime_1 = require_commonjs$14(); /** * A custom error type for failed pipeline requests. */ - var RestError = class extends Error { - constructor(message, options = {}) { - super(message); - return new ts_http_runtime_1$3.RestError(message, options); - } - }; - exports.RestError = RestError; - /** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - /** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ - RestError.PARSE_ERROR = "PARSE_ERROR"; + exports.RestError = ts_http_runtime_1.RestError; /** * Typeguard for RestError * @param e - Something caught by a catch clause. */ function isRestError(e) { - return (0, ts_http_runtime_1$3.isRestError)(e); + return (0, ts_http_runtime_1.isRestError)(e); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js -var require_tracingPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js +var require_tracingPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.tracingPolicyName = void 0; exports.tracingPolicy = tracingPolicy; - const core_tracing_1 = require_commonjs$8(); - const constants_js_1$4 = require_constants$1(); + const core_tracing_1 = require_commonjs$10(); + const constants_js_1 = require_constants$3(); const userAgent_js_1 = require_userAgent(); - const log_js_1$4 = require_log$1(); - const core_util_1$6 = require_commonjs$9(); - const restError_js_1$2 = require_restError(); - const util_1$1 = require_internal(); + const log_js_1 = require_log$3(); + const core_util_1 = require_commonjs$11(); + const restError_js_1 = require_restError(); + const util_1 = require_internal(); /** * The programmatic identifier of the tracingPolicy. */ @@ -8468,13 +8719,12 @@ var require_tracingPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pi */ function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new util_1$1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); - const tracingClient$1 = tryCreateTracingClient(); + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); + const tracingClient = tryCreateTracingClient(); return { name: exports.tracingPolicyName, async sendRequest(request, next) { - var _a$2; - if (!tracingClient$1) return next(request); + if (!tracingClient) return next(request); const userAgent = await userAgentPromise; const spanAttributes = { "http.url": sanitizer.sanitizeUrl(request.url), @@ -8483,10 +8733,10 @@ var require_tracingPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pi requestId: request.requestId }; if (userAgent) spanAttributes["http.user_agent"] = userAgent; - const { span, tracingContext } = (_a$2 = tryCreateSpan(tracingClient$1, request, spanAttributes)) !== null && _a$2 !== void 0 ? _a$2 : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) return next(request); try { - const response = await tracingClient$1.withContext(tracingContext, next, request); + const response = await tracingClient.withContext(tracingContext, next, request); tryProcessResponse(span, response); return response; } catch (err) { @@ -8501,44 +8751,44 @@ var require_tracingPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pi return (0, core_tracing_1.createTracingClient)({ namespace: "", packageName: "@azure/core-rest-pipeline", - packageVersion: constants_js_1$4.SDK_VERSION + packageVersion: constants_js_1.SDK_VERSION }); } catch (e) { - log_js_1$4.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1$6.getErrorMessage)(e)}`); - return void 0; + log_js_1.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1.getErrorMessage)(e)}`); + return; } } - function tryCreateSpan(tracingClient$1, request, spanAttributes) { + function tryCreateSpan(tracingClient, request, spanAttributes) { try { - const { span, updatedOptions } = tracingClient$1.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { + const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { spanKind: "client", spanAttributes }); if (!span.isRecording()) { span.end(); - return void 0; + return; } - const headers = tracingClient$1.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); + const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); for (const [key, value] of Object.entries(headers)) request.headers.set(key, value); return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; } catch (e) { - log_js_1$4.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1$6.getErrorMessage)(e)}`); - return void 0; + log_js_1.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + return; } } function tryProcessError(span, error) { try { span.setStatus({ status: "error", - error: (0, core_util_1$6.isError)(error) ? error : void 0 + error: (0, core_util_1.isError)(error) ? error : void 0 }); - if ((0, restError_js_1$2.isRestError)(error) && error.statusCode) span.setAttribute("http.status_code", error.statusCode); + if ((0, restError_js_1.isRestError)(error) && error.statusCode) span.setAttribute("http.status_code", error.statusCode); span.end(); } catch (e) { - log_js_1$4.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1$6.getErrorMessage)(e)}`); + log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); } } function tryProcessResponse(span, response) { @@ -8549,14 +8799,14 @@ var require_tracingPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pi if (response.status >= 400) span.setStatus({ status: "error" }); span.end(); } catch (e) { - log_js_1$4.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1$6.getErrorMessage)(e)}`); + log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); } } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js -var require_wrapAbortSignal = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapAbortSignalLike = wrapAbortSignalLike; /** @@ -8586,15 +8836,15 @@ var require_wrapAbortSignal = __commonJS({ "node_modules/.deno/@azure+core-rest- cleanup }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js -var require_wrapAbortSignalLikePolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapAbortSignalLikePolicyName = void 0; exports.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; - const wrapAbortSignal_js_1$1 = require_wrapAbortSignal(); + const wrapAbortSignal_js_1 = require_wrapAbortSignal(); exports.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; /** * Policy that ensure that any AbortSignalLike is wrapped in a native AbortSignal for processing by the pipeline. @@ -8607,109 +8857,111 @@ var require_wrapAbortSignalLikePolicy = __commonJS({ "node_modules/.deno/@azure+ name: exports.wrapAbortSignalLikePolicyName, sendRequest: async (request, next) => { if (!request.abortSignal) return next(request); - const { abortSignal: abortSignal$1, cleanup } = (0, wrapAbortSignal_js_1$1.wrapAbortSignalLike)(request.abortSignal); - request.abortSignal = abortSignal$1; + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; try { return await next(request); } finally { - cleanup === null || cleanup === void 0 || cleanup(); + cleanup?.(); } } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createPipelineFromOptions = createPipelineFromOptions; - const logPolicy_js_1$1 = require_logPolicy(); - const pipeline_js_1$3 = require_pipeline$1(); - const redirectPolicy_js_1$1 = require_redirectPolicy(); - const userAgentPolicy_js_1$1 = require_userAgentPolicy(); - const multipartPolicy_js_1$1 = require_multipartPolicy(); - const decompressResponsePolicy_js_1$1 = require_decompressResponsePolicy(); - const defaultRetryPolicy_js_1$1 = require_defaultRetryPolicy(); - const formDataPolicy_js_1$1 = require_formDataPolicy(); - const core_util_1$5 = require_commonjs$9(); - const proxyPolicy_js_1$1 = require_proxyPolicy(); - const setClientRequestIdPolicy_js_1$1 = require_setClientRequestIdPolicy(); - const agentPolicy_js_1$1 = require_agentPolicy(); - const tlsPolicy_js_1$1 = require_tlsPolicy(); - const tracingPolicy_js_1$1 = require_tracingPolicy(); + const logPolicy_js_1 = require_logPolicy(); + const pipeline_js_1 = require_pipeline$1(); + const redirectPolicy_js_1 = require_redirectPolicy(); + const userAgentPolicy_js_1 = require_userAgentPolicy(); + const multipartPolicy_js_1 = require_multipartPolicy(); + const decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + const defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + const formDataPolicy_js_1 = require_formDataPolicy(); + const core_util_1 = require_commonjs$11(); + const proxyPolicy_js_1 = require_proxyPolicy(); + const setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); + const agentPolicy_js_1 = require_agentPolicy(); + const tlsPolicy_js_1 = require_tlsPolicy(); + const tracingPolicy_js_1 = require_tracingPolicy(); const wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); /** * Create a new pipeline with a default set of customizable policies. * @param options - Options to configure a custom pipeline. */ function createPipelineFromOptions(options) { - var _a$2; - const pipeline = (0, pipeline_js_1$3.createEmptyPipeline)(); - if (core_util_1$5.isNodeLike) { - if (options.agent) pipeline.addPolicy((0, agentPolicy_js_1$1.agentPolicy)(options.agent)); - if (options.tlsOptions) pipeline.addPolicy((0, tlsPolicy_js_1$1.tlsPolicy)(options.tlsOptions)); - pipeline.addPolicy((0, proxyPolicy_js_1$1.proxyPolicy)(options.proxyOptions)); - pipeline.addPolicy((0, decompressResponsePolicy_js_1$1.decompressResponsePolicy)()); + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (core_util_1.isNodeLike) { + if (options.agent) pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + if (options.tlsOptions) pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); - pipeline.addPolicy((0, formDataPolicy_js_1$1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1$1.multipartPolicyName] }); - pipeline.addPolicy((0, userAgentPolicy_js_1$1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1$1.setClientRequestIdPolicy)((_a$2 = options.telemetryOptions) === null || _a$2 === void 0 ? void 0 : _a$2.clientRequestIdHeaderName)); - pipeline.addPolicy((0, multipartPolicy_js_1$1.multipartPolicy)(), { afterPhase: "Deserialize" }); - pipeline.addPolicy((0, defaultRetryPolicy_js_1$1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1$1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { afterPhase: "Retry" }); - if (core_util_1$5.isNodeLike) pipeline.addPolicy((0, redirectPolicy_js_1$1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); - pipeline.addPolicy((0, logPolicy_js_1$1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ + ...options.userAgentOptions, + ...options.loggingOptions + }), { afterPhase: "Retry" }); + if (core_util_1.isNodeLike) pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); return pipeline; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createDefaultHttpClient = createDefaultHttpClient; - const ts_http_runtime_1$2 = require_commonjs$12(); + const ts_http_runtime_1 = require_commonjs$14(); const wrapAbortSignal_js_1 = require_wrapAbortSignal(); /** * Create the correct HttpClient for the current environment. */ function createDefaultHttpClient() { - const client = (0, ts_http_runtime_1$2.createDefaultHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); return { async sendRequest(request) { - const { abortSignal: abortSignal$1, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; try { - request.abortSignal = abortSignal$1; + request.abortSignal = abortSignal; return await client.sendRequest(request); } finally { - cleanup === null || cleanup === void 0 || cleanup(); + cleanup?.(); } } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js -var require_httpHeaders = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createHttpHeaders = createHttpHeaders; - const ts_http_runtime_1$1 = require_commonjs$12(); + const ts_http_runtime_1 = require_commonjs$14(); /** * Creates an object that satisfies the `HttpHeaders` interface. * @param rawHeaders - A simple object representing initial headers */ function createHttpHeaders(rawHeaders) { - return (0, ts_http_runtime_1$1.createHttpHeaders)(rawHeaders); + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createPipelineRequest = createPipelineRequest; - const ts_http_runtime_1 = require_commonjs$12(); + const ts_http_runtime_1 = require_commonjs$14(); /** * Creates a new pipeline request with the given options. * This method is to allow for the easy setting of default values and not required. @@ -8718,39 +8970,39 @@ var require_pipelineRequest = __commonJS({ "node_modules/.deno/@azure+core-rest- function createPipelineRequest(options) { return (0, ts_http_runtime_1.createPipelineRequest)(options); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.exponentialRetryPolicyName = void 0; exports.exponentialRetryPolicy = exponentialRetryPolicy; - const policies_1$3 = require_internal$1(); + const policies_1 = require_internal$1(); /** * The programmatic identifier of the exponentialRetryPolicy. */ - exports.exponentialRetryPolicyName = policies_1$3.exponentialRetryPolicyName; + exports.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; /** * A policy that attempts to retry requests while introducing an exponentially increasing delay. * @param options - Options that configure retry logic. */ function exponentialRetryPolicy(options = {}) { - return (0, policies_1$3.exponentialRetryPolicy)(options); + return (0, policies_1.exponentialRetryPolicy)(options); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.systemErrorRetryPolicyName = void 0; exports.systemErrorRetryPolicy = systemErrorRetryPolicy; - const policies_1$2 = require_internal$1(); + const policies_1 = require_internal$1(); /** * Name of the {@link systemErrorRetryPolicy} */ - exports.systemErrorRetryPolicyName = policies_1$2.systemErrorRetryPolicyName; + exports.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; /** * A retry policy that specifically seeks to handle errors in the * underlying transport layer (e.g. DNS lookup failures) rather than @@ -8758,60 +9010,63 @@ var require_systemErrorRetryPolicy = __commonJS({ "node_modules/.deno/@azure+cor * @param options - Options that customize the policy. */ function systemErrorRetryPolicy(options = {}) { - return (0, policies_1$2.systemErrorRetryPolicy)(options); + return (0, policies_1.systemErrorRetryPolicy)(options); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.throttlingRetryPolicyName = void 0; exports.throttlingRetryPolicy = throttlingRetryPolicy; - const policies_1$1 = require_internal$1(); + const policies_1 = require_internal$1(); /** * Name of the {@link throttlingRetryPolicy} */ - exports.throttlingRetryPolicyName = policies_1$1.throttlingRetryPolicyName; + exports.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; /** * A policy that retries when the server sends a 429 response with a Retry-After header. * * To learn more, please refer to - * https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + * https://learn.microsoft.com/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors * * @param options - Options that configure retry logic. */ function throttlingRetryPolicy(options = {}) { - return (0, policies_1$1.throttlingRetryPolicy)(options); + return (0, policies_1.throttlingRetryPolicy)(options); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.retryPolicy = retryPolicy; - const logger_1$2 = require_commonjs$11(); - const constants_js_1$3 = require_constants$1(); + const logger_1 = require_commonjs$13(); + const constants_js_1 = require_constants$3(); const policies_1 = require_internal$1(); - const retryPolicyLogger = (0, logger_1$2.createClientLogger)("core-rest-pipeline retryPolicy"); + const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); /** * retryPolicy is a generic policy to enable retrying requests when certain conditions are met */ - function retryPolicy(strategies, options = { maxRetries: constants_js_1$3.DEFAULT_RETRY_POLICY_COUNT }) { - return (0, policies_1.retryPolicy)(strategies, Object.assign({ logger: retryPolicyLogger }, options)); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js -var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js +var require_tokenCycler = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_CYCLER_OPTIONS = void 0; exports.createTokenCycler = createTokenCycler; - const core_util_1$4 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); exports.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, retryIntervalInMs: 3e3, @@ -8831,7 +9086,7 @@ var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe async function tryGetAccessToken() { if (Date.now() < refreshTimeout) try { return await getAccessToken(); - } catch (_a$2) { + } catch { return null; } else { @@ -8842,7 +9097,7 @@ var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe } let token = await tryGetAccessToken(); while (token === null) { - await (0, core_util_1$4.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -8865,7 +9120,10 @@ var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; /** * This little holder defines several predicates that we use to construct * the rules of refreshing the token. @@ -8875,10 +9133,9 @@ var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe return refreshWorker !== null; }, get shouldRefresh() { - var _a$2; if (cycler.isRefreshing) return false; - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) return true; - return ((_a$2 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a$2 !== void 0 ? _a$2 : 0) - options.refreshWindowInMs < Date.now(); + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) return true; + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, get mustRefresh() { return token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now(); @@ -8889,15 +9146,9 @@ var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe * running. */ function refresh(scopes, getTokenOptions) { - var _a$2; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); - refreshWorker = beginRefresh( - tryGetAccessToken, - options.retryIntervalInMs, - // If we don't have a token, then we should timeout immediately - (_a$2 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a$2 !== void 0 ? _a$2 : Date.now() -).then((_token) => { + refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, token?.expiresOnTimestamp ?? Date.now()).then((_token) => { refreshWorker = null; token = _token; tenantId = getTokenOptions.tenantId; @@ -8915,24 +9166,23 @@ var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipe const hasClaimChallenge = Boolean(tokenOptions.claims); const tenantIdChanged = tenantId !== tokenOptions.tenantId; if (hasClaimChallenge) token = null; - const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; - if (mustRefresh) return refresh(scopes, tokenOptions); + if (tenantIdChanged || hasClaimChallenge || cycler.mustRefresh) return refresh(scopes, tokenOptions); if (cycler.shouldRefresh) refresh(scopes, tokenOptions); return token; }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js -var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js +var require_bearerTokenAuthenticationPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.bearerTokenAuthenticationPolicyName = void 0; exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; exports.parseChallenges = parseChallenges; - const tokenCycler_js_1$1 = require_tokenCycler(); - const log_js_1$3 = require_log$1(); - const restError_js_1$1 = require_restError(); + const tokenCycler_js_1 = require_tokenCycler(); + const log_js_1 = require_log$3(); + const restError_js_1 = require_restError(); /** * The programmatic identifier of the bearerTokenAuthenticationPolicy. */ @@ -8950,7 +9200,7 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ try { return [await next(request), void 0]; } catch (e) { - if ((0, restError_js_1$1.isRestError)(e) && e.response) return [e.response, e]; + if ((0, restError_js_1.isRestError)(e) && e.response) return [e.response, e]; else throw e; } } @@ -8959,12 +9209,11 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ */ async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; - const getTokenOptions = { + const accessToken = await getAccessToken(scopes, { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions, enableCae: true - }; - const accessToken = await getAccessToken(scopes, getTokenOptions); + }); if (accessToken) options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } /** @@ -8980,14 +9229,13 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ * If this method returns true, the underlying request will be sent once again. */ async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { - var _a$2; const { scopes } = onChallengeOptions; const accessToken = await onChallengeOptions.getAccessToken(scopes, { enableCae: true, claims: caeClaims }); if (!accessToken) return false; - onChallengeOptions.request.headers.set("Authorization", `${(_a$2 = accessToken.tokenType) !== null && _a$2 !== void 0 ? _a$2 : "Bearer"} ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } /** @@ -8995,17 +9243,13 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ * then apply it to the Authorization header of a request as a Bearer token. */ function bearerTokenAuthenticationPolicy(options) { - var _a$2, _b$1, _c$1; const { credential, scopes, challengeCallbacks } = options; - const logger$2 = options.logger || log_js_1$3.logger; + const logger = options.logger || log_js_1.logger; const callbacks = { - authorizeRequest: (_b$1 = (_a$2 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a$2 === void 0 ? void 0 : _a$2.bind(challengeCallbacks)) !== null && _b$1 !== void 0 ? _b$1 : defaultAuthorizeRequest, - authorizeRequestOnChallenge: (_c$1 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c$1 === void 0 ? void 0 : _c$1.bind(challengeCallbacks) + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) }; - const getAccessToken = credential ? (0, tokenCycler_js_1$1.createTokenCycler)( - credential - /* , options */ -) : () => Promise.resolve(null); + const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)(credential) : () => Promise.resolve(null); return { name: exports.bearerTokenAuthenticationPolicyName, async sendRequest(request, next) { @@ -9014,7 +9258,7 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ scopes: Array.isArray(scopes) ? scopes : [scopes], request, getAccessToken, - logger: logger$2 + logger }); let response; let error; @@ -9027,7 +9271,7 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ try { parsedClaim = atob(claims); } catch (e) { - logger$2.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); return response; } shouldSendRequest = await authorizeRequestOnCaeChallenge({ @@ -9035,7 +9279,7 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ response, request, getAccessToken, - logger: logger$2 + logger }, parsedClaim); if (shouldSendRequest) [response, error] = await trySendRequest(request, next); } else if (callbacks.authorizeRequestOnChallenge) { @@ -9044,7 +9288,7 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ request, response, getAccessToken, - logger: logger$2 + logger }); if (shouldSendRequest) [response, error] = await trySendRequest(request, next); if (isChallengeResponse(response)) { @@ -9054,7 +9298,7 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ try { parsedClaim = atob(claims); } catch (e) { - logger$2.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); return response; } shouldSendRequest = await authorizeRequestOnCaeChallenge({ @@ -9062,7 +9306,7 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ response, request, getAccessToken, - logger: logger$2 + logger }, parsedClaim); if (shouldSendRequest) [response, error] = await trySendRequest(request, next); } @@ -9084,10 +9328,10 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; const paramRegex = /(\w+)="([^"]*)"/g; const parsedChallenges = []; - let match$2; - while ((match$2 = challengeRegex.exec(challenges)) !== null) { - const scheme = match$2[1]; - const paramsString = match$2[2]; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; const params = {}; let paramMatch; while ((paramMatch = paramRegex.exec(paramsString)) !== null) params[paramMatch[1]] = paramMatch[2]; @@ -9104,16 +9348,14 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@ * @internal */ function getCaeChallengeClaims(challenges) { - var _a$2; if (!challenges) return; - const parsedChallenges = parseChallenges(challenges); - return (_a$2 = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) === null || _a$2 === void 0 ? void 0 : _a$2.params.claims; + return parseChallenges(challenges).find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js -var require_ndJsonPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js +var require_ndJsonPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.ndJsonPolicyName = void 0; exports.ndJsonPolicy = ndJsonPolicy; @@ -9129,53 +9371,51 @@ var require_ndJsonPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pip name: exports.ndJsonPolicyName, async sendRequest(request, next) { if (typeof request.body === "string" && request.body.startsWith("[")) { - const body$1 = JSON.parse(request.body); - if (Array.isArray(body$1)) request.body = body$1.map((item) => JSON.stringify(item) + "\n").join(""); + const body = JSON.parse(request.body); + if (Array.isArray(body)) request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); } return next(request); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js -var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js +var require_auxiliaryAuthenticationHeaderPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.auxiliaryAuthenticationHeaderPolicyName = void 0; exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; const tokenCycler_js_1 = require_tokenCycler(); - const log_js_1$2 = require_log$1(); + const log_js_1 = require_log$3(); /** * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. */ exports.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a$2, _b$1; const { scopes, getAccessToken, request } = options; - const getTokenOptions = { + return (await getAccessToken(scopes, { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions - }; - return (_b$1 = (_a$2 = await getAccessToken(scopes, getTokenOptions)) === null || _a$2 === void 0 ? void 0 : _a$2.token) !== null && _b$1 !== void 0 ? _b$1 : ""; + }))?.token ?? ""; } /** * A policy for external tokens to `x-ms-authorization-auxiliary` header. * This header will be used when creating a cross-tenant application we may need to handle authentication requests * for resources that are in different tenants. - * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works + * You could see [ARM docs](https://learn.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works */ function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; - const logger$2 = options.logger || log_js_1$2.logger; - const tokenCyclerMap = new WeakMap(); + const logger = options.logger || log_js_1.logger; + const tokenCyclerMap = /* @__PURE__ */ new WeakMap(); return { name: exports.auxiliaryAuthenticationHeaderPolicyName, async sendRequest(request, next) { if (!request.url.toLowerCase().startsWith("https://")) throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); if (!credentials || credentials.length === 0) { - logger$2.info(`${exports.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); + logger.info(`${exports.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); return next(request); } const tokenPromises = []; @@ -9189,12 +9429,12 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ "node_modules/.de scopes: Array.isArray(scopes) ? scopes : [scopes], request, getAccessToken, - logger: logger$2 + logger })); } const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); if (auxiliaryTokens.length === 0) { - logger$2.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); + logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); return next(request); } request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); @@ -9202,18 +9442,18 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ "node_modules/.de } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs$7 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+core-rest-pipeline@1.22.2/node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js +var require_commonjs$9 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createFileFromStream = exports.createFile = exports.agentPolicyName = exports.agentPolicy = exports.auxiliaryAuthenticationHeaderPolicyName = exports.auxiliaryAuthenticationHeaderPolicy = exports.ndJsonPolicyName = exports.ndJsonPolicy = exports.bearerTokenAuthenticationPolicyName = exports.bearerTokenAuthenticationPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.userAgentPolicyName = exports.userAgentPolicy = exports.defaultRetryPolicy = exports.tracingPolicyName = exports.tracingPolicy = exports.retryPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.setClientRequestIdPolicyName = exports.setClientRequestIdPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.isRestError = exports.RestError = exports.createPipelineRequest = exports.createHttpHeaders = exports.createDefaultHttpClient = exports.createPipelineFromOptions = exports.createEmptyPipeline = void 0; - var pipeline_js_1$2 = require_pipeline$1(); + var pipeline_js_1 = require_pipeline$1(); Object.defineProperty(exports, "createEmptyPipeline", { enumerable: true, get: function() { - return pipeline_js_1$2.createEmptyPipeline; + return pipeline_js_1.createEmptyPipeline; } }); var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); @@ -9511,11 +9751,11 @@ var require_commonjs$7 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipel return file_js_1.createFileFromStream; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js -var require_azureKeyCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports) { +//#region node_modules/.deno/@azure+core-auth@1.10.1/node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js +var require_azureKeyCredential = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AzureKeyCredential = void 0; /** @@ -9523,6 +9763,7 @@ var require_azureKeyCredential = __commonJS({ "node_modules/.deno/@azure+core-au * the underlying key value. */ var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -9552,36 +9793,38 @@ var require_azureKeyCredential = __commonJS({ "node_modules/.deno/@azure+core-au } }; exports.AzureKeyCredential = AzureKeyCredential; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/keyCredential.js -var require_keyCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/keyCredential.js"(exports) { +//#region node_modules/.deno/@azure+core-auth@1.10.1/node_modules/@azure/core-auth/dist/commonjs/keyCredential.js +var require_keyCredential = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isKeyCredential = isKeyCredential; - const core_util_1$3 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); /** * Tests an object to determine whether it implements KeyCredential. * * @param credential - The assumed KeyCredential to be tested. */ function isKeyCredential(credential) { - return (0, core_util_1$3.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; + return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js -var require_azureNamedKeyCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js"(exports) { +//#region node_modules/.deno/@azure+core-auth@1.10.1/node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js +var require_azureNamedKeyCredential = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AzureNamedKeyCredential = void 0; exports.isNamedKeyCredential = isNamedKeyCredential; - const core_util_1$2 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); /** * A static name/key-based credential that supports updating * the underlying name and key values. */ var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -9628,22 +9871,23 @@ var require_azureNamedKeyCredential = __commonJS({ "node_modules/.deno/@azure+co * @param credential - The assumed NamedKeyCredential to be tested. */ function isNamedKeyCredential(credential) { - return (0, core_util_1$2.isObjectWithProperties)(credential, ["name", "key"]) && typeof credential.key === "string" && typeof credential.name === "string"; + return (0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && typeof credential.key === "string" && typeof credential.name === "string"; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js -var require_azureSASCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js"(exports) { +//#region node_modules/.deno/@azure+core-auth@1.10.1/node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js +var require_azureSASCredential = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AzureSASCredential = void 0; exports.isSASCredential = isSASCredential; - const core_util_1$1 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); /** * A static-signature-based credential that supports updating * the underlying signature value. */ var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -9680,13 +9924,13 @@ var require_azureSASCredential = __commonJS({ "node_modules/.deno/@azure+core-au * @param credential - The assumed SASCredential to be tested. */ function isSASCredential(credential) { - return (0, core_util_1$1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"; + return (0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js -var require_tokenCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports) { +//#region node_modules/.deno/@azure+core-auth@1.10.1/node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js +var require_tokenCredential = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isBearerToken = isBearerToken; exports.isPopToken = isPopToken; @@ -9716,11 +9960,11 @@ var require_tokenCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@ const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs$6 = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+core-auth@1.10.1/node_modules/@azure/core-auth/dist/commonjs/index.js +var require_commonjs$8 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0; var azureKeyCredential_js_1 = require_azureKeyCredential(); @@ -9770,11 +10014,11 @@ var require_commonjs$6 = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0 return tokenCredential_js_1.isTokenCredential; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js -var require_disableKeepAlivePolicy = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-http-compat@2.3.2/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js +var require_disableKeepAlivePolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.disableKeepAlivePolicyName = void 0; exports.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; @@ -9795,11 +10039,11 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/.deno/@azure+cor function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports.disableKeepAlivePolicyName); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/base64.js -var require_base64$1 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/base64.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/base64.js +var require_base64$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.encodeString = encodeString; exports.encodeByteArray = encodeByteArray; @@ -9819,8 +10063,7 @@ var require_base64$1 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4 * @internal */ function encodeByteArray(value) { - const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); - return bufferValue.toString("base64"); + return (value instanceof Buffer ? value : Buffer.from(value.buffer)).toString("base64"); } /** * Decodes a base64 string into a byte array. @@ -9838,11 +10081,11 @@ var require_base64$1 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4 function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaces.js -var require_interfaces = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaces.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/interfaces.js +var require_interfaces$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; /** @@ -9853,11 +10096,11 @@ var require_interfaces = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 * Default key used to access the XML value content. */ exports.XML_CHARKEY = "_"; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/utils.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/utils.js +var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isPrimitiveBody = isPrimitiveBody; exports.isDuration = isDuration; @@ -9870,7 +10113,7 @@ var require_utils = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/no * @internal */ function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); } const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; /** @@ -9904,9 +10147,15 @@ var require_utils = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/no * @internal */ function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) return responseObject.shouldWrapBody ? { body: null } : null; - else return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + else return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } /** * Take a `FullOperationResponse` and turn it into a flat @@ -9917,22 +10166,25 @@ var require_utils = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/no * @internal */ function flattenResponse(fullResponse, responseSpec) { - var _a$2, _b$1; const parsedHeaders = fullResponse.parsedHeaders; - if (fullResponse.request.method === "HEAD") return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + if (fullResponse.request.method === "HEAD") return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; /** If the body is asked for, we look at the expected body type to handle it */ - if (expectedBodyTypeName === "Stream") return Object.assign(Object.assign({}, parsedHeaders), { + if (expectedBodyTypeName === "Stream") return { + ...parsedHeaders, blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody - }); + }; const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a$2 = fullResponse.parsedBody) !== null && _a$2 !== void 0 ? _a$2 : []; - for (const key of Object.keys(modelProperties)) if (modelProperties[key].serializedName) arrayResponse[key] = (_b$1 = fullResponse.parsedBody) === null || _b$1 === void 0 ? void 0 : _b$1[key]; + const arrayResponse = fullResponse.parsedBody ?? []; + for (const key of Object.keys(modelProperties)) if (modelProperties[key].serializedName) arrayResponse[key] = fullResponse.parsedBody?.[key]; if (parsedHeaders) for (const key of Object.keys(parsedHeaders)) arrayResponse[key] = parsedHeaders[key]; return isNullable && !fullResponse.parsedBody && !parsedHeaders && Object.getOwnPropertyNames(modelProperties).length === 0 ? null : arrayResponse; } @@ -9943,19 +10195,20 @@ var require_utils = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/no shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializer.js -var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/serializer.js +var require_serializer = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.MapperTypeNames = void 0; exports.createSerializer = createSerializer; - const tslib_1$1 = require_tslib(); - const base64 = tslib_1$1.__importStar(require_base64$1()); - const interfaces_js_1$3 = require_interfaces(); - const utils_js_1$1 = require_utils(); + const base64 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)).__importStar(require_base64$1()); + const interfaces_js_1 = require_interfaces$1(); + const utils_js_1 = require_utils$1(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -9968,7 +10221,7 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); }; if (mapper.constraints && value !== void 0 && value !== null) { - const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern: Pattern$2, UniqueItems } = mapper.constraints; + const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems } = mapper.constraints; if (ExclusiveMaximum !== void 0 && value >= ExclusiveMaximum) failValidation("ExclusiveMaximum", ExclusiveMaximum); if (ExclusiveMinimum !== void 0 && value <= ExclusiveMinimum) failValidation("ExclusiveMinimum", ExclusiveMinimum); if (InclusiveMaximum !== void 0 && value > InclusiveMaximum) failValidation("InclusiveMaximum", InclusiveMaximum); @@ -9978,9 +10231,9 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 if (MinItems !== void 0 && value.length < MinItems) failValidation("MinItems", MinItems); if (MinLength !== void 0 && value.length < MinLength) failValidation("MinLength", MinLength); if (MultipleOf !== void 0 && value % MultipleOf !== 0) failValidation("MultipleOf", MultipleOf); - if (Pattern$2) { - const pattern = typeof Pattern$2 === "string" ? new RegExp(Pattern$2) : Pattern$2; - if (typeof value !== "string" || value.match(pattern) === null) failValidation("Pattern", Pattern$2); + if (Pattern) { + const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if (typeof value !== "string" || value.match(pattern) === null) failValidation("Pattern", Pattern); } if (UniqueItems && value.some((item, i, ar) => ar.indexOf(item) !== i)) failValidation("UniqueItems", UniqueItems); } @@ -9999,11 +10252,10 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a$2, _b$1, _c$1; const updatedOptions = { xml: { - rootName: (_a$2 = options.xml.rootName) !== null && _a$2 !== void 0 ? _a$2 : "", - includeRoot: (_b$1 = options.xml.includeRoot) !== null && _b$1 !== void 0 ? _b$1 : false, - xmlCharKey: (_c$1 = options.xml.xmlCharKey) !== null && _c$1 !== void 0 ? _c$1 : interfaces_js_1$3.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; const mapperType = mapper.type.name; @@ -10017,10 +10269,8 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 if (object === void 0 || object === null) payload = object; else if (mapperType.match(/^any$/i) !== null) payload = object; else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) payload = serializeBasicTypes(mapperType, objectName, object); - else if (mapperType.match(/^Enum$/i) !== null) { - const enumMapper = mapper; - payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); - } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) payload = serializeDateTypes(mapperType, object, objectName); + else if (mapperType.match(/^Enum$/i) !== null) payload = serializeEnumType(objectName, mapper.type.allowedValues, object); + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) payload = serializeDateTypes(mapperType, object, objectName); else if (mapperType.match(/^ByteArray$/i) !== null) payload = serializeByteArrayType(objectName, object); else if (mapperType.match(/^Base64Url$/i) !== null) payload = serializeBase64UrlType(objectName, object); else if (mapperType.match(/^Sequence$/i) !== null) payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); @@ -10042,14 +10292,13 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a$2, _b$1, _c$1, _d$1; const updatedOptions = { xml: { - rootName: (_a$2 = options.xml.rootName) !== null && _a$2 !== void 0 ? _a$2 : "", - includeRoot: (_b$1 = options.xml.includeRoot) !== null && _b$1 !== void 0 ? _b$1 : false, - xmlCharKey: (_c$1 = options.xml.xmlCharKey) !== null && _c$1 !== void 0 ? _c$1 : interfaces_js_1$3.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d$1 = options.ignoreUnknownProperties) !== null && _d$1 !== void 0 ? _d$1 : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) responseBody = []; @@ -10068,7 +10317,7 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. */ - if (responseBody[interfaces_js_1$3.XML_ATTRKEY] !== void 0 && responseBody[xmlCharKey] !== void 0) responseBody = responseBody[xmlCharKey]; + if (responseBody[interfaces_js_1.XML_ATTRKEY] !== void 0 && responseBody[xmlCharKey] !== void 0) responseBody = responseBody[xmlCharKey]; } if (mapperType.match(/^Number$/i) !== null) { payload = parseFloat(responseBody); @@ -10101,14 +10350,13 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 while (len - 1 >= 0 && str[len - 1] === ch) --len; return str.substr(0, len); } - function bufferToBase64Url(buffer$2) { - if (!buffer$2) return void 0; - if (!(buffer$2 instanceof Uint8Array)) throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); - const str = base64.encodeByteArray(buffer$2); - return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); + function bufferToBase64Url(buffer) { + if (!buffer) return; + if (!(buffer instanceof Uint8Array)) throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); + return trimEnd(base64.encodeByteArray(buffer), "=").replace(/\+/g, "-").replace(/\//g, "_"); } function base64UrlToByteArray(str) { - if (!str) return void 0; + if (!str) return; if (str && typeof str.valueOf() !== "string") throw new Error("Please provide an input of type string for converting to Uint8Array"); str = str.replace(/-/g, "+").replace(/_/g, "/"); return base64.decodeString(str); @@ -10127,14 +10375,14 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 } return classes; } - function dateToUnixTime(d$1) { - if (!d$1) return void 0; - if (typeof d$1.valueOf() === "string") d$1 = new Date(d$1); - return Math.floor(d$1.getTime() / 1e3); + function dateToUnixTime(d) { + if (!d) return; + if (typeof d.valueOf() === "string") d = new Date(d); + return Math.floor(d.getTime() / 1e3); } function unixTimeToDate(n) { - if (!n) return void 0; - return new Date(n * 1e3); + if (!n) return; + return /* @__PURE__ */ new Date(n * 1e3); } function serializeBasicTypes(typeName, objectName, value) { if (value !== null && value !== void 0) { @@ -10143,7 +10391,7 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 } else if (typeName.match(/^String$/i) !== null) { if (typeof value.valueOf() !== "string") throw new Error(`${objectName} with value "${value}" must be of type string.`); } else if (typeName.match(/^Uuid$/i) !== null) { - if (!(typeof value.valueOf() === "string" && (0, utils_js_1$1.isValidUuid)(value))) throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); + if (!(typeof value.valueOf() === "string" && (0, utils_js_1.isValidUuid)(value))) throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); } else if (typeName.match(/^Boolean$/i) !== null) { if (typeof value !== "boolean") throw new Error(`${objectName} with value ${value} must be of type boolean.`); } else if (typeName.match(/^Stream$/i) !== null) { @@ -10155,11 +10403,10 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 } function serializeEnumType(objectName, allowedValues, value) { if (!allowedValues) throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); - const isPresent = allowedValues.some((item) => { + if (!allowedValues.some((item) => { if (typeof item.valueOf() === "string") return item.toLowerCase() === value.toLowerCase(); return item === value; - }); - if (!isPresent) throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); + })) throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); return value; } function serializeByteArrayType(objectName, value) { @@ -10191,29 +10438,28 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`); value = dateToUnixTime(value); } else if (typeName.match(/^TimeSpan$/i) !== null) { - if (!(0, utils_js_1$1.isDuration)(value)) throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); + if (!(0, utils_js_1.isDuration)(value)) throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); } } return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a$2; if (!Array.isArray(object)) throw new Error(`${objectName} must be of type Array.`); let elementType = mapper.type.element; if (!elementType || typeof elementType !== "object") throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); - if (elementType.type.name === "Composite" && elementType.type.className) elementType = (_a$2 = serializer.modelMappers[elementType.type.className]) !== null && _a$2 !== void 0 ? _a$2 : elementType; + if (elementType.type.name === "Composite" && elementType.type.className) elementType = serializer.modelMappers[elementType.type.className] ?? elementType; const tempArray = []; for (let i = 0; i < object.length; i++) { const serializedValue = serializer.serialize(elementType, object[i], objectName, options); if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); - tempArray[i][interfaces_js_1$3.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + tempArray[i] = { ...serializedValue }; + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; tempArray[i][options.xml.xmlCharKey] = serializedValue; - tempArray[i][interfaces_js_1$3.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } } else tempArray[i] = serializedValue; } @@ -10224,14 +10470,11 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 const valueType = mapper.type.value; if (!valueType || typeof valueType !== "object") throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}.`); const tempDictionary = {}; - for (const key of Object.keys(object)) { - const serializedValue = serializer.serialize(valueType, object[key], objectName, options); - tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); - } + for (const key of Object.keys(object)) tempDictionary[key] = getXmlObjectValue(valueType, serializer.serialize(valueType, object[key], objectName, options), isXml, options); if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; const result = tempDictionary; - result[interfaces_js_1$3.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; return result; } return tempDictionary; @@ -10244,10 +10487,7 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 */ function resolveAdditionalProperties(serializer, mapper, objectName) { const additionalProperties = mapper.type.additionalProperties; - if (!additionalProperties && mapper.type.className) { - const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; - } + if (!additionalProperties && mapper.type.className) return resolveReferencedMapper(serializer, mapper, objectName)?.type.additionalProperties; return additionalProperties; } /** @@ -10271,7 +10511,7 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 if (!modelProps) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); if (!modelMapper) throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } return modelProps; @@ -10300,7 +10540,10 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1$3.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1$3.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -10310,8 +10553,8 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 if (serializedValue !== void 0 && propName !== void 0 && propName !== null) { const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); if (isXml && propertyMapper.xmlIsAttribute) { - parentObject[interfaces_js_1$3.XML_ATTRKEY] = parentObject[interfaces_js_1$3.XML_ATTRKEY] || {}; - parentObject[interfaces_js_1$3.XML_ATTRKEY][propName] = serializedValue; + parentObject[interfaces_js_1.XML_ATTRKEY] = parentObject[interfaces_js_1.XML_ATTRKEY] || {}; + parentObject[interfaces_js_1.XML_ATTRKEY][propName] = serializedValue; } else if (isXml && propertyMapper.xmlIsWrapped) parentObject[propName] = { [propertyMapper.xmlElementName]: value }; else parentObject[propName] = value; } @@ -10320,10 +10563,7 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); if (additionalPropertiesMapper) { const propNames = Object.keys(modelProps); - for (const clientPropName in object) { - const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); - if (isAdditionalProperty) payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + "[\"" + clientPropName + "\"]", options); - } + for (const clientPropName in object) if (propNames.every((pn) => pn !== clientPropName)) payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + "[\"" + clientPropName + "\"]", options); } return payload; } @@ -10331,25 +10571,23 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 } function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { if (!isXml || !propertyMapper.xmlNamespace) return serializedValue; - const xmlnsKey = propertyMapper.xmlNamespacePrefix ? `xmlns:${propertyMapper.xmlNamespacePrefix}` : "xmlns"; - const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; - if (["Composite"].includes(propertyMapper.type.name)) if (serializedValue[interfaces_js_1$3.XML_ATTRKEY]) return serializedValue; + const xmlNamespace = { [propertyMapper.xmlNamespacePrefix ? `xmlns:${propertyMapper.xmlNamespacePrefix}` : "xmlns"]: propertyMapper.xmlNamespace }; + if (["Composite"].includes(propertyMapper.type.name)) if (serializedValue[interfaces_js_1.XML_ATTRKEY]) return serializedValue; else { - const result$1 = Object.assign({}, serializedValue); - result$1[interfaces_js_1$3.XML_ATTRKEY] = xmlNamespace; - return result$1; + const result = { ...serializedValue }; + result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; + return result; } const result = {}; result[options.xml.xmlCharKey] = serializedValue; - result[interfaces_js_1$3.XML_ATTRKEY] = xmlNamespace; + result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result; } function isSpecialXmlProperty(propertyName, options) { - return [interfaces_js_1$3.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); + return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a$2, _b$1; - const xmlCharKey = (_a$2 = options.xml.xmlCharKey) !== null && _a$2 !== void 0 ? _a$2 : interfaces_js_1$3.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); const modelProps = resolveModelProperties(serializer, mapper, objectName); let instance = {}; @@ -10369,15 +10607,14 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 handledPropertyNames.push(headerKey); } instance[key] = dictionary; - } else if (serializer.isXML) if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1$3.XML_ATTRKEY]) instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1$3.XML_ATTRKEY][xmlName], propertyObjectName, options); + } else if (serializer.isXML) if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1.XML_ATTRKEY]) instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1.XML_ATTRKEY][xmlName], propertyObjectName, options); else if (propertyMapper.xmlIsMsText) { if (responseBody[xmlCharKey] !== void 0) instance[key] = responseBody[xmlCharKey]; else if (typeof responseBody === "string") instance[key] = responseBody; } else { const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { - const wrapped = responseBody[xmlName]; - const elementList = (_b$1 = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b$1 !== void 0 ? _b$1 : []; + const elementList = responseBody[xmlName]?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -10414,10 +10651,7 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 const additionalPropertiesMapper = mapper.type.additionalProperties; if (additionalPropertiesMapper) { const isAdditionalProperty = (responsePropName) => { - for (const clientPropName in modelProps) { - const paths = splitSerializeName(modelProps[clientPropName].serializedName); - if (paths[0] === responsePropName) return false; - } + for (const clientPropName in modelProps) if (splitSerializeName(modelProps[clientPropName].serializedName)[0] === responsePropName) return false; return true; }; for (const responsePropName in responseBody) if (isAdditionalProperty(responsePropName)) instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + "[\"" + responsePropName + "\"]", options); @@ -10437,12 +10671,11 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a$2; let element = mapper.type.element; if (!element || typeof element !== "object") throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); if (responseBody) { if (!Array.isArray(responseBody)) responseBody = [responseBody]; - if (element.type.name === "Composite" && element.type.className) element = (_a$2 = serializer.modelMappers[element.type.className]) !== null && _a$2 !== void 0 ? _a$2 : element; + if (element.type.name === "Composite" && element.type.className) element = serializer.modelMappers[element.type.className] ?? element; const tempArray = []; for (let i = 0; i < responseBody.length; i++) tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options); return tempArray; @@ -10457,17 +10690,15 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) return discriminators[indexDiscriminator]; else for (const [name, mapper] of Object.entries(discriminators)) if (name.startsWith(currentName + ".") && mapper.type.uberParent === currentName && mapper.type.className) typeNamesToCheck.push(mapper.type.className); } - return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a$2; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; if (discriminatorName) { if (polymorphicPropertyName === "serializedName") discriminatorName = discriminatorName.replace(/\\/gi, ""); const discriminatorValue = object[discriminatorName]; - const typeName = (_a$2 = mapper.type.uberParent) !== null && _a$2 !== void 0 ? _a$2 : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) mapper = polymorphicMapper; @@ -10503,22 +10734,22 @@ var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 TimeSpan: "TimeSpan", UnixTime: "UnixTime" }; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/state.js -var require_state = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/state.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/state.js +var require_state = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.state = void 0; /** * Holds the singleton operationRequestMap, to be shared across CJS and ESM imports. */ - exports.state = { operationRequestMap: new WeakMap() }; -} }); + exports.state = { operationRequestMap: /* @__PURE__ */ new WeakMap() }; +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/operationHelpers.js -var require_operationHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/operationHelpers.js +var require_operationHelpers = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; exports.getOperationRequestInfo = getOperationRequestInfo; @@ -10576,12 +10807,12 @@ var require_operationHelpers = __commonJS({ "node_modules/.deno/@azure+core-clie } return result; } - const originalRequestSymbol$1 = Symbol.for("@azure/core-client original request"); + const originalRequestSymbol = Symbol.for("@azure/core-client original request"); function hasOriginalRequest(request) { - return originalRequestSymbol$1 in request; + return originalRequestSymbol in request; } function getOperationRequestInfo(request) { - if (hasOriginalRequest(request)) return getOperationRequestInfo(request[originalRequestSymbol$1]); + if (hasOriginalRequest(request)) return getOperationRequestInfo(request[originalRequestSymbol]); let info = state_js_1.state.operationRequestMap.get(request); if (!info) { info = {}; @@ -10589,18 +10820,18 @@ var require_operationHelpers = __commonJS({ "node_modules/.deno/@azure+core-clie } return info; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js -var require_deserializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js +var require_deserializationPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.deserializationPolicyName = void 0; exports.deserializationPolicy = deserializationPolicy; - const interfaces_js_1$2 = require_interfaces(); - const core_rest_pipeline_1$6 = require_commonjs$7(); - const serializer_js_1$3 = require_serializer(); - const operationHelpers_js_1$3 = require_operationHelpers(); + const interfaces_js_1 = require_interfaces$1(); + const core_rest_pipeline_1 = require_commonjs$9(); + const serializer_js_1 = require_serializer(); + const operationHelpers_js_1 = require_operationHelpers(); const defaultJsonContentTypes = ["application/json", "text/json"]; const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; /** @@ -10611,48 +10842,44 @@ var require_deserializationPolicy = __commonJS({ "node_modules/.deno/@azure+core * This policy handles parsing out responses according to OperationSpecs on the request. */ function deserializationPolicy(options = {}) { - var _a$2, _b$1, _c$1, _d$1, _e, _f, _g; - const jsonContentTypes = (_b$1 = (_a$2 = options.expectedContentTypes) === null || _a$2 === void 0 ? void 0 : _a$2.json) !== null && _b$1 !== void 0 ? _b$1 : defaultJsonContentTypes; - const xmlContentTypes = (_d$1 = (_c$1 = options.expectedContentTypes) === null || _c$1 === void 0 ? void 0 : _c$1.xml) !== null && _d$1 !== void 0 ? _d$1 : defaultXmlContentTypes; - const parseXML$1 = options.parseXML; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; + const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1$2.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { name: exports.deserializationPolicyName, async sendRequest(request, next) { - const response = await next(request); - return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML$1); + return deserializeResponseBody(jsonContentTypes, xmlContentTypes, await next(request), updatedOptions, parseXML); } }; } function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; - const operationInfo = (0, operationHelpers_js_1$3.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - if (operationSpec) if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) result = operationSpec.responses[parsedResponse.status]; - else result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const operationSpec = operationInfo?.operationSpec; + if (operationSpec) if (!operationInfo?.operationResponseGetter) result = operationSpec.responses[parsedResponse.status]; + else result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); return result; } function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; - const operationInfo = (0, operationHelpers_js_1$3.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = (0, operationHelpers_js_1.getOperationRequestInfo)(request)?.shouldDeserialize; let result; if (shouldDeserialize === void 0) result = true; else if (typeof shouldDeserialize === "boolean") result = shouldDeserialize; else result = shouldDeserialize(parsedResponse); return result; } - async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML$1) { - const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML$1); + async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) { + const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML); if (!shouldDeserializeResponse(parsedResponse)) return parsedResponse; - const operationInfo = (0, operationHelpers_js_1$3.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request)?.operationSpec; if (!operationSpec || !operationSpec.responses) return parsedResponse; const responseSpec = getOperationResponseMap(parsedResponse); const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); @@ -10661,16 +10888,15 @@ var require_deserializationPolicy = __commonJS({ "node_modules/.deno/@azure+core if (responseSpec) { if (responseSpec.bodyMapper) { let valueToDeserialize = parsedResponse.parsedBody; - if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1$3.MapperTypeNames.Sequence) valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; try { parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); } catch (deserializeError) { - const restError = new core_rest_pipeline_1$6.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { + throw new core_rest_pipeline_1.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - throw restError; } } else if (operationSpec.httpMethod === "HEAD") parsedResponse.parsedBody = response.status >= 200 && response.status < 300; if (responseSpec.headersMapper) parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { @@ -10685,10 +10911,8 @@ var require_deserializationPolicy = __commonJS({ "node_modules/.deno/@azure+core return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a$2, _b$1, _c$1, _d$1, _e; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; - const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; - if (isExpectedStatusCode) if (responseSpec) { + if (isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec) if (responseSpec) { if (!responseSpec.isError) return { error: null, shouldReturnResponse: false @@ -10697,23 +10921,23 @@ var require_deserializationPolicy = __commonJS({ "node_modules/.deno/@azure+core error: null, shouldReturnResponse: false }; - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a$2 = parsedResponse.request.streamResponseStatusCodes) === null || _a$2 === void 0 ? void 0 : _a$2.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; - const error = new core_rest_pipeline_1$6.RestError(initialErrorMessage, { + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const error = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec && !(((_c$1 = (_b$1 = parsedResponse.parsedBody) === null || _b$1 === void 0 ? void 0 : _b$1.error) === null || _c$1 === void 0 ? void 0 : _c$1.code) && ((_e = (_d$1 = parsedResponse.parsedBody) === null || _d$1 === void 0 ? void 0 : _d$1.error) === null || _e === void 0 ? void 0 : _e.message))) throw error; - const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) throw error; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; let deserializedError; if (defaultBodyMapper) { let valueToDeserialize = parsedBody; - if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1$3.MapperTypeNames.Sequence) { + if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { valueToDeserialize = []; const elementName = defaultBodyMapper.xmlElementName; if (typeof parsedBody === "object" && elementName) valueToDeserialize = parsedBody[elementName]; @@ -10734,54 +10958,51 @@ var require_deserializationPolicy = __commonJS({ "node_modules/.deno/@azure+core shouldReturnResponse: false }; } - async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML$1) { - var _a$2; - if (!((_a$2 = operationResponse.request.streamResponseStatusCodes) === null || _a$2 === void 0 ? void 0 : _a$2.has(operationResponse.status)) && operationResponse.bodyAsText) { + async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; - const contentType$1 = operationResponse.headers.get("Content-Type") || ""; - const contentComponents = !contentType$1 ? [] : contentType$1.split(";").map((component) => component.toLowerCase()); + const contentType = operationResponse.headers.get("Content-Type") || ""; + const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); try { if (contentComponents.length === 0 || contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { operationResponse.parsedBody = JSON.parse(text); return operationResponse; } else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { - if (!parseXML$1) throw new Error("Parsing XML not supported."); - const body$1 = await parseXML$1(text, opts.xml); - operationResponse.parsedBody = body$1; + if (!parseXML) throw new Error("Parsing XML not supported."); + operationResponse.parsedBody = await parseXML(text, opts.xml); return operationResponse; } } catch (err) { const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; - const errCode = err.code || core_rest_pipeline_1$6.RestError.PARSE_ERROR; - const e = new core_rest_pipeline_1$6.RestError(msg, { + const errCode = err.code || core_rest_pipeline_1.RestError.PARSE_ERROR; + throw new core_rest_pipeline_1.RestError(msg, { code: errCode, statusCode: operationResponse.status, request: operationResponse.request, response: operationResponse }); - throw e; } } return operationResponse; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js -var require_interfaceHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js +var require_interfaceHelpers = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; exports.getPathStringFromParameter = getPathStringFromParameter; - const serializer_js_1$2 = require_serializer(); + const serializer_js_1 = require_serializer(); /** * Gets the list of status codes for streaming responses. * @internal */ function getStreamingResponseStatusCodes(operationSpec) { - const result = new Set(); + const result = /* @__PURE__ */ new Set(); for (const statusCode in operationSpec.responses) { const operationResponse = operationSpec.responses[statusCode]; - if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === serializer_js_1$2.MapperTypeNames.Stream) result.add(Number(statusCode)); + if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Stream) result.add(Number(statusCode)); } return result; } @@ -10799,20 +11020,20 @@ var require_interfaceHelpers = __commonJS({ "node_modules/.deno/@azure+core-clie else result = mapper.serializedName; return result; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js -var require_serializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js +var require_serializationPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.serializationPolicyName = void 0; exports.serializationPolicy = serializationPolicy; exports.serializeHeaders = serializeHeaders; exports.serializeRequestBody = serializeRequestBody; - const interfaces_js_1$1 = require_interfaces(); - const operationHelpers_js_1$2 = require_operationHelpers(); - const serializer_js_1$1 = require_serializer(); - const interfaceHelpers_js_1$2 = require_interfaceHelpers(); + const interfaces_js_1 = require_interfaces$1(); + const operationHelpers_js_1 = require_operationHelpers(); + const serializer_js_1 = require_serializer(); + const interfaceHelpers_js_1 = require_interfaceHelpers(); /** * The programmatic identifier of the serializationPolicy. */ @@ -10822,16 +11043,16 @@ var require_serializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-c * an OperationSpec and OperationArguments on the request. */ function serializationPolicy(options = {}) { - const stringifyXML$1 = options.stringifyXML; + const stringifyXML = options.stringifyXML; return { name: exports.serializationPolicyName, async sendRequest(request, next) { - const operationInfo = (0, operationHelpers_js_1$2.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); - serializeRequestBody(request, operationArguments, operationSpec, stringifyXML$1); + serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); } return next(request); } @@ -10841,55 +11062,53 @@ var require_serializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-c * @internal */ function serializeHeaders(request, operationArguments, operationSpec) { - var _a$2, _b$1; if (operationSpec.headerParameters) for (const headerParameter of operationSpec.headerParameters) { - let headerValue = (0, operationHelpers_js_1$2.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); + let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); if (headerValue !== null && headerValue !== void 0 || headerParameter.mapper.required) { - headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(headerParameter)); + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter)); const headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; if (headerCollectionPrefix) for (const key of Object.keys(headerValue)) request.headers.set(headerCollectionPrefix + key, headerValue[key]); - else request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(headerParameter), headerValue); + else request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter), headerValue); } } - const customHeaders = (_b$1 = (_a$2 = operationArguments.options) === null || _a$2 === void 0 ? void 0 : _a$2.requestOptions) === null || _b$1 === void 0 ? void 0 : _b$1.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) for (const customHeaderName of Object.keys(customHeaders)) request.headers.set(customHeaderName, customHeaders[customHeaderName]); } /** * @internal */ - function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML$1 = function() { + function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a$2, _b$1, _c$1, _d$1, _e; - const serializerOptions = (_a$2 = operationArguments.options) === null || _a$2 === void 0 ? void 0 : _a$2.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b$1 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b$1 !== void 0 ? _b$1 : "", - includeRoot: (_c$1 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c$1 !== void 0 ? _c$1 : false, - xmlCharKey: (_d$1 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d$1 !== void 0 ? _d$1 : interfaces_js_1$1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; if (operationSpec.requestBody && operationSpec.requestBody.mapper) { - request.body = (0, operationHelpers_js_1$2.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); + request.body = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); const bodyMapper = operationSpec.requestBody.mapper; const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable } = bodyMapper; const typeName = bodyMapper.type.name; try { if (request.body !== void 0 && request.body !== null || nullable && request.body === null || required) { - const requestBodyParameterPathString = (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(operationSpec.requestBody); + const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); - const isStream = typeName === serializer_js_1$1.MapperTypeNames.Stream; + const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; if (operationSpec.isXML) { const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); - if (typeName === serializer_js_1$1.MapperTypeNames.Sequence) request.body = stringifyXML$1(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { + if (typeName === serializer_js_1.MapperTypeNames.Sequence) request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); - else if (!isStream) request.body = stringifyXML$1(value, { + else if (!isStream) request.body = stringifyXML(value, { rootName: xmlName || serializedName, xmlCharKey }); - } else if (typeName === serializer_js_1$1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) return; + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) return; else if (!isStream) request.body = JSON.stringify(request.body); } } catch (error) { @@ -10898,10 +11117,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-c } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { request.formData = {}; for (const formDataParameter of operationSpec.formDataParameters) { - const formDataParameterValue = (0, operationHelpers_js_1$2.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); + const formDataParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); if (formDataParameterValue !== void 0 && formDataParameterValue !== null) { - const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(formDataParameter); - request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(formDataParameter), updatedOptions); + const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter); + request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter), updatedOptions); } } } @@ -10917,7 +11136,7 @@ var require_serializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-c ].includes(typeName)) { const result = {}; result[options.xml.xmlCharKey] = serializedValue; - result[interfaces_js_1$1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; return result; } return serializedValue; @@ -10926,19 +11145,19 @@ var require_serializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-c if (!Array.isArray(obj)) obj = [obj]; if (!xmlNamespaceKey || !xmlNamespace) return { [elementName]: obj }; const result = { [elementName]: obj }; - result[interfaces_js_1$1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; return result; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/pipeline.js +var require_pipeline = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.createClientPipeline = createClientPipeline; - const deserializationPolicy_js_1$1 = require_deserializationPolicy(); - const core_rest_pipeline_1$5 = require_commonjs$7(); - const serializationPolicy_js_1$1 = require_serializationPolicy(); + const deserializationPolicy_js_1 = require_deserializationPolicy(); + const core_rest_pipeline_1 = require_commonjs$9(); + const serializationPolicy_js_1 = require_serializationPolicy(); /** * Creates a new Pipeline for use with a Service Client. * Adds in deserializationPolicy by default. @@ -10946,38 +11165,38 @@ var require_pipeline = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4 * @param options - Options to customize the created pipeline. */ function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1$5.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); - if (options.credentialOptions) pipeline.addPolicy((0, core_rest_pipeline_1$5.bearerTokenAuthenticationPolicy)({ + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); + if (options.credentialOptions) pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, scopes: options.credentialOptions.credentialScopes })); - pipeline.addPolicy((0, serializationPolicy_js_1$1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); - pipeline.addPolicy((0, deserializationPolicy_js_1$1.deserializationPolicy)(options.deserializationOptions), { phase: "Deserialize" }); + pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); + pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { phase: "Deserialize" }); return pipeline; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/httpClientCache.js -var require_httpClientCache = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/httpClientCache.js +var require_httpClientCache = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient$1; - const core_rest_pipeline_1$4 = require_commonjs$7(); + exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + const core_rest_pipeline_1 = require_commonjs$9(); let cachedHttpClient; - function getCachedDefaultHttpClient$1() { - if (!cachedHttpClient) cachedHttpClient = (0, core_rest_pipeline_1$4.createDefaultHttpClient)(); + function getCachedDefaultHttpClient() { + if (!cachedHttpClient) cachedHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); return cachedHttpClient; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/urlHelpers.js +var require_urlHelpers = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.getRequestUrl = getRequestUrl; exports.appendQueryParams = appendQueryParams; - const operationHelpers_js_1$1 = require_operationHelpers(); - const interfaceHelpers_js_1$1 = require_interfaceHelpers(); + const operationHelpers_js_1 = require_operationHelpers(); + const interfaceHelpers_js_1 = require_interfaceHelpers(); const CollectionFormatToDelimiterMap = { CSV: ",", SSV: " ", @@ -10990,12 +11209,12 @@ var require_urlHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path$13 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path$13.startsWith("/")) path$13 = path$13.substring(1); - if (isAbsoluteUrl(path$13)) { - requestUrl = path$13; + let path = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path.startsWith("/")) path = path.substring(1); + if (isAbsoluteUrl(path)) { + requestUrl = path; isAbsolutePath = true; - } else requestUrl = appendPath(requestUrl, path$13); + } else requestUrl = appendPath(requestUrl, path); } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); /** @@ -11013,58 +11232,56 @@ var require_urlHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a$2; - const result = new Map(); - if ((_a$2 = operationSpec.urlParameters) === null || _a$2 === void 0 ? void 0 : _a$2.length) for (const urlParameter of operationSpec.urlParameters) { - let urlParameterValue = (0, operationHelpers_js_1$1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); - const parameterPathString = (0, interfaceHelpers_js_1$1.getPathStringFromParameter)(urlParameter); + const result = /* @__PURE__ */ new Map(); + if (operationSpec.urlParameters?.length) for (const urlParameter of operationSpec.urlParameters) { + let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); + const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); if (!urlParameter.skipEncoding) urlParameterValue = encodeURIComponent(urlParameterValue); result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); } return result; } - function isAbsoluteUrl(url$1) { - return url$1.includes("://"); + function isAbsoluteUrl(url) { + return url.includes("://"); } - function appendPath(url$1, pathToAppend) { - if (!pathToAppend) return url$1; - const parsedUrl = new URL(url$1); + function appendPath(url, pathToAppend) { + if (!pathToAppend) return url; + const parsedUrl = new URL(url); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) newPath = `${newPath}/`; if (pathToAppend.startsWith("/")) pathToAppend = pathToAppend.substring(1); const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path$13 = pathToAppend.substring(0, searchStart); + const path = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path$13; + newPath = newPath + path; if (search) parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } else newPath = newPath + pathToAppend; parsedUrl.pathname = newPath; return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a$2; - const result = new Map(); - const sequenceParams = new Set(); - if ((_a$2 = operationSpec.queryParameters) === null || _a$2 === void 0 ? void 0 : _a$2.length) for (const queryParameter of operationSpec.queryParameters) { + const result = /* @__PURE__ */ new Map(); + const sequenceParams = /* @__PURE__ */ new Set(); + if (operationSpec.queryParameters?.length) for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) sequenceParams.add(queryParameter.mapper.serializedName); - let queryParameterValue = (0, operationHelpers_js_1$1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); + let queryParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); if (queryParameterValue !== void 0 && queryParameterValue !== null || queryParameter.mapper.required) { - queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1$1.getPathStringFromParameter)(queryParameter)); - const delimiter$1 = queryParameter.collectionFormat ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] : ""; + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter)); + const delimiter = queryParameter.collectionFormat ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] : ""; if (Array.isArray(queryParameterValue)) queryParameterValue = queryParameterValue.map((item) => { if (item === null || item === void 0) return ""; return item; }); if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) continue; - else if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) queryParameterValue = queryParameterValue.join(delimiter$1); + else if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) queryParameterValue = queryParameterValue.join(delimiter); if (!queryParameter.skipEncoding) if (Array.isArray(queryParameterValue)) queryParameterValue = queryParameterValue.map((item) => { return encodeURIComponent(item); }); else queryParameterValue = encodeURIComponent(queryParameterValue); - if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) queryParameterValue = queryParameterValue.join(delimiter$1); - result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1$1.getPathStringFromParameter)(queryParameter), queryParameterValue); + if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) queryParameterValue = queryParameterValue.join(delimiter); + result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter), queryParameterValue); } } return { @@ -11073,7 +11290,7 @@ var require_urlHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 }; } function simpleParseQueryParams(queryString) { - const result = new Map(); + const result = /* @__PURE__ */ new Map(); if (!queryString || queryString[0] !== "?") return result; queryString = queryString.slice(1); const pairs = queryString.split("&"); @@ -11087,9 +11304,9 @@ var require_urlHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 return result; } /** @internal */ - function appendQueryParams(url$1, queryParams, sequenceParams, noOverwrite = false) { - if (queryParams.size === 0) return url$1; - const parsedUrl = new URL(url$1); + function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + if (queryParams.size === 0) return url; + const parsedUrl = new URL(url); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -11111,47 +11328,68 @@ var require_urlHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/log.js -var require_log = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/log.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/log.js +var require_log$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = void 0; - const logger_1$1 = require_commonjs$11(); - exports.logger = (0, logger_1$1.createClientLogger)("core-client"); -} }); + const logger_1 = require_commonjs$13(); + exports.logger = (0, logger_1.createClientLogger)("core-client"); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serviceClient.js -var require_serviceClient = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serviceClient.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/serviceClient.js +var require_serviceClient = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.ServiceClient = void 0; - const core_rest_pipeline_1$3 = require_commonjs$7(); - const pipeline_js_1$1 = require_pipeline(); - const utils_js_1 = require_utils(); + const core_rest_pipeline_1 = require_commonjs$9(); + const pipeline_js_1 = require_pipeline(); + const utils_js_1 = require_utils$1(); const httpClientCache_js_1 = require_httpClientCache(); const operationHelpers_js_1 = require_operationHelpers(); const urlHelpers_js_1 = require_urlHelpers(); const interfaceHelpers_js_1 = require_interfaceHelpers(); - const log_js_1$1 = require_log(); + const log_js_1 = require_log$2(); /** * Initializes a new instance of the ServiceClient. */ var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a$2, _b$1; this._requestContentType = options.requestContentType; - this._endpoint = (_a$2 = options.endpoint) !== null && _a$2 !== void 0 ? _a$2 : options.baseUri; - if (options.baseUri) log_js_1$1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); + this._endpoint = options.endpoint ?? options.baseUri; + if (options.baseUri) log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b$1 = options.additionalPolicies) === null || _b$1 === void 0 ? void 0 : _b$1.length) for (const { policy, position } of options.additionalPolicies) { + if (options.additionalPolicies?.length) for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { afterPhase }); } @@ -11171,14 +11409,14 @@ var require_serviceClient = __commonJS({ "node_modules/.deno/@azure+core-client@ async sendOperationRequest(operationArguments, operationSpec) { const endpoint = operationSpec.baseUrl || this._endpoint; if (!endpoint) throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); - const url$1 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); - const request = (0, core_rest_pipeline_1$3.createPipelineRequest)({ url: url$1 }); + const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const request = (0, core_rest_pipeline_1.createPipelineRequest)({ url }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); operationInfo.operationSpec = operationSpec; operationInfo.operationArguments = operationArguments; - const contentType$1 = operationSpec.contentType || this._requestContentType; - if (contentType$1 && operationSpec.requestBody) request.headers.set("Content-Type", contentType$1); + const contentType = operationSpec.contentType || this._requestContentType; + if (contentType && operationSpec.requestBody) request.headers.set("Content-Type", contentType); const options = operationArguments.options; if (options) { const requestOptions = options.requestOptions; @@ -11197,14 +11435,14 @@ var require_serviceClient = __commonJS({ "node_modules/.deno/@azure+core-client@ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) options.onResponse(rawResponse, flatResponse); + if (options?.onResponse) options.onResponse(rawResponse, flatResponse); return flatResponse; } catch (error) { - if (typeof error === "object" && (error === null || error === void 0 ? void 0 : error.response)) { + if (typeof error === "object" && error?.response) { const rawResponse = error.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); error.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) options.onResponse(rawResponse, flatResponse, error); + if (options?.onResponse) options.onResponse(rawResponse, flatResponse, error); } throw error; } @@ -11217,24 +11455,26 @@ var require_serviceClient = __commonJS({ "node_modules/.deno/@azure+core-client@ credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1$1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) return options.credentialScopes; if (options.endpoint) return `${options.endpoint}/.default`; if (options.baseUri) return `${options.baseUri}/.default`; if (options.credential && !options.credentialScopes) throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); - return void 0; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js -var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js +var require_authorizeRequestOnClaimChallenge = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.parseCAEChallenge = parseCAEChallenge; exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; - const log_js_1 = require_log(); + const log_js_1 = require_log$2(); const base64_js_1 = require_base64$1(); /** * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. @@ -11243,11 +11483,11 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/.deno/ * @internal */ function parseCAEChallenge(challenges) { - const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); - return bearerChallenges.map((challenge) => { - const challengeParts = `${challenge.trim()}, `.split("\", ").filter((x) => x); - const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=\""))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x).map((challenge) => { + return `${challenge.trim()}, `.split("\", ").filter((x) => x).map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=\""))).reduce((a, b) => ({ + ...a, + ...b + }), {}); }); } /** @@ -11280,30 +11520,28 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/.deno/ * ``` */ async function authorizeRequestOnClaimChallenge(onChallengeOptions) { - var _a$2; const { scopes, response } = onChallengeOptions; - const logger$2 = onChallengeOptions.logger || log_js_1.logger; + const logger = onChallengeOptions.logger || log_js_1.logger; const challenge = response.headers.get("WWW-Authenticate"); if (!challenge) { - logger$2.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); + logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); return false; } - const challenges = parseCAEChallenge(challenge) || []; - const parsedChallenge = challenges.find((x) => x.claims); + const parsedChallenge = (parseCAEChallenge(challenge) || []).find((x) => x.claims); if (!parsedChallenge) { - logger$2.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); + logger.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); return false; } const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims) }); if (!accessToken) return false; - onChallengeOptions.request.headers.set("Authorization", `${(_a$2 = accessToken.tokenType) !== null && _a$2 !== void 0 ? _a$2 : "Bearer"} ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js -var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js +var require_authorizeRequestOnTenantChallenge = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.authorizeRequestOnTenantChallenge = void 0; /** @@ -11322,7 +11560,6 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno * Handling has specific features for storage that departs to the general AAD challenge docs. **/ const authorizeRequestOnTenantChallenge = async (challengeOptions) => { - var _a$2; const requestOptions = requestToOptions(challengeOptions.request); const challenge = getChallenge(challengeOptions.response); if (challenge) { @@ -11330,9 +11567,12 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno const challengeScopes = buildScopes(challengeOptions, challengeInfo); const tenantId = extractTenantId(challengeInfo); if (!tenantId) return false; - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) return false; - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a$2 = accessToken.tokenType) !== null && _a$2 !== void 0 ? _a$2 : "Bearer"} ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -11344,11 +11584,8 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno * path part. */ function extractTenantId(challengeInfo) { - const parsedAuthUri = new URL(challengeInfo.authorization_uri); - const pathSegments = parsedAuthUri.pathname.split("/"); - const tenantId = pathSegments[1]; + const tenantId = new URL(challengeInfo.authorization_uri).pathname.split("/")[1]; if (tenantId && isUuid(tenantId)) return tenantId; - return void 0; } /** * Builds the authentication scopes based on the information that comes in the @@ -11370,7 +11607,6 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno function getChallenge(response) { const challenge = response.headers.get("WWW-Authenticate"); if (response.status === 401 && challenge) return challenge; - return; } /** * Converts: `Bearer a="b" c="d"`. @@ -11379,10 +11615,10 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno * @internal */ function parseChallenge(challenge) { - const bearerChallenge = challenge.slice(7); - const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); - const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return `${challenge.slice(7).trim()} `.split(" ").filter((x) => x).map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))).reduce((a, b) => ({ + ...a, + ...b + }), {}); } /** * Extracts the options form a Pipeline Request for later re-use @@ -11394,11 +11630,11 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno tracingOptions: request.tracingOptions }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs$5 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+core-client@1.10.1/node_modules/@azure/core-client/dist/commonjs/index.js +var require_commonjs$7 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.authorizeRequestOnTenantChallenge = exports.authorizeRequestOnClaimChallenge = exports.serializationPolicyName = exports.serializationPolicy = exports.deserializationPolicyName = exports.deserializationPolicy = exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.createClientPipeline = exports.ServiceClient = exports.MapperTypeNames = exports.createSerializer = void 0; var serializer_js_1 = require_serializer(); @@ -11428,7 +11664,7 @@ var require_commonjs$5 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 return pipeline_js_1.createClientPipeline; } }); - var interfaces_js_1 = require_interfaces(); + var interfaces_js_1 = require_interfaces$1(); Object.defineProperty(exports, "XML_ATTRKEY", { enumerable: true, get: function() { @@ -11481,28 +11717,27 @@ var require_commonjs$5 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9 return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/util.js -var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports) { +//#region node_modules/.deno/@azure+core-http-compat@2.3.2/node_modules/@azure/core-http-compat/dist/commonjs/util.js +var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpHeaders = void 0; exports.toPipelineRequest = toPipelineRequest; exports.toWebResourceLike = toWebResourceLike; exports.toHttpHeadersLike = toHttpHeadersLike; - const core_rest_pipeline_1$2 = require_commonjs$7(); + const core_rest_pipeline_1 = require_commonjs$9(); const originalRequestSymbol = Symbol("Original PipelineRequest"); const originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { - const compatWebResource = webResource; - const request = compatWebResource[originalRequestSymbol]; - const headers = (0, core_rest_pipeline_1$2.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); + const request = webResource[originalRequestSymbol]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); if (request) { request.headers = headers; return request; } else { - const newRequest = (0, core_rest_pipeline_1$2.createPipelineRequest)({ + const newRequest = (0, core_rest_pipeline_1.createPipelineRequest)({ url: webResource.url, method: webResource.method, headers, @@ -11525,8 +11760,7 @@ var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2. } } function toWebResourceLike(request, options) { - var _a$2; - const originalRequest = (_a$2 = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a$2 !== void 0 ? _a$2 : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -11554,7 +11788,7 @@ var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2. /** do nothing */ } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) return new Proxy(webResource, { + if (options?.createProxy) return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) return request; else if (prop === "clone") return () => { @@ -11567,7 +11801,7 @@ var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2. }, set(target, prop, value, receiver) { if (prop === "keepAlive") request.disableKeepAlive = !value; - const passThroughProps = [ + if (typeof prop === "string" && [ "url", "method", "withCredentials", @@ -11582,8 +11816,7 @@ var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2. "streamResponseStatusCodes", "agent", "requestOverrides" - ]; - if (typeof prop === "string" && passThroughProps.includes(prop)) request[prop] = value; + ].includes(prop)) request[prop] = value; return Reflect.set(target, prop, value, receiver); } }); @@ -11608,6 +11841,7 @@ var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2. * A collection of HTTP header key/value pairs. */ var HttpHeaders = class HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) for (const headerName in rawHeaders) this.set(headerName, rawHeaders[headerName]); @@ -11715,16 +11949,16 @@ var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2. } }; exports.HttpHeaders = HttpHeaders; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/response.js -var require_response = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports) { +//#region node_modules/.deno/@azure+core-http-compat@2.3.2/node_modules/@azure/core-http-compat/dist/commonjs/response.js +var require_response = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.toCompatResponse = toCompatResponse; exports.toPipelineResponse = toPipelineResponse; - const core_rest_pipeline_1$1 = require_commonjs$7(); - const util_js_1$3 = require_util$1(); + const core_rest_pipeline_1 = require_commonjs$9(); + const util_js_1 = require_util$1(); const originalResponse = Symbol("Original FullOperationResponse"); /** * A helper to convert response objects from the new pipeline back to the old one. @@ -11732,9 +11966,9 @@ var require_response = __commonJS({ "node_modules/.deno/@azure+core-http-compat@ * @returns A response compatible with `HttpOperationResponse` from core-http. */ function toCompatResponse(response, options) { - let request = (0, util_js_1$3.toWebResourceLike)(response.request); - let headers = (0, util_js_1$3.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) return new Proxy(response, { + let request = (0, util_js_1.toWebResourceLike)(response.request); + let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); + if (options?.createProxy) return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") return headers; else if (prop === "request") return request; @@ -11747,47 +11981,47 @@ var require_response = __commonJS({ "node_modules/.deno/@azure+core-http-compat@ return Reflect.set(target, prop, value, receiver); } }); - else return Object.assign(Object.assign({}, response), { + else return { + ...response, request, headers - }); + }; } /** * A helper to convert back to a PipelineResponse * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http. */ function toPipelineResponse(compatResponse) { - const extendedCompatResponse = compatResponse; - const response = extendedCompatResponse[originalResponse]; - const headers = (0, core_rest_pipeline_1$1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); + const response = compatResponse[originalResponse]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); if (response) { response.headers = headers; return response; - } else return Object.assign(Object.assign({}, compatResponse), { + } else return { + ...compatResponse, headers, - request: (0, util_js_1$3.toPipelineRequest)(compatResponse.request) - }); + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js -var require_extendedClient = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js"(exports) { +//#region node_modules/.deno/@azure+core-http-compat@2.3.2/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js +var require_extendedClient = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.ExtendedServiceClient = void 0; - const disableKeepAlivePolicy_js_1$1 = require_disableKeepAlivePolicy(); - const core_rest_pipeline_1 = require_commonjs$7(); - const core_client_1 = require_commonjs$5(); - const response_js_1$2 = require_response(); + const disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); + const core_rest_pipeline_1 = require_commonjs$9(); + const core_client_1 = require_commonjs$7(); + const response_js_1 = require_response(); /** * Client to provide compatability between core V1 & V2. */ var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a$2, _b$1; super(options); - if (((_a$2 = options.keepAliveOptions) === null || _a$2 === void 0 ? void 0 : _a$2.enable) === false && !(0, disableKeepAlivePolicy_js_1$1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1$1.createDisableKeepAlivePolicy)()); - if (((_b$1 = options.redirectOptions) === null || _b$1 === void 0 ? void 0 : _b$1.handleRedirects) === false) this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); + if (options.redirectOptions?.handleRedirects === false) this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); } /** * Compatible send operation request function. @@ -11797,39 +12031,41 @@ var require_extendedClient = __commonJS({ "node_modules/.deno/@azure+core-http-c * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a$2; - const userProvidedCallBack = (_a$2 = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a$2 === void 0 ? void 0 : _a$2.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error) { lastResponse = rawResponse; if (userProvidedCallBack) userProvidedCallBack(rawResponse, flatResponse, error); } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); - if (lastResponse) Object.defineProperty(result, "_response", { value: (0, response_js_1$2.toCompatResponse)(lastResponse) }); + if (lastResponse) Object.defineProperty(result, "_response", { value: (0, response_js_1.toCompatResponse)(lastResponse) }); return result; } }; exports.ExtendedServiceClient = ExtendedServiceClient; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js -var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports) { +//#region node_modules/.deno/@azure+core-http-compat@2.3.2/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js +var require_requestPolicyFactoryPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.requestPolicyFactoryPolicyName = exports.HttpPipelineLogLevel = void 0; exports.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; - const util_js_1$2 = require_util$1(); - const response_js_1$1 = require_response(); + const util_js_1 = require_util$1(); + const response_js_1 = require_response(); /** * An enum for compatibility with RequestPolicy */ var HttpPipelineLogLevel; - (function(HttpPipelineLogLevel$1) { - HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["ERROR"] = 1] = "ERROR"; - HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["INFO"] = 3] = "INFO"; - HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["OFF"] = 0] = "OFF"; - HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["WARNING"] = 2] = "WARNING"; + (function(HttpPipelineLogLevel) { + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; })(HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); const mockRequestPolicyOptions = { log(_logLevel, _message) {}, @@ -11851,25 +12087,25 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/.deno/@azure name: exports.requestPolicyFactoryPolicyName, async sendRequest(request, next) { let httpPipeline = { async sendRequest(httpRequest) { - const response$1 = await next((0, util_js_1$2.toPipelineRequest)(httpRequest)); - return (0, response_js_1$1.toCompatResponse)(response$1, { createProxy: true }); + const response = await next((0, util_js_1.toPipelineRequest)(httpRequest)); + return (0, response_js_1.toCompatResponse)(response, { createProxy: true }); } }; for (const factory of orderedFactories) httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); - const webResourceLike = (0, util_js_1$2.toWebResourceLike)(request, { createProxy: true }); + const webResourceLike = (0, util_js_1.toWebResourceLike)(request, { createProxy: true }); const response = await httpPipeline.sendRequest(webResourceLike); - return (0, response_js_1$1.toPipelineResponse)(response); + return (0, response_js_1.toPipelineResponse)(response); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js -var require_httpClientAdapter = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports) { +//#region node_modules/.deno/@azure+core-http-compat@2.3.2/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js +var require_httpClientAdapter = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.convertHttpClient = convertHttpClient; const response_js_1 = require_response(); - const util_js_1$1 = require_util$1(); + const util_js_1 = require_util$1(); /** * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. * @param requestPolicyClient - A HttpClient compatible with core-http @@ -11877,15 +12113,15 @@ var require_httpClientAdapter = __commonJS({ "node_modules/.deno/@azure+core-htt */ function convertHttpClient(requestPolicyClient) { return { sendRequest: async (request) => { - const response = await requestPolicyClient.sendRequest((0, util_js_1$1.toWebResourceLike)(request, { createProxy: true })); + const response = await requestPolicyClient.sendRequest((0, util_js_1.toWebResourceLike)(request, { createProxy: true })); return (0, response_js_1.toPipelineResponse)(response); } }; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs$4 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+core-http-compat@2.3.2/node_modules/@azure/core-http-compat/dist/commonjs/index.js +var require_commonjs$6 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlivePolicyName = exports.HttpPipelineLogLevel = exports.createRequestPolicyFactoryPolicy = exports.requestPolicyFactoryPolicyName = exports.ExtendedServiceClient = void 0; /** @@ -11940,231 +12176,231 @@ var require_commonjs$4 = __commonJS({ "node_modules/.deno/@azure+core-http-compa return util_js_1.toHttpHeadersLike; } }); -} }); +})); //#endregion -//#region node_modules/.deno/fast-xml-parser@5.2.3/node_modules/fast-xml-parser/lib/fxp.cjs -var require_fxp = __commonJS({ "node_modules/.deno/fast-xml-parser@5.2.3/node_modules/fast-xml-parser/lib/fxp.cjs"(exports, module) { +//#region node_modules/.deno/fast-xml-parser@5.3.6/node_modules/fast-xml-parser/lib/fxp.cjs +var require_fxp = /* @__PURE__ */ __commonJSMin(((exports, module) => { (() => { "use strict"; var t = { - d: (e$1, n$1) => { - for (var i$1 in n$1) t.o(n$1, i$1) && !t.o(e$1, i$1) && Object.defineProperty(e$1, i$1, { + d: (e, n) => { + for (var i in n) t.o(n, i) && !t.o(e, i) && Object.defineProperty(e, i, { enumerable: !0, - get: n$1[i$1] + get: n[i] }); }, - o: (t$1, e$1) => Object.prototype.hasOwnProperty.call(t$1, e$1), - r: (t$1) => { - "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t$1, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t$1, "__esModule", { value: !0 }); + o: (t, e) => Object.prototype.hasOwnProperty.call(t, e), + r: (t) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }); } }, e = {}; t.r(e), t.d(e, { - XMLBuilder: () => ft, - XMLParser: () => st, - XMLValidator: () => mt + XMLBuilder: () => dt, + XMLParser: () => it, + XMLValidator: () => gt }); - const n = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", i = new RegExp("^[" + n + "][" + n + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); - function s$1(t$1, e$1) { - const n$1 = []; - let i$1 = e$1.exec(t$1); - for (; i$1;) { - const s$2 = []; - s$2.startIndex = e$1.lastIndex - i$1[0].length; - const r$1 = i$1.length; - for (let t$2 = 0; t$2 < r$1; t$2++) s$2.push(i$1[t$2]); - n$1.push(s$2), i$1 = e$1.exec(t$1); - } - return n$1; - } - const r = function(t$1) { - return !(null == i.exec(t$1)); + const i = new RegExp("^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t, e) { + const n = []; + let i = e.exec(t); + for (; i;) { + const s = []; + s.startIndex = e.lastIndex - i[0].length; + const r = i.length; + for (let t = 0; t < r; t++) s.push(i[t]); + n.push(s), i = e.exec(t); + } + return n; + } + const r = function(t) { + return !(null == i.exec(t)); }, o = { allowBooleanAttributes: !1, unpairedTags: [] }; - function a(t$1, e$1) { - e$1 = Object.assign({}, o, e$1); - const n$1 = []; - let i$1 = !1, s$2 = !1; - "" === t$1[0] && (t$1 = t$1.substr(1)); - for (let o$1 = 0; o$1 < t$1.length; o$1++) if ("<" === t$1[o$1] && "?" === t$1[o$1 + 1]) { - if (o$1 += 2, o$1 = u(t$1, o$1), o$1.err) return o$1; + function a(t, e) { + e = Object.assign({}, o, e); + const n = []; + let i = !1, s = !1; + "" === t[0] && (t = t.substr(1)); + for (let o = 0; o < t.length; o++) if ("<" === t[o] && "?" === t[o + 1]) { + if (o += 2, o = u(t, o), o.err) return o; } else { - if ("<" !== t$1[o$1]) { - if (l(t$1[o$1])) continue; - return x("InvalidChar", "char '" + t$1[o$1] + "' is not expected.", N(t$1, o$1)); + if ("<" !== t[o]) { + if (l(t[o])) continue; + return m("InvalidChar", "char '" + t[o] + "' is not expected.", b(t, o)); } { - let a$1 = o$1; - if (o$1++, "!" === t$1[o$1]) { - o$1 = h$1(t$1, o$1); + let a = o; + if (o++, "!" === t[o]) { + o = h(t, o); continue; } { - let d$2 = !1; - "/" === t$1[o$1] && (d$2 = !0, o$1++); - let f$1 = ""; - for (; o$1 < t$1.length && ">" !== t$1[o$1] && " " !== t$1[o$1] && " " !== t$1[o$1] && "\n" !== t$1[o$1] && "\r" !== t$1[o$1]; o$1++) f$1 += t$1[o$1]; - if (f$1 = f$1.trim(), "/" === f$1[f$1.length - 1] && (f$1 = f$1.substring(0, f$1.length - 1), o$1--), !r(f$1)) { - let e$2; - return e$2 = 0 === f$1.trim().length ? "Invalid space after '<'." : "Tag '" + f$1 + "' is an invalid name.", x("InvalidTag", e$2, N(t$1, o$1)); + let d = !1; + "/" === t[o] && (d = !0, o++); + let p = ""; + for (; o < t.length && ">" !== t[o] && " " !== t[o] && " " !== t[o] && "\n" !== t[o] && "\r" !== t[o]; o++) p += t[o]; + if (p = p.trim(), "/" === p[p.length - 1] && (p = p.substring(0, p.length - 1), o--), !r(p)) { + let e; + return e = 0 === p.trim().length ? "Invalid space after '<'." : "Tag '" + p + "' is an invalid name.", m("InvalidTag", e, b(t, o)); } - const p$1 = c(t$1, o$1); - if (!1 === p$1) return x("InvalidAttr", "Attributes for '" + f$1 + "' have open quote.", N(t$1, o$1)); - let b$1 = p$1.value; - if (o$1 = p$1.index, "/" === b$1[b$1.length - 1]) { - const n$2 = o$1 - b$1.length; - b$1 = b$1.substring(0, b$1.length - 1); - const s$3 = g(b$1, e$1); - if (!0 !== s$3) return x(s$3.err.code, s$3.err.msg, N(t$1, n$2 + s$3.err.line)); - i$1 = !0; - } else if (d$2) { - if (!p$1.tagClosed) return x("InvalidTag", "Closing tag '" + f$1 + "' doesn't have proper closing.", N(t$1, o$1)); - if (b$1.trim().length > 0) return x("InvalidTag", "Closing tag '" + f$1 + "' can't have attributes or invalid starting.", N(t$1, a$1)); - if (0 === n$1.length) return x("InvalidTag", "Closing tag '" + f$1 + "' has not been opened.", N(t$1, a$1)); + const c = f(t, o); + if (!1 === c) return m("InvalidAttr", "Attributes for '" + p + "' have open quote.", b(t, o)); + let E = c.value; + if (o = c.index, "/" === E[E.length - 1]) { + const n = o - E.length; + E = E.substring(0, E.length - 1); + const s = g(E, e); + if (!0 !== s) return m(s.err.code, s.err.msg, b(t, n + s.err.line)); + i = !0; + } else if (d) { + if (!c.tagClosed) return m("InvalidTag", "Closing tag '" + p + "' doesn't have proper closing.", b(t, o)); + if (E.trim().length > 0) return m("InvalidTag", "Closing tag '" + p + "' can't have attributes or invalid starting.", b(t, a)); + if (0 === n.length) return m("InvalidTag", "Closing tag '" + p + "' has not been opened.", b(t, a)); { - const e$2 = n$1.pop(); - if (f$1 !== e$2.tagName) { - let n$2 = N(t$1, e$2.tagStartPos); - return x("InvalidTag", "Expected closing tag '" + e$2.tagName + "' (opened in line " + n$2.line + ", col " + n$2.col + ") instead of closing tag '" + f$1 + "'.", N(t$1, a$1)); + const e = n.pop(); + if (p !== e.tagName) { + let n = b(t, e.tagStartPos); + return m("InvalidTag", "Expected closing tag '" + e.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + p + "'.", b(t, a)); } - 0 == n$1.length && (s$2 = !0); + 0 == n.length && (s = !0); } } else { - const r$1 = g(b$1, e$1); - if (!0 !== r$1) return x(r$1.err.code, r$1.err.msg, N(t$1, o$1 - b$1.length + r$1.err.line)); - if (!0 === s$2) return x("InvalidXml", "Multiple possible root nodes found.", N(t$1, o$1)); - -1 !== e$1.unpairedTags.indexOf(f$1) || n$1.push({ - tagName: f$1, - tagStartPos: a$1 - }), i$1 = !0; + const r = g(E, e); + if (!0 !== r) return m(r.err.code, r.err.msg, b(t, o - E.length + r.err.line)); + if (!0 === s) return m("InvalidXml", "Multiple possible root nodes found.", b(t, o)); + -1 !== e.unpairedTags.indexOf(p) || n.push({ + tagName: p, + tagStartPos: a + }), i = !0; } - for (o$1++; o$1 < t$1.length; o$1++) if ("<" === t$1[o$1]) { - if ("!" === t$1[o$1 + 1]) { - o$1++, o$1 = h$1(t$1, o$1); + for (o++; o < t.length; o++) if ("<" === t[o]) { + if ("!" === t[o + 1]) { + o++, o = h(t, o); continue; } - if ("?" !== t$1[o$1 + 1]) break; - if (o$1 = u(t$1, ++o$1), o$1.err) return o$1; - } else if ("&" === t$1[o$1]) { - const e$2 = m$1(t$1, o$1); - if (-1 == e$2) return x("InvalidChar", "char '&' is not expected.", N(t$1, o$1)); - o$1 = e$2; - } else if (!0 === s$2 && !l(t$1[o$1])) return x("InvalidXml", "Extra text at the end", N(t$1, o$1)); - "<" === t$1[o$1] && o$1--; + if ("?" !== t[o + 1]) break; + if (o = u(t, ++o), o.err) return o; + } else if ("&" === t[o]) { + const e = x(t, o); + if (-1 == e) return m("InvalidChar", "char '&' is not expected.", b(t, o)); + o = e; + } else if (!0 === s && !l(t[o])) return m("InvalidXml", "Extra text at the end", b(t, o)); + "<" === t[o] && o--; } } } - return i$1 ? 1 == n$1.length ? x("InvalidTag", "Unclosed tag '" + n$1[0].tagName + "'.", N(t$1, n$1[0].tagStartPos)) : !(n$1.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(n$1.map((t$2) => t$2.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { + return i ? 1 == n.length ? m("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", b(t, n[0].tagStartPos)) : !(n.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(n.map(((t) => t.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 - }) : x("InvalidXml", "Start tag expected.", 1); + }) : m("InvalidXml", "Start tag expected.", 1); } - function l(t$1) { - return " " === t$1 || " " === t$1 || "\n" === t$1 || "\r" === t$1; + function l(t) { + return " " === t || " " === t || "\n" === t || "\r" === t; } - function u(t$1, e$1) { - const n$1 = e$1; - for (; e$1 < t$1.length; e$1++) if ("?" != t$1[e$1] && " " != t$1[e$1]); + function u(t, e) { + const n = e; + for (; e < t.length; e++) if ("?" != t[e] && " " != t[e]); else { - const i$1 = t$1.substr(n$1, e$1 - n$1); - if (e$1 > 5 && "xml" === i$1) return x("InvalidXml", "XML declaration allowed only at the start of the document.", N(t$1, e$1)); - if ("?" == t$1[e$1] && ">" == t$1[e$1 + 1]) { - e$1++; + const i = t.substr(n, e - n); + if (e > 5 && "xml" === i) return m("InvalidXml", "XML declaration allowed only at the start of the document.", b(t, e)); + if ("?" == t[e] && ">" == t[e + 1]) { + e++; break; } } - return e$1; + return e; } - function h$1(t$1, e$1) { - if (t$1.length > e$1 + 5 && "-" === t$1[e$1 + 1] && "-" === t$1[e$1 + 2]) { - for (e$1 += 3; e$1 < t$1.length; e$1++) if ("-" === t$1[e$1] && "-" === t$1[e$1 + 1] && ">" === t$1[e$1 + 2]) { - e$1 += 2; + function h(t, e) { + if (t.length > e + 5 && "-" === t[e + 1] && "-" === t[e + 2]) { + for (e += 3; e < t.length; e++) if ("-" === t[e] && "-" === t[e + 1] && ">" === t[e + 2]) { + e += 2; break; } - } else if (t$1.length > e$1 + 8 && "D" === t$1[e$1 + 1] && "O" === t$1[e$1 + 2] && "C" === t$1[e$1 + 3] && "T" === t$1[e$1 + 4] && "Y" === t$1[e$1 + 5] && "P" === t$1[e$1 + 6] && "E" === t$1[e$1 + 7]) { - let n$1 = 1; - for (e$1 += 8; e$1 < t$1.length; e$1++) if ("<" === t$1[e$1]) n$1++; - else if (">" === t$1[e$1] && (n$1--, 0 === n$1)) break; - } else if (t$1.length > e$1 + 9 && "[" === t$1[e$1 + 1] && "C" === t$1[e$1 + 2] && "D" === t$1[e$1 + 3] && "A" === t$1[e$1 + 4] && "T" === t$1[e$1 + 5] && "A" === t$1[e$1 + 6] && "[" === t$1[e$1 + 7]) { - for (e$1 += 8; e$1 < t$1.length; e$1++) if ("]" === t$1[e$1] && "]" === t$1[e$1 + 1] && ">" === t$1[e$1 + 2]) { - e$1 += 2; + } else if (t.length > e + 8 && "D" === t[e + 1] && "O" === t[e + 2] && "C" === t[e + 3] && "T" === t[e + 4] && "Y" === t[e + 5] && "P" === t[e + 6] && "E" === t[e + 7]) { + let n = 1; + for (e += 8; e < t.length; e++) if ("<" === t[e]) n++; + else if (">" === t[e] && (n--, 0 === n)) break; + } else if (t.length > e + 9 && "[" === t[e + 1] && "C" === t[e + 2] && "D" === t[e + 3] && "A" === t[e + 4] && "T" === t[e + 5] && "A" === t[e + 6] && "[" === t[e + 7]) { + for (e += 8; e < t.length; e++) if ("]" === t[e] && "]" === t[e + 1] && ">" === t[e + 2]) { + e += 2; break; } } - return e$1; + return e; } - const d$1 = "\"", f = "'"; - function c(t$1, e$1) { - let n$1 = "", i$1 = "", s$2 = !1; - for (; e$1 < t$1.length; e$1++) { - if (t$1[e$1] === d$1 || t$1[e$1] === f) "" === i$1 ? i$1 = t$1[e$1] : i$1 !== t$1[e$1] || (i$1 = ""); - else if (">" === t$1[e$1] && "" === i$1) { - s$2 = !0; + const d = "\"", p = "'"; + function f(t, e) { + let n = "", i = "", s = !1; + for (; e < t.length; e++) { + if (t[e] === d || t[e] === p) "" === i ? i = t[e] : i !== t[e] || (i = ""); + else if (">" === t[e] && "" === i) { + s = !0; break; } - n$1 += t$1[e$1]; + n += t[e]; } - return "" === i$1 && { - value: n$1, - index: e$1, - tagClosed: s$2 + return "" === i && { + value: n, + index: e, + tagClosed: s }; } - const p = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g"); - function g(t$1, e$1) { - const n$1 = s$1(t$1, p), i$1 = {}; - for (let t$2 = 0; t$2 < n$1.length; t$2++) { - if (0 === n$1[t$2][1].length) return x("InvalidAttr", "Attribute '" + n$1[t$2][2] + "' has no space in starting.", E(n$1[t$2])); - if (void 0 !== n$1[t$2][3] && void 0 === n$1[t$2][4]) return x("InvalidAttr", "Attribute '" + n$1[t$2][2] + "' is without value.", E(n$1[t$2])); - if (void 0 === n$1[t$2][3] && !e$1.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + n$1[t$2][2] + "' is not allowed.", E(n$1[t$2])); - const s$2 = n$1[t$2][2]; - if (!b(s$2)) return x("InvalidAttr", "Attribute '" + s$2 + "' is an invalid name.", E(n$1[t$2])); - if (i$1.hasOwnProperty(s$2)) return x("InvalidAttr", "Attribute '" + s$2 + "' is repeated.", E(n$1[t$2])); - i$1[s$2] = 1; + const c = /* @__PURE__ */ new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g"); + function g(t, e) { + const n = s(t, c), i = {}; + for (let t = 0; t < n.length; t++) { + if (0 === n[t][1].length) return m("InvalidAttr", "Attribute '" + n[t][2] + "' has no space in starting.", N(n[t])); + if (void 0 !== n[t][3] && void 0 === n[t][4]) return m("InvalidAttr", "Attribute '" + n[t][2] + "' is without value.", N(n[t])); + if (void 0 === n[t][3] && !e.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + n[t][2] + "' is not allowed.", N(n[t])); + const s = n[t][2]; + if (!E(s)) return m("InvalidAttr", "Attribute '" + s + "' is an invalid name.", N(n[t])); + if (i.hasOwnProperty(s)) return m("InvalidAttr", "Attribute '" + s + "' is repeated.", N(n[t])); + i[s] = 1; } return !0; } - function m$1(t$1, e$1) { - if (";" === t$1[++e$1]) return -1; - if ("#" === t$1[e$1]) return function(t$2, e$2) { - let n$2 = /\d/; - for ("x" === t$2[e$2] && (e$2++, n$2 = /[\da-fA-F]/); e$2 < t$2.length; e$2++) { - if (";" === t$2[e$2]) return e$2; - if (!t$2[e$2].match(n$2)) break; + function x(t, e) { + if (";" === t[++e]) return -1; + if ("#" === t[e]) return function(t, e) { + let n = /\d/; + for ("x" === t[e] && (e++, n = /[\da-fA-F]/); e < t.length; e++) { + if (";" === t[e]) return e; + if (!t[e].match(n)) break; } return -1; - }(t$1, ++e$1); - let n$1 = 0; - for (; e$1 < t$1.length; e$1++, n$1++) if (!(t$1[e$1].match(/\w/) && n$1 < 20)) { - if (";" === t$1[e$1]) break; + }(t, ++e); + let n = 0; + for (; e < t.length; e++, n++) if (!(t[e].match(/\w/) && n < 20)) { + if (";" === t[e]) break; return -1; } - return e$1; + return e; } - function x(t$1, e$1, n$1) { + function m(t, e, n) { return { err: { - code: t$1, - msg: e$1, - line: n$1.line || n$1, - col: n$1.col + code: t, + msg: e, + line: n.line || n, + col: n.col } }; } - function b(t$1) { - return r(t$1); + function E(t) { + return r(t); } - function N(t$1, e$1) { - const n$1 = t$1.substring(0, e$1).split(/\r?\n/); + function b(t, e) { + const n = t.substring(0, e).split(/\r?\n/); return { - line: n$1.length, - col: n$1[n$1.length - 1].length + 1 + line: n.length, + col: n[n.length - 1].length + 1 }; } - function E(t$1) { - return t$1.startIndex + t$1[1].length; + function N(t) { + return t.startIndex + t[1].length; } - const v = { + const y = { preserveOrder: !1, attributeNamePrefix: "@_", attributesGroupName: !1, @@ -12181,11 +12417,11 @@ var require_fxp = __commonJS({ "node_modules/.deno/fast-xml-parser@5.2.3/node_mo leadingZeros: !0, eNotation: !0 }, - tagValueProcessor: function(t$1, e$1) { - return e$1; + tagValueProcessor: function(t, e) { + return e; }, - attributeValueProcessor: function(t$1, e$1) { - return e$1; + attributeValueProcessor: function(t, e) { + return e; }, stopNodes: [], alwaysCreateTextNode: !1, @@ -12198,156 +12434,234 @@ var require_fxp = __commonJS({ "node_modules/.deno/fast-xml-parser@5.2.3/node_mo ignorePiTags: !1, transformTagName: !1, transformAttributeName: !1, - updateTag: function(t$1, e$1, n$1) { - return t$1; + updateTag: function(t, e, n) { + return t; }, captureMetaData: !1 }; - let y$1; - y$1 = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata"); - class T { - constructor(t$1) { - this.tagname = t$1, this.child = [], this[":@"] = {}; + function T(t) { + return "boolean" == typeof t ? { + enabled: t, + maxEntitySize: 1e4, + maxExpansionDepth: 10, + maxTotalExpansions: 1e3, + maxExpandedLength: 1e5, + allowedTags: null, + tagFilter: null + } : "object" == typeof t && null !== t ? { + enabled: !1 !== t.enabled, + maxEntitySize: t.maxEntitySize ?? 1e4, + maxExpansionDepth: t.maxExpansionDepth ?? 10, + maxTotalExpansions: t.maxTotalExpansions ?? 1e3, + maxExpandedLength: t.maxExpandedLength ?? 1e5, + allowedTags: t.allowedTags ?? null, + tagFilter: t.tagFilter ?? null + } : T(!0); + } + const w = function(t) { + const e = Object.assign({}, y, t); + return e.processEntities = T(e.processEntities), e; + }; + let v; + v = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata"); + class I { + constructor(t) { + this.tagname = t, this.child = [], this[":@"] = {}; } - add(t$1, e$1) { - "__proto__" === t$1 && (t$1 = "#__proto__"), this.child.push({ [t$1]: e$1 }); + add(t, e) { + "__proto__" === t && (t = "#__proto__"), this.child.push({ [t]: e }); } - addChild(t$1, e$1) { - "__proto__" === t$1.tagname && (t$1.tagname = "#__proto__"), t$1[":@"] && Object.keys(t$1[":@"]).length > 0 ? this.child.push({ - [t$1.tagname]: t$1.child, - ":@": t$1[":@"] - }) : this.child.push({ [t$1.tagname]: t$1.child }), void 0 !== e$1 && (this.child[this.child.length - 1][y$1] = { startIndex: e$1 }); + addChild(t, e) { + "__proto__" === t.tagname && (t.tagname = "#__proto__"), t[":@"] && Object.keys(t[":@"]).length > 0 ? this.child.push({ + [t.tagname]: t.child, + ":@": t[":@"] + }) : this.child.push({ [t.tagname]: t.child }), void 0 !== e && (this.child[this.child.length - 1][v] = { startIndex: e }); } static getMetaDataSymbol() { - return y$1; + return v; } } - function w$1(t$1, e$1) { - const n$1 = {}; - if ("O" !== t$1[e$1 + 3] || "C" !== t$1[e$1 + 4] || "T" !== t$1[e$1 + 5] || "Y" !== t$1[e$1 + 6] || "P" !== t$1[e$1 + 7] || "E" !== t$1[e$1 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); - { - e$1 += 9; - let i$1 = 1, s$2 = !1, r$1 = !1, o$1 = ""; - for (; e$1 < t$1.length; e$1++) if ("<" !== t$1[e$1] || r$1) if (">" === t$1[e$1]) { - if (r$1 ? "-" === t$1[e$1 - 1] && "-" === t$1[e$1 - 2] && (r$1 = !1, i$1--) : i$1--, 0 === i$1) break; - } else "[" === t$1[e$1] ? s$2 = !0 : o$1 += t$1[e$1]; - else { - if (s$2 && C(t$1, "!ENTITY", e$1)) { - let i$2, s$3; - e$1 += 7, [i$2, s$3, e$1] = O(t$1, e$1 + 1), -1 === s$3.indexOf("&") && (n$1[i$2] = { - regx: RegExp(`&${i$2};`, "g"), - val: s$3 - }); - } else if (s$2 && C(t$1, "!ELEMENT", e$1)) { - e$1 += 8; - const { index: n$2 } = S(t$1, e$1 + 1); - e$1 = n$2; - } else if (s$2 && C(t$1, "!ATTLIST", e$1)) e$1 += 8; - else if (s$2 && C(t$1, "!NOTATION", e$1)) { - e$1 += 9; - const { index: n$2 } = A(t$1, e$1 + 1); - e$1 = n$2; - } else { - if (!C(t$1, "!--", e$1)) throw new Error("Invalid DOCTYPE"); - r$1 = !0; + class O { + constructor(t) { + this.suppressValidationErr = !t, this.options = t; + } + readDocType(t, e) { + const n = {}; + if ("O" !== t[e + 3] || "C" !== t[e + 4] || "T" !== t[e + 5] || "Y" !== t[e + 6] || "P" !== t[e + 7] || "E" !== t[e + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e += 9; + let i = 1, s = !1, r = !1, o = ""; + for (; e < t.length; e++) if ("<" !== t[e] || r) if (">" === t[e]) { + if (r ? "-" === t[e - 1] && "-" === t[e - 2] && (r = !1, i--) : i--, 0 === i) break; + } else "[" === t[e] ? s = !0 : o += t[e]; + else { + if (s && A(t, "!ENTITY", e)) { + let i, s; + if (e += 7, [i, s, e] = this.readEntityExp(t, e + 1, this.suppressValidationErr), -1 === s.indexOf("&")) { + const t = i.replace(/[.\-+*:]/g, "\\."); + n[i] = { + regx: RegExp(`&${t};`, "g"), + val: s + }; + } + } else if (s && A(t, "!ELEMENT", e)) { + e += 8; + const { index: n } = this.readElementExp(t, e + 1); + e = n; + } else if (s && A(t, "!ATTLIST", e)) e += 8; + else if (s && A(t, "!NOTATION", e)) { + e += 9; + const { index: n } = this.readNotationExp(t, e + 1, this.suppressValidationErr); + e = n; + } else { + if (!A(t, "!--", e)) throw new Error("Invalid DOCTYPE"); + r = !0; + } + i++, o = ""; } - i$1++, o$1 = ""; + if (0 !== i) throw new Error("Unclosed DOCTYPE"); } - if (0 !== i$1) throw new Error("Unclosed DOCTYPE"); + return { + entities: n, + i: e + }; } - return { - entities: n$1, - i: e$1 - }; - } - const P = (t$1, e$1) => { - for (; e$1 < t$1.length && /\s/.test(t$1[e$1]);) e$1++; - return e$1; - }; - function O(t$1, e$1) { - e$1 = P(t$1, e$1); - let n$1 = ""; - for (; e$1 < t$1.length && !/\s/.test(t$1[e$1]) && "\"" !== t$1[e$1] && "'" !== t$1[e$1];) n$1 += t$1[e$1], e$1++; - if ($(n$1), e$1 = P(t$1, e$1), "SYSTEM" === t$1.substring(e$1, e$1 + 6).toUpperCase()) throw new Error("External entities are not supported"); - if ("%" === t$1[e$1]) throw new Error("Parameter entities are not supported"); - let i$1 = ""; - return [e$1, i$1] = I(t$1, e$1, "entity"), [ - n$1, - i$1, - --e$1 - ]; - } - function A(t$1, e$1) { - e$1 = P(t$1, e$1); - let n$1 = ""; - for (; e$1 < t$1.length && !/\s/.test(t$1[e$1]);) n$1 += t$1[e$1], e$1++; - $(n$1), e$1 = P(t$1, e$1); - const i$1 = t$1.substring(e$1, e$1 + 6).toUpperCase(); - if ("SYSTEM" !== i$1 && "PUBLIC" !== i$1) throw new Error(`Expected SYSTEM or PUBLIC, found "${i$1}"`); - e$1 += i$1.length, e$1 = P(t$1, e$1); - let s$2 = null, r$1 = null; - if ("PUBLIC" === i$1) [e$1, s$2] = I(t$1, e$1, "publicIdentifier"), "\"" !== t$1[e$1 = P(t$1, e$1)] && "'" !== t$1[e$1] || ([e$1, r$1] = I(t$1, e$1, "systemIdentifier")); - else if ("SYSTEM" === i$1 && ([e$1, r$1] = I(t$1, e$1, "systemIdentifier"), !r$1)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); - return { - notationName: n$1, - publicIdentifier: s$2, - systemIdentifier: r$1, - index: --e$1 - }; - } - function I(t$1, e$1, n$1) { - let i$1 = ""; - const s$2 = t$1[e$1]; - if ("\"" !== s$2 && "'" !== s$2) throw new Error(`Expected quoted string, found "${s$2}"`); - for (e$1++; e$1 < t$1.length && t$1[e$1] !== s$2;) i$1 += t$1[e$1], e$1++; - if (t$1[e$1] !== s$2) throw new Error(`Unterminated ${n$1} value`); - return [++e$1, i$1]; - } - function S(t$1, e$1) { - e$1 = P(t$1, e$1); - let n$1 = ""; - for (; e$1 < t$1.length && !/\s/.test(t$1[e$1]);) n$1 += t$1[e$1], e$1++; - if (!$(n$1)) throw new Error(`Invalid element name: "${n$1}"`); - let i$1 = ""; - if ("E" === t$1[e$1 = P(t$1, e$1)] && C(t$1, "MPTY", e$1)) e$1 += 6; - else if ("A" === t$1[e$1] && C(t$1, "NY", e$1)) e$1 += 4; - else { - if ("(" !== t$1[e$1]) throw new Error(`Invalid Element Expression, found "${t$1[e$1]}"`); - for (e$1++; e$1 < t$1.length && ")" !== t$1[e$1];) i$1 += t$1[e$1], e$1++; - if (")" !== t$1[e$1]) throw new Error("Unterminated content model"); + readEntityExp(t, e) { + e = P(t, e); + let n = ""; + for (; e < t.length && !/\s/.test(t[e]) && "\"" !== t[e] && "'" !== t[e];) n += t[e], e++; + if (S(n), e = P(t, e), !this.suppressValidationErr) { + if ("SYSTEM" === t.substring(e, e + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t[e]) throw new Error("Parameter entities are not supported"); + } + let i = ""; + if ([e, i] = this.readIdentifierVal(t, e, "entity"), !1 !== this.options.enabled && this.options.maxEntitySize && i.length > this.options.maxEntitySize) throw new Error(`Entity "${n}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`); + return [ + n, + i, + --e + ]; + } + readNotationExp(t, e) { + e = P(t, e); + let n = ""; + for (; e < t.length && !/\s/.test(t[e]);) n += t[e], e++; + !this.suppressValidationErr && S(n), e = P(t, e); + const i = t.substring(e, e + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== i && "PUBLIC" !== i) throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`); + e += i.length, e = P(t, e); + let s = null, r = null; + if ("PUBLIC" === i) [e, s] = this.readIdentifierVal(t, e, "publicIdentifier"), "\"" !== t[e = P(t, e)] && "'" !== t[e] || ([e, r] = this.readIdentifierVal(t, e, "systemIdentifier")); + else if ("SYSTEM" === i && ([e, r] = this.readIdentifierVal(t, e, "systemIdentifier"), !this.suppressValidationErr && !r)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { + notationName: n, + publicIdentifier: s, + systemIdentifier: r, + index: --e + }; + } + readIdentifierVal(t, e, n) { + let i = ""; + const s = t[e]; + if ("\"" !== s && "'" !== s) throw new Error(`Expected quoted string, found "${s}"`); + for (e++; e < t.length && t[e] !== s;) i += t[e], e++; + if (t[e] !== s) throw new Error(`Unterminated ${n} value`); + return [++e, i]; + } + readElementExp(t, e) { + e = P(t, e); + let n = ""; + for (; e < t.length && !/\s/.test(t[e]);) n += t[e], e++; + if (!this.suppressValidationErr && !r(n)) throw new Error(`Invalid element name: "${n}"`); + let i = ""; + if ("E" === t[e = P(t, e)] && A(t, "MPTY", e)) e += 4; + else if ("A" === t[e] && A(t, "NY", e)) e += 2; + else if ("(" === t[e]) { + for (e++; e < t.length && ")" !== t[e];) i += t[e], e++; + if (")" !== t[e]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t[e]}"`); + return { + elementName: n, + contentModel: i.trim(), + index: e + }; + } + readAttlistExp(t, e) { + e = P(t, e); + let n = ""; + for (; e < t.length && !/\s/.test(t[e]);) n += t[e], e++; + S(n), e = P(t, e); + let i = ""; + for (; e < t.length && !/\s/.test(t[e]);) i += t[e], e++; + if (!S(i)) throw new Error(`Invalid attribute name: "${i}"`); + e = P(t, e); + let s = ""; + if ("NOTATION" === t.substring(e, e + 8).toUpperCase()) { + if (s = "NOTATION", "(" !== t[e = P(t, e += 8)]) throw new Error(`Expected '(', found "${t[e]}"`); + e++; + let n = []; + for (; e < t.length && ")" !== t[e];) { + let i = ""; + for (; e < t.length && "|" !== t[e] && ")" !== t[e];) i += t[e], e++; + if (i = i.trim(), !S(i)) throw new Error(`Invalid notation name: "${i}"`); + n.push(i), "|" === t[e] && (e++, e = P(t, e)); + } + if (")" !== t[e]) throw new Error("Unterminated list of notations"); + e++, s += " (" + n.join("|") + ")"; + } else { + for (; e < t.length && !/\s/.test(t[e]);) s += t[e], e++; + if (!this.suppressValidationErr && ![ + "CDATA", + "ID", + "IDREF", + "IDREFS", + "ENTITY", + "ENTITIES", + "NMTOKEN", + "NMTOKENS" + ].includes(s.toUpperCase())) throw new Error(`Invalid attribute type: "${s}"`); + } + e = P(t, e); + let r = ""; + return "#REQUIRED" === t.substring(e, e + 8).toUpperCase() ? (r = "#REQUIRED", e += 8) : "#IMPLIED" === t.substring(e, e + 7).toUpperCase() ? (r = "#IMPLIED", e += 7) : [e, r] = this.readIdentifierVal(t, e, "ATTLIST"), { + elementName: n, + attributeName: i, + attributeType: s, + defaultValue: r, + index: e + }; } - return { - elementName: n$1, - contentModel: i$1.trim(), - index: e$1 - }; } - function C(t$1, e$1, n$1) { - for (let i$1 = 0; i$1 < e$1.length; i$1++) if (e$1[i$1] !== t$1[n$1 + i$1 + 1]) return !1; + const P = (t, e) => { + for (; e < t.length && /\s/.test(t[e]);) e++; + return e; + }; + function A(t, e, n) { + for (let i = 0; i < e.length; i++) if (e[i] !== t[n + i + 1]) return !1; return !0; } - function $(t$1) { - if (r(t$1)) return t$1; - throw new Error(`Invalid entity name ${t$1}`); + function S(t) { + if (r(t)) return t; + throw new Error(`Invalid entity name ${t}`); } - const j = /^[-+]?0x[a-fA-F0-9]+$/, D = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { + const C = /^[-+]?0x[a-fA-F0-9]+$/, $ = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: !0, leadingZeros: !0, decimalPoint: ".", eNotation: !0 }; - const M = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; - function _(t$1) { - return "function" == typeof t$1 ? t$1 : Array.isArray(t$1) ? (e$1) => { - for (const n$1 of t$1) { - if ("string" == typeof n$1 && e$1 === n$1) return !0; - if (n$1 instanceof RegExp && n$1.test(e$1)) return !0; + const D = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function L(t) { + return "function" == typeof t ? t : Array.isArray(t) ? (e) => { + for (const n of t) { + if ("string" == typeof n && e === n) return !0; + if (n instanceof RegExp && n.test(e)) return !0; } } : () => !1; } - class k { - constructor(t$1) { - this.options = t$1, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { + class F { + constructor(t) { + if (this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" @@ -12402,417 +12716,434 @@ var require_fxp = __commonJS({ "node_modules/.deno/fast-xml-parser@5.2.3/node_mo }, num_dec: { regex: /&#([0-9]{1,7});/g, - val: (t$2, e$1) => String.fromCodePoint(Number.parseInt(e$1, 10)) + val: (t, e) => K(e, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, - val: (t$2, e$1) => String.fromCodePoint(Number.parseInt(e$1, 16)) + val: (t, e) => K(e, 16, "&#x") + } + }, this.addExternalEntities = j, this.parseXml = B, this.parseTextData = M, this.resolveNameSpace = _, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q, this.saveTextToParentTag = G, this.addChild = R, this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t = 0; t < this.options.stopNodes.length; t++) { + const e = this.options.stopNodes[t]; + "string" == typeof e && (e.startsWith("*.") ? this.stopNodesWildcard.add(e.substring(2)) : this.stopNodesExact.add(e)); } - }, this.addExternalEntities = F, this.parseXml = X, this.parseTextData = L, this.resolveNameSpace = B, this.buildAttributesMap = G, this.isItStopNode = Z, this.replaceEntitiesValue = R, this.readStopNodeData = J, this.saveTextToParentTag = q, this.addChild = Y, this.ignoreAttributesFn = _(this.options.ignoreAttributes); + } } } - function F(t$1) { - const e$1 = Object.keys(t$1); - for (let n$1 = 0; n$1 < e$1.length; n$1++) { - const i$1 = e$1[n$1]; - this.lastEntities[i$1] = { - regex: new RegExp("&" + i$1 + ";", "g"), - val: t$1[i$1] + function j(t) { + const e = Object.keys(t); + for (let n = 0; n < e.length; n++) { + const i = e[n], s = i.replace(/[.\-+*:]/g, "\\."); + this.lastEntities[i] = { + regex: new RegExp("&" + s + ";", "g"), + val: t[i] }; } } - function L(t$1, e$1, n$1, i$1, s$2, r$1, o$1) { - if (void 0 !== t$1 && (this.options.trimValues && !i$1 && (t$1 = t$1.trim()), t$1.length > 0)) { - o$1 || (t$1 = this.replaceEntitiesValue(t$1)); - const i$2 = this.options.tagValueProcessor(e$1, t$1, n$1, s$2, r$1); - return null == i$2 ? t$1 : typeof i$2 != typeof t$1 || i$2 !== t$1 ? i$2 : this.options.trimValues || t$1.trim() === t$1 ? H(t$1, this.options.parseTagValue, this.options.numberParseOptions) : t$1; + function M(t, e, n, i, s, r, o) { + if (void 0 !== t && (this.options.trimValues && !i && (t = t.trim()), t.length > 0)) { + o || (t = this.replaceEntitiesValue(t, e, n)); + const i = this.options.tagValueProcessor(e, t, n, s, r); + return null == i ? t : typeof i != typeof t || i !== t ? i : this.options.trimValues || t.trim() === t ? Z(t, this.options.parseTagValue, this.options.numberParseOptions) : t; } } - function B(t$1) { + function _(t) { if (this.options.removeNSPrefix) { - const e$1 = t$1.split(":"), n$1 = "/" === t$1.charAt(0) ? "/" : ""; - if ("xmlns" === e$1[0]) return ""; - 2 === e$1.length && (t$1 = n$1 + e$1[1]); - } - return t$1; - } - const U = new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm"); - function G(t$1, e$1, n$1) { - if (!0 !== this.options.ignoreAttributes && "string" == typeof t$1) { - const n$2 = s$1(t$1, U), i$1 = n$2.length, r$1 = {}; - for (let t$2 = 0; t$2 < i$1; t$2++) { - const i$2 = this.resolveNameSpace(n$2[t$2][1]); - if (this.ignoreAttributesFn(i$2, e$1)) continue; - let s$2 = n$2[t$2][4], o$1 = this.options.attributeNamePrefix + i$2; - if (i$2.length) if (this.options.transformAttributeName && (o$1 = this.options.transformAttributeName(o$1)), "__proto__" === o$1 && (o$1 = "#__proto__"), void 0 !== s$2) { - this.options.trimValues && (s$2 = s$2.trim()), s$2 = this.replaceEntitiesValue(s$2); - const t$3 = this.options.attributeValueProcessor(i$2, s$2, e$1); - r$1[o$1] = null == t$3 ? s$2 : typeof t$3 != typeof s$2 || t$3 !== s$2 ? t$3 : H(s$2, this.options.parseAttributeValue, this.options.numberParseOptions); - } else this.options.allowBooleanAttributes && (r$1[o$1] = !0); - } - if (!Object.keys(r$1).length) return; + const e = t.split(":"), n = "/" === t.charAt(0) ? "/" : ""; + if ("xmlns" === e[0]) return ""; + 2 === e.length && (t = n + e[1]); + } + return t; + } + const k = /* @__PURE__ */ new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm"); + function U(t, e, n) { + if (!0 !== this.options.ignoreAttributes && "string" == typeof t) { + const i = s(t, k), r = i.length, o = {}; + for (let t = 0; t < r; t++) { + const s = this.resolveNameSpace(i[t][1]); + if (this.ignoreAttributesFn(s, e)) continue; + let r = i[t][4], a = this.options.attributeNamePrefix + s; + if (s.length) if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), "__proto__" === a && (a = "#__proto__"), void 0 !== r) { + this.options.trimValues && (r = r.trim()), r = this.replaceEntitiesValue(r, n, e); + const t = this.options.attributeValueProcessor(s, r, e); + o[a] = null == t ? r : typeof t != typeof r || t !== r ? t : Z(r, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (o[a] = !0); + } + if (!Object.keys(o).length) return; if (this.options.attributesGroupName) { - const t$2 = {}; - return t$2[this.options.attributesGroupName] = r$1, t$2; + const t = {}; + return t[this.options.attributesGroupName] = o, t; } - return r$1; + return o; } } - const X = function(t$1) { - t$1 = t$1.replace(/\r\n?/g, "\n"); - const e$1 = new T("!xml"); - let n$1 = e$1, i$1 = "", s$2 = ""; - for (let r$1 = 0; r$1 < t$1.length; r$1++) if ("<" === t$1[r$1]) if ("/" === t$1[r$1 + 1]) { - const e$2 = W(t$1, ">", r$1, "Closing Tag is not closed."); - let o$1 = t$1.substring(r$1 + 2, e$2).trim(); + const B = function(t) { + t = t.replace(/\r\n?/g, "\n"); + const e = new I("!xml"); + let n = e, i = "", s = ""; + this.entityExpansionCount = 0, this.currentExpandedLength = 0; + const r = new O(this.options.processEntities); + for (let o = 0; o < t.length; o++) if ("<" === t[o]) if ("/" === t[o + 1]) { + const e = z(t, ">", o, "Closing Tag is not closed."); + let r = t.substring(o + 2, e).trim(); if (this.options.removeNSPrefix) { - const t$2 = o$1.indexOf(":"); - -1 !== t$2 && (o$1 = o$1.substr(t$2 + 1)); - } - this.options.transformTagName && (o$1 = this.options.transformTagName(o$1)), n$1 && (i$1 = this.saveTextToParentTag(i$1, n$1, s$2)); - const a$1 = s$2.substring(s$2.lastIndexOf(".") + 1); - if (o$1 && -1 !== this.options.unpairedTags.indexOf(o$1)) throw new Error(`Unpaired tag can not be used as closing tag: `); - let l$1 = 0; - a$1 && -1 !== this.options.unpairedTags.indexOf(a$1) ? (l$1 = s$2.lastIndexOf(".", s$2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l$1 = s$2.lastIndexOf("."), s$2 = s$2.substring(0, l$1), n$1 = this.tagsNodeStack.pop(), i$1 = "", r$1 = e$2; - } else if ("?" === t$1[r$1 + 1]) { - let e$2 = z(t$1, r$1, !1, "?>"); - if (!e$2) throw new Error("Pi Tag is not closed."); - if (i$1 = this.saveTextToParentTag(i$1, n$1, s$2), this.options.ignoreDeclaration && "?xml" === e$2.tagName || this.options.ignorePiTags); + const t = r.indexOf(":"); + -1 !== t && (r = r.substr(t + 1)); + } + this.options.transformTagName && (r = this.options.transformTagName(r)), n && (i = this.saveTextToParentTag(i, n, s)); + const a = s.substring(s.lastIndexOf(".") + 1); + if (r && -1 !== this.options.unpairedTags.indexOf(r)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l = 0; + a && -1 !== this.options.unpairedTags.indexOf(a) ? (l = s.lastIndexOf(".", s.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l = s.lastIndexOf("."), s = s.substring(0, l), n = this.tagsNodeStack.pop(), i = "", o = e; + } else if ("?" === t[o + 1]) { + let e = W(t, o, !1, "?>"); + if (!e) throw new Error("Pi Tag is not closed."); + if (i = this.saveTextToParentTag(i, n, s), this.options.ignoreDeclaration && "?xml" === e.tagName || this.options.ignorePiTags); else { - const t$2 = new T(e$2.tagName); - t$2.add(this.options.textNodeName, ""), e$2.tagName !== e$2.tagExp && e$2.attrExpPresent && (t$2[":@"] = this.buildAttributesMap(e$2.tagExp, s$2, e$2.tagName)), this.addChild(n$1, t$2, s$2, r$1); + const t = new I(e.tagName); + t.add(this.options.textNodeName, ""), e.tagName !== e.tagExp && e.attrExpPresent && (t[":@"] = this.buildAttributesMap(e.tagExp, s, e.tagName)), this.addChild(n, t, s, o); } - r$1 = e$2.closeIndex + 1; - } else if ("!--" === t$1.substr(r$1 + 1, 3)) { - const e$2 = W(t$1, "-->", r$1 + 4, "Comment is not closed."); + o = e.closeIndex + 1; + } else if ("!--" === t.substr(o + 1, 3)) { + const e = z(t, "-->", o + 4, "Comment is not closed."); if (this.options.commentPropName) { - const o$1 = t$1.substring(r$1 + 4, e$2 - 2); - i$1 = this.saveTextToParentTag(i$1, n$1, s$2), n$1.add(this.options.commentPropName, [{ [this.options.textNodeName]: o$1 }]); - } - r$1 = e$2; - } else if ("!D" === t$1.substr(r$1 + 1, 2)) { - const e$2 = w$1(t$1, r$1); - this.docTypeEntities = e$2.entities, r$1 = e$2.i; - } else if ("![" === t$1.substr(r$1 + 1, 2)) { - const e$2 = W(t$1, "]]>", r$1, "CDATA is not closed.") - 2, o$1 = t$1.substring(r$1 + 9, e$2); - i$1 = this.saveTextToParentTag(i$1, n$1, s$2); - let a$1 = this.parseTextData(o$1, n$1.tagname, s$2, !0, !1, !0, !0); - a$1 ??= "", this.options.cdataPropName ? n$1.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o$1 }]) : n$1.add(this.options.textNodeName, a$1), r$1 = e$2 + 2; + const r = t.substring(o + 4, e - 2); + i = this.saveTextToParentTag(i, n, s), n.add(this.options.commentPropName, [{ [this.options.textNodeName]: r }]); + } + o = e; + } else if ("!D" === t.substr(o + 1, 2)) { + const e = r.readDocType(t, o); + this.docTypeEntities = e.entities, o = e.i; + } else if ("![" === t.substr(o + 1, 2)) { + const e = z(t, "]]>", o, "CDATA is not closed.") - 2, r = t.substring(o + 9, e); + i = this.saveTextToParentTag(i, n, s); + let a = this.parseTextData(r, n.tagname, s, !0, !1, !0, !0); + a ??= "", this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r }]) : n.add(this.options.textNodeName, a), o = e + 2; } else { - let o$1 = z(t$1, r$1, this.options.removeNSPrefix), a$1 = o$1.tagName; - const l$1 = o$1.rawTagName; - let u$1 = o$1.tagExp, h$2 = o$1.attrExpPresent, d$2 = o$1.closeIndex; - this.options.transformTagName && (a$1 = this.options.transformTagName(a$1)), n$1 && i$1 && "!xml" !== n$1.tagname && (i$1 = this.saveTextToParentTag(i$1, n$1, s$2, !1)); - const f$1 = n$1; - f$1 && -1 !== this.options.unpairedTags.indexOf(f$1.tagname) && (n$1 = this.tagsNodeStack.pop(), s$2 = s$2.substring(0, s$2.lastIndexOf("."))), a$1 !== e$1.tagname && (s$2 += s$2 ? "." + a$1 : a$1); - const c$1 = r$1; - if (this.isItStopNode(this.options.stopNodes, s$2, a$1)) { - let e$2 = ""; - if (u$1.length > 0 && u$1.lastIndexOf("/") === u$1.length - 1) "/" === a$1[a$1.length - 1] ? (a$1 = a$1.substr(0, a$1.length - 1), s$2 = s$2.substr(0, s$2.length - 1), u$1 = a$1) : u$1 = u$1.substr(0, u$1.length - 1), r$1 = o$1.closeIndex; - else if (-1 !== this.options.unpairedTags.indexOf(a$1)) r$1 = o$1.closeIndex; + let r = W(t, o, this.options.removeNSPrefix), a = r.tagName; + const l = r.rawTagName; + let u = r.tagExp, h = r.attrExpPresent, d = r.closeIndex; + if (this.options.transformTagName) { + const t = this.options.transformTagName(a); + u === a && (u = t), a = t; + } + n && i && "!xml" !== n.tagname && (i = this.saveTextToParentTag(i, n, s, !1)); + const p = n; + p && -1 !== this.options.unpairedTags.indexOf(p.tagname) && (n = this.tagsNodeStack.pop(), s = s.substring(0, s.lastIndexOf("."))), a !== e.tagname && (s += s ? "." + a : a); + const f = o; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s, a)) { + let e = ""; + if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) "/" === a[a.length - 1] ? (a = a.substr(0, a.length - 1), s = s.substr(0, s.length - 1), u = a) : u = u.substr(0, u.length - 1), o = r.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a)) o = r.closeIndex; else { - const n$2 = this.readStopNodeData(t$1, l$1, d$2 + 1); - if (!n$2) throw new Error(`Unexpected end of ${l$1}`); - r$1 = n$2.i, e$2 = n$2.tagContent; + const n = this.readStopNodeData(t, l, d + 1); + if (!n) throw new Error(`Unexpected end of ${l}`); + o = n.i, e = n.tagContent; } - const i$2 = new T(a$1); - a$1 !== u$1 && h$2 && (i$2[":@"] = this.buildAttributesMap(u$1, s$2, a$1)), e$2 && (e$2 = this.parseTextData(e$2, a$1, s$2, !0, h$2, !0, !0)), s$2 = s$2.substr(0, s$2.lastIndexOf(".")), i$2.add(this.options.textNodeName, e$2), this.addChild(n$1, i$2, s$2, c$1); + const i = new I(a); + a !== u && h && (i[":@"] = this.buildAttributesMap(u, s, a)), e && (e = this.parseTextData(e, a, s, !0, h, !0, !0)), s = s.substr(0, s.lastIndexOf(".")), i.add(this.options.textNodeName, e), this.addChild(n, i, s, f); } else { - if (u$1.length > 0 && u$1.lastIndexOf("/") === u$1.length - 1) { - "/" === a$1[a$1.length - 1] ? (a$1 = a$1.substr(0, a$1.length - 1), s$2 = s$2.substr(0, s$2.length - 1), u$1 = a$1) : u$1 = u$1.substr(0, u$1.length - 1), this.options.transformTagName && (a$1 = this.options.transformTagName(a$1)); - const t$2 = new T(a$1); - a$1 !== u$1 && h$2 && (t$2[":@"] = this.buildAttributesMap(u$1, s$2, a$1)), this.addChild(n$1, t$2, s$2, c$1), s$2 = s$2.substr(0, s$2.lastIndexOf(".")); + if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) { + if ("/" === a[a.length - 1] ? (a = a.substr(0, a.length - 1), s = s.substr(0, s.length - 1), u = a) : u = u.substr(0, u.length - 1), this.options.transformTagName) { + const t = this.options.transformTagName(a); + u === a && (u = t), a = t; + } + const t = new I(a); + a !== u && h && (t[":@"] = this.buildAttributesMap(u, s, a)), this.addChild(n, t, s, f), s = s.substr(0, s.lastIndexOf(".")); } else { - const t$2 = new T(a$1); - this.tagsNodeStack.push(n$1), a$1 !== u$1 && h$2 && (t$2[":@"] = this.buildAttributesMap(u$1, s$2, a$1)), this.addChild(n$1, t$2, s$2, c$1), n$1 = t$2; + const t = new I(a); + this.tagsNodeStack.push(n), a !== u && h && (t[":@"] = this.buildAttributesMap(u, s, a)), this.addChild(n, t, s, f), n = t; } - i$1 = "", r$1 = d$2; + i = "", o = d; } } - else i$1 += t$1[r$1]; - return e$1.child; + else i += t[o]; + return e.child; }; - function Y(t$1, e$1, n$1, i$1) { - this.options.captureMetaData || (i$1 = void 0); - const s$2 = this.options.updateTag(e$1.tagname, n$1, e$1[":@"]); - !1 === s$2 || ("string" == typeof s$2 ? (e$1.tagname = s$2, t$1.addChild(e$1, i$1)) : t$1.addChild(e$1, i$1)); - } - const R = function(t$1) { - if (this.options.processEntities) { - for (let e$1 in this.docTypeEntities) { - const n$1 = this.docTypeEntities[e$1]; - t$1 = t$1.replace(n$1.regx, n$1.val); - } - for (let e$1 in this.lastEntities) { - const n$1 = this.lastEntities[e$1]; - t$1 = t$1.replace(n$1.regex, n$1.val); - } - if (this.options.htmlEntities) for (let e$1 in this.htmlEntities) { - const n$1 = this.htmlEntities[e$1]; - t$1 = t$1.replace(n$1.regex, n$1.val); - } - t$1 = t$1.replace(this.ampEntity.regex, this.ampEntity.val); - } - return t$1; + function R(t, e, n, i) { + this.options.captureMetaData || (i = void 0); + const s = this.options.updateTag(e.tagname, n, e[":@"]); + !1 === s || ("string" == typeof s ? (e.tagname = s, t.addChild(e, i)) : t.addChild(e, i)); + } + const Y = function(t, e, n) { + if (-1 === t.indexOf("&")) return t; + const i = this.options.processEntities; + if (!i.enabled) return t; + if (i.allowedTags && !i.allowedTags.includes(e)) return t; + if (i.tagFilter && !i.tagFilter(e, n)) return t; + for (let e in this.docTypeEntities) { + const n = this.docTypeEntities[e], s = t.match(n.regx); + if (s) { + if (this.entityExpansionCount += s.length, i.maxTotalExpansions && this.entityExpansionCount > i.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${i.maxTotalExpansions}`); + const e = t.length; + if (t = t.replace(n.regx, n.val), i.maxExpandedLength && (this.currentExpandedLength += t.length - e, this.currentExpandedLength > i.maxExpandedLength)) throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${i.maxExpandedLength}`); + } + } + if (-1 === t.indexOf("&")) return t; + for (let e in this.lastEntities) { + const n = this.lastEntities[e]; + t = t.replace(n.regex, n.val); + } + if (-1 === t.indexOf("&")) return t; + if (this.options.htmlEntities) for (let e in this.htmlEntities) { + const n = this.htmlEntities[e]; + t = t.replace(n.regex, n.val); + } + return t.replace(this.ampEntity.regex, this.ampEntity.val); }; - function q(t$1, e$1, n$1, i$1) { - return t$1 && (void 0 === i$1 && (i$1 = 0 === e$1.child.length), void 0 !== (t$1 = this.parseTextData(t$1, e$1.tagname, n$1, !1, !!e$1[":@"] && 0 !== Object.keys(e$1[":@"]).length, i$1)) && "" !== t$1 && e$1.add(this.options.textNodeName, t$1), t$1 = ""), t$1; - } - function Z(t$1, e$1, n$1) { - const i$1 = "*." + n$1; - for (const n$2 in t$1) { - const s$2 = t$1[n$2]; - if (i$1 === s$2 || e$1 === s$2) return !0; - } - return !1; - } - function W(t$1, e$1, n$1, i$1) { - const s$2 = t$1.indexOf(e$1, n$1); - if (-1 === s$2) throw new Error(i$1); - return s$2 + e$1.length - 1; - } - function z(t$1, e$1, n$1, i$1 = ">") { - const s$2 = function(t$2, e$2, n$2 = ">") { - let i$2, s$3 = ""; - for (let r$2 = e$2; r$2 < t$2.length; r$2++) { - let e$3 = t$2[r$2]; - if (i$2) e$3 === i$2 && (i$2 = ""); - else if ("\"" === e$3 || "'" === e$3) i$2 = e$3; - else if (e$3 === n$2[0]) { - if (!n$2[1]) return { - data: s$3, - index: r$2 + function G(t, e, n, i) { + return t && (void 0 === i && (i = 0 === e.child.length), void 0 !== (t = this.parseTextData(t, e.tagname, n, !1, !!e[":@"] && 0 !== Object.keys(e[":@"]).length, i)) && "" !== t && e.add(this.options.textNodeName, t), t = ""), t; + } + function X(t, e, n, i) { + return !(!e || !e.has(i)) || !(!t || !t.has(n)); + } + function z(t, e, n, i) { + const s = t.indexOf(e, n); + if (-1 === s) throw new Error(i); + return s + e.length - 1; + } + function W(t, e, n, i = ">") { + const s = function(t, e, n = ">") { + let i, s = ""; + for (let r = e; r < t.length; r++) { + let e = t[r]; + if (i) e === i && (i = ""); + else if ("\"" === e || "'" === e) i = e; + else if (e === n[0]) { + if (!n[1]) return { + data: s, + index: r }; - if (t$2[r$2 + 1] === n$2[1]) return { - data: s$3, - index: r$2 + if (t[r + 1] === n[1]) return { + data: s, + index: r }; - } else " " === e$3 && (e$3 = " "); - s$3 += e$3; - } - }(t$1, e$1 + 1, i$1); - if (!s$2) return; - let r$1 = s$2.data; - const o$1 = s$2.index, a$1 = r$1.search(/\s/); - let l$1 = r$1, u$1 = !0; - -1 !== a$1 && (l$1 = r$1.substring(0, a$1), r$1 = r$1.substring(a$1 + 1).trimStart()); - const h$2 = l$1; - if (n$1) { - const t$2 = l$1.indexOf(":"); - -1 !== t$2 && (l$1 = l$1.substr(t$2 + 1), u$1 = l$1 !== s$2.data.substr(t$2 + 1)); + } else " " === e && (e = " "); + s += e; + } + }(t, e + 1, i); + if (!s) return; + let r = s.data; + const o = s.index, a = r.search(/\s/); + let l = r, u = !0; + -1 !== a && (l = r.substring(0, a), r = r.substring(a + 1).trimStart()); + const h = l; + if (n) { + const t = l.indexOf(":"); + -1 !== t && (l = l.substr(t + 1), u = l !== s.data.substr(t + 1)); } return { - tagName: l$1, - tagExp: r$1, - closeIndex: o$1, - attrExpPresent: u$1, - rawTagName: h$2 + tagName: l, + tagExp: r, + closeIndex: o, + attrExpPresent: u, + rawTagName: h }; } - function J(t$1, e$1, n$1) { - const i$1 = n$1; - let s$2 = 1; - for (; n$1 < t$1.length; n$1++) if ("<" === t$1[n$1]) if ("/" === t$1[n$1 + 1]) { - const r$1 = W(t$1, ">", n$1, `${e$1} is not closed`); - if (t$1.substring(n$1 + 2, r$1).trim() === e$1 && (s$2--, 0 === s$2)) return { - tagContent: t$1.substring(i$1, n$1), - i: r$1 + function q(t, e, n) { + const i = n; + let s = 1; + for (; n < t.length; n++) if ("<" === t[n]) if ("/" === t[n + 1]) { + const r = z(t, ">", n, `${e} is not closed`); + if (t.substring(n + 2, r).trim() === e && (s--, 0 === s)) return { + tagContent: t.substring(i, n), + i: r }; - n$1 = r$1; - } else if ("?" === t$1[n$1 + 1]) n$1 = W(t$1, "?>", n$1 + 1, "StopNode is not closed."); - else if ("!--" === t$1.substr(n$1 + 1, 3)) n$1 = W(t$1, "-->", n$1 + 3, "StopNode is not closed."); - else if ("![" === t$1.substr(n$1 + 1, 2)) n$1 = W(t$1, "]]>", n$1, "StopNode is not closed.") - 2; + n = r; + } else if ("?" === t[n + 1]) n = z(t, "?>", n + 1, "StopNode is not closed."); + else if ("!--" === t.substr(n + 1, 3)) n = z(t, "-->", n + 3, "StopNode is not closed."); + else if ("![" === t.substr(n + 1, 2)) n = z(t, "]]>", n, "StopNode is not closed.") - 2; else { - const i$2 = z(t$1, n$1, ">"); - i$2 && ((i$2 && i$2.tagName) === e$1 && "/" !== i$2.tagExp[i$2.tagExp.length - 1] && s$2++, n$1 = i$2.closeIndex); - } - } - function H(t$1, e$1, n$1) { - if (e$1 && "string" == typeof t$1) { - const e$2 = t$1.trim(); - return "true" === e$2 || "false" !== e$2 && function(t$2, e$3 = {}) { - if (e$3 = Object.assign({}, V, e$3), !t$2 || "string" != typeof t$2) return t$2; - let n$2 = t$2.trim(); - if (void 0 !== e$3.skipLike && e$3.skipLike.test(n$2)) return t$2; - if ("0" === t$2) return 0; - if (e$3.hex && j.test(n$2)) return function(t$3) { - if (parseInt) return parseInt(t$3, 16); - if (Number.parseInt) return Number.parseInt(t$3, 16); - if (window && window.parseInt) return window.parseInt(t$3, 16); + const i = W(t, n, ">"); + i && ((i && i.tagName) === e && "/" !== i.tagExp[i.tagExp.length - 1] && s++, n = i.closeIndex); + } + } + function Z(t, e, n) { + if (e && "string" == typeof t) { + const e = t.trim(); + return "true" === e || "false" !== e && function(t, e = {}) { + if (e = Object.assign({}, V, e), !t || "string" != typeof t) return t; + let n = t.trim(); + if (void 0 !== e.skipLike && e.skipLike.test(n)) return t; + if ("0" === t) return 0; + if (e.hex && C.test(n)) return function(t) { + if (parseInt) return parseInt(t, 16); + if (Number.parseInt) return Number.parseInt(t, 16); + if (window && window.parseInt) return window.parseInt(t, 16); throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); - }(n$2); - if (-1 !== n$2.search(/.+[eE].+/)) return function(t$3, e$4, n$3) { - if (!n$3.eNotation) return t$3; - const i$2 = e$4.match(M); - if (i$2) { - let s$2 = i$2[1] || ""; - const r$1 = -1 === i$2[3].indexOf("e") ? "E" : "e", o$1 = i$2[2], a$1 = s$2 ? t$3[o$1.length + 1] === r$1 : t$3[o$1.length] === r$1; - return o$1.length > 1 && a$1 ? t$3 : 1 !== o$1.length || !i$2[3].startsWith(`.${r$1}`) && i$2[3][0] !== r$1 ? n$3.leadingZeros && !a$1 ? (e$4 = (i$2[1] || "") + i$2[3], Number(e$4)) : t$3 : Number(e$4); + }(n); + if (-1 !== n.search(/.+[eE].+/)) return function(t, e, n) { + if (!n.eNotation) return t; + const i = e.match(D); + if (i) { + let s = i[1] || ""; + const r = -1 === i[3].indexOf("e") ? "E" : "e", o = i[2], a = s ? t[o.length + 1] === r : t[o.length] === r; + return o.length > 1 && a ? t : 1 !== o.length || !i[3].startsWith(`.${r}`) && i[3][0] !== r ? n.leadingZeros && !a ? (e = (i[1] || "") + i[3], Number(e)) : t : Number(e); } - return t$3; - }(t$2, n$2, e$3); + return t; + }(t, n, e); { - const s$2 = D.exec(n$2); - if (s$2) { - const r$1 = s$2[1] || "", o$1 = s$2[2]; - let a$1 = (i$1 = s$2[3]) && -1 !== i$1.indexOf(".") ? ("." === (i$1 = i$1.replace(/0+$/, "")) ? i$1 = "0" : "." === i$1[0] ? i$1 = "0" + i$1 : "." === i$1[i$1.length - 1] && (i$1 = i$1.substring(0, i$1.length - 1)), i$1) : i$1; - const l$1 = r$1 ? "." === t$2[o$1.length + 1] : "." === t$2[o$1.length]; - if (!e$3.leadingZeros && (o$1.length > 1 || 1 === o$1.length && !l$1)) return t$2; + const s = $.exec(n); + if (s) { + const r = s[1] || "", o = s[2]; + let a = (i = s[3]) && -1 !== i.indexOf(".") ? ("." === (i = i.replace(/0+$/, "")) ? i = "0" : "." === i[0] ? i = "0" + i : "." === i[i.length - 1] && (i = i.substring(0, i.length - 1)), i) : i; + const l = r ? "." === t[o.length + 1] : "." === t[o.length]; + if (!e.leadingZeros && (o.length > 1 || 1 === o.length && !l)) return t; { - const i$2 = Number(n$2), s$3 = String(i$2); - if (0 === i$2 || -0 === i$2) return i$2; - if (-1 !== s$3.search(/[eE]/)) return e$3.eNotation ? i$2 : t$2; - if (-1 !== n$2.indexOf(".")) return "0" === s$3 || s$3 === a$1 || s$3 === `${r$1}${a$1}` ? i$2 : t$2; - let l$2 = o$1 ? a$1 : n$2; - return o$1 ? l$2 === s$3 || r$1 + l$2 === s$3 ? i$2 : t$2 : l$2 === s$3 || l$2 === r$1 + s$3 ? i$2 : t$2; + const i = Number(n), s = String(i); + if (0 === i || -0 === i) return i; + if (-1 !== s.search(/[eE]/)) return e.eNotation ? i : t; + if (-1 !== n.indexOf(".")) return "0" === s || s === a || s === `${r}${a}` ? i : t; + let l = o ? a : n; + return o ? l === s || r + l === s ? i : t : l === s || l === r + s ? i : t; } } - return t$2; + return t; } - var i$1; - }(t$1, n$1); - } - return void 0 !== t$1 ? t$1 : ""; - } - const K = T.getMetaDataSymbol(); - function Q(t$1, e$1) { - return tt(t$1, e$1); - } - function tt(t$1, e$1, n$1) { - let i$1; - const s$2 = {}; - for (let r$1 = 0; r$1 < t$1.length; r$1++) { - const o$1 = t$1[r$1], a$1 = et(o$1); - let l$1 = ""; - if (l$1 = void 0 === n$1 ? a$1 : n$1 + "." + a$1, a$1 === e$1.textNodeName) void 0 === i$1 ? i$1 = o$1[a$1] : i$1 += "" + o$1[a$1]; + var i; + }(t, n); + } + return void 0 !== t ? t : ""; + } + function K(t, e, n) { + const i = Number.parseInt(t, e); + return i >= 0 && i <= 1114111 ? String.fromCodePoint(i) : n + t + ";"; + } + const Q = I.getMetaDataSymbol(); + function J(t, e) { + return H(t, e); + } + function H(t, e, n) { + let i; + const s = {}; + for (let r = 0; r < t.length; r++) { + const o = t[r], a = tt(o); + let l = ""; + if (l = void 0 === n ? a : n + "." + a, a === e.textNodeName) void 0 === i ? i = o[a] : i += "" + o[a]; else { - if (void 0 === a$1) continue; - if (o$1[a$1]) { - let t$2 = tt(o$1[a$1], e$1, l$1); - const n$2 = it(t$2, e$1); - void 0 !== o$1[K] && (t$2[K] = o$1[K]), o$1[":@"] ? nt(t$2, o$1[":@"], l$1, e$1) : 1 !== Object.keys(t$2).length || void 0 === t$2[e$1.textNodeName] || e$1.alwaysCreateTextNode ? 0 === Object.keys(t$2).length && (e$1.alwaysCreateTextNode ? t$2[e$1.textNodeName] = "" : t$2 = "") : t$2 = t$2[e$1.textNodeName], void 0 !== s$2[a$1] && s$2.hasOwnProperty(a$1) ? (Array.isArray(s$2[a$1]) || (s$2[a$1] = [s$2[a$1]]), s$2[a$1].push(t$2)) : e$1.isArray(a$1, l$1, n$2) ? s$2[a$1] = [t$2] : s$2[a$1] = t$2; + if (void 0 === a) continue; + if (o[a]) { + let t = H(o[a], e, l); + const n = nt(t, e); + void 0 !== o[Q] && (t[Q] = o[Q]), o[":@"] ? et(t, o[":@"], l, e) : 1 !== Object.keys(t).length || void 0 === t[e.textNodeName] || e.alwaysCreateTextNode ? 0 === Object.keys(t).length && (e.alwaysCreateTextNode ? t[e.textNodeName] = "" : t = "") : t = t[e.textNodeName], void 0 !== s[a] && s.hasOwnProperty(a) ? (Array.isArray(s[a]) || (s[a] = [s[a]]), s[a].push(t)) : e.isArray(a, l, n) ? s[a] = [t] : s[a] = t; } } } - return "string" == typeof i$1 ? i$1.length > 0 && (s$2[e$1.textNodeName] = i$1) : void 0 !== i$1 && (s$2[e$1.textNodeName] = i$1), s$2; + return "string" == typeof i ? i.length > 0 && (s[e.textNodeName] = i) : void 0 !== i && (s[e.textNodeName] = i), s; } - function et(t$1) { - const e$1 = Object.keys(t$1); - for (let t$2 = 0; t$2 < e$1.length; t$2++) { - const n$1 = e$1[t$2]; - if (":@" !== n$1) return n$1; + function tt(t) { + const e = Object.keys(t); + for (let t = 0; t < e.length; t++) { + const n = e[t]; + if (":@" !== n) return n; } } - function nt(t$1, e$1, n$1, i$1) { - if (e$1) { - const s$2 = Object.keys(e$1), r$1 = s$2.length; - for (let o$1 = 0; o$1 < r$1; o$1++) { - const r$2 = s$2[o$1]; - i$1.isArray(r$2, n$1 + "." + r$2, !0, !0) ? t$1[r$2] = [e$1[r$2]] : t$1[r$2] = e$1[r$2]; + function et(t, e, n, i) { + if (e) { + const s = Object.keys(e), r = s.length; + for (let o = 0; o < r; o++) { + const r = s[o]; + i.isArray(r, n + "." + r, !0, !0) ? t[r] = [e[r]] : t[r] = e[r]; } } } - function it(t$1, e$1) { - const { textNodeName: n$1 } = e$1, i$1 = Object.keys(t$1).length; - return 0 === i$1 || !(1 !== i$1 || !t$1[n$1] && "boolean" != typeof t$1[n$1] && 0 !== t$1[n$1]); + function nt(t, e) { + const { textNodeName: n } = e, i = Object.keys(t).length; + return 0 === i || !(1 !== i || !t[n] && "boolean" != typeof t[n] && 0 !== t[n]); } - class st { - constructor(t$1) { - this.externalEntities = {}, this.options = function(t$2) { - return Object.assign({}, v, t$2); - }(t$1); + class it { + constructor(t) { + this.externalEntities = {}, this.options = w(t); } - parse(t$1, e$1) { - if ("string" == typeof t$1); - else { - if (!t$1.toString) throw new Error("XML data is accepted in String or Bytes[] form."); - t$1 = t$1.toString(); - } - if (e$1) { - !0 === e$1 && (e$1 = {}); - const n$2 = a(t$1, e$1); - if (!0 !== n$2) throw Error(`${n$2.err.msg}:${n$2.err.line}:${n$2.err.col}`); + parse(t, e) { + if ("string" != typeof t && t.toString) t = t.toString(); + else if ("string" != typeof t) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e) { + !0 === e && (e = {}); + const n = a(t, e); + if (!0 !== n) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`); } - const n$1 = new k(this.options); - n$1.addExternalEntities(this.externalEntities); - const i$1 = n$1.parseXml(t$1); - return this.options.preserveOrder || void 0 === i$1 ? i$1 : Q(i$1, this.options); + const n = new F(this.options); + n.addExternalEntities(this.externalEntities); + const i = n.parseXml(t); + return this.options.preserveOrder || void 0 === i ? i : J(i, this.options); } - addEntity(t$1, e$1) { - if (-1 !== e$1.indexOf("&")) throw new Error("Entity value can't have '&'"); - if (-1 !== t$1.indexOf("&") || -1 !== t$1.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - if ("&" === e$1) throw new Error("An entity with value '&' is not permitted"); - this.externalEntities[t$1] = e$1; + addEntity(t, e) { + if (-1 !== e.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t.indexOf("&") || -1 !== t.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t] = e; } static getMetaDataSymbol() { - return T.getMetaDataSymbol(); - } - } - function rt(t$1, e$1) { - let n$1 = ""; - return e$1.format && e$1.indentBy.length > 0 && (n$1 = "\n"), ot(t$1, e$1, "", n$1); - } - function ot(t$1, e$1, n$1, i$1) { - let s$2 = "", r$1 = !1; - for (let o$1 = 0; o$1 < t$1.length; o$1++) { - const a$1 = t$1[o$1], l$1 = at(a$1); - if (void 0 === l$1) continue; - let u$1 = ""; - if (u$1 = 0 === n$1.length ? l$1 : `${n$1}.${l$1}`, l$1 === e$1.textNodeName) { - let t$2 = a$1[l$1]; - ut(u$1, e$1) || (t$2 = e$1.tagValueProcessor(l$1, t$2), t$2 = ht(t$2, e$1)), r$1 && (s$2 += i$1), s$2 += t$2, r$1 = !1; + return I.getMetaDataSymbol(); + } + } + function st(t, e) { + let n = ""; + return e.format && e.indentBy.length > 0 && (n = "\n"), rt(t, e, "", n); + } + function rt(t, e, n, i) { + let s = "", r = !1; + for (let o = 0; o < t.length; o++) { + const a = t[o], l = ot(a); + if (void 0 === l) continue; + let u = ""; + if (u = 0 === n.length ? l : `${n}.${l}`, l === e.textNodeName) { + let t = a[l]; + lt(u, e) || (t = e.tagValueProcessor(l, t), t = ut(t, e)), r && (s += i), s += t, r = !1; continue; } - if (l$1 === e$1.cdataPropName) { - r$1 && (s$2 += i$1), s$2 += ``, r$1 = !1; + if (l === e.cdataPropName) { + r && (s += i), s += ``, r = !1; continue; } - if (l$1 === e$1.commentPropName) { - s$2 += i$1 + `\x3c!--${a$1[l$1][0][e$1.textNodeName]}--\x3e`, r$1 = !0; + if (l === e.commentPropName) { + s += i + `\x3c!--${a[l][0][e.textNodeName]}--\x3e`, r = !0; continue; } - if ("?" === l$1[0]) { - const t$2 = lt(a$1[":@"], e$1), n$2 = "?xml" === l$1 ? "" : i$1; - let o$2 = a$1[l$1][0][e$1.textNodeName]; - o$2 = 0 !== o$2.length ? " " + o$2 : "", s$2 += n$2 + `<${l$1}${o$2}${t$2}?>`, r$1 = !0; + if ("?" === l[0]) { + const t = at(a[":@"], e), n = "?xml" === l ? "" : i; + let o = a[l][0][e.textNodeName]; + o = 0 !== o.length ? " " + o : "", s += n + `<${l}${o}${t}?>`, r = !0; continue; } - let h$2 = i$1; - "" !== h$2 && (h$2 += e$1.indentBy); - const d$2 = i$1 + `<${l$1}${lt(a$1[":@"], e$1)}`, f$1 = ot(a$1[l$1], e$1, u$1, h$2); - -1 !== e$1.unpairedTags.indexOf(l$1) ? e$1.suppressUnpairedNode ? s$2 += d$2 + ">" : s$2 += d$2 + "/>" : f$1 && 0 !== f$1.length || !e$1.suppressEmptyNode ? f$1 && f$1.endsWith(">") ? s$2 += d$2 + `>${f$1}${i$1}` : (s$2 += d$2 + ">", f$1 && "" !== i$1 && (f$1.includes("/>") || f$1.includes("`) : s$2 += d$2 + "/>", r$1 = !0; + let h = i; + "" !== h && (h += e.indentBy); + const d = i + `<${l}${at(a[":@"], e)}`, p = rt(a[l], e, u, h); + -1 !== e.unpairedTags.indexOf(l) ? e.suppressUnpairedNode ? s += d + ">" : s += d + "/>" : p && 0 !== p.length || !e.suppressEmptyNode ? p && p.endsWith(">") ? s += d + `>${p}${i}` : (s += d + ">", p && "" !== i && (p.includes("/>") || p.includes("`) : s += d + "/>", r = !0; } - return s$2; + return s; } - function at(t$1) { - const e$1 = Object.keys(t$1); - for (let n$1 = 0; n$1 < e$1.length; n$1++) { - const i$1 = e$1[n$1]; - if (t$1.hasOwnProperty(i$1) && ":@" !== i$1) return i$1; + function ot(t) { + const e = Object.keys(t); + for (let n = 0; n < e.length; n++) { + const i = e[n]; + if (t.hasOwnProperty(i) && ":@" !== i) return i; } } - function lt(t$1, e$1) { - let n$1 = ""; - if (t$1 && !e$1.ignoreAttributes) for (let i$1 in t$1) { - if (!t$1.hasOwnProperty(i$1)) continue; - let s$2 = e$1.attributeValueProcessor(i$1, t$1[i$1]); - s$2 = ht(s$2, e$1), !0 === s$2 && e$1.suppressBooleanAttributes ? n$1 += ` ${i$1.substr(e$1.attributeNamePrefix.length)}` : n$1 += ` ${i$1.substr(e$1.attributeNamePrefix.length)}="${s$2}"`; + function at(t, e) { + let n = ""; + if (t && !e.ignoreAttributes) for (let i in t) { + if (!t.hasOwnProperty(i)) continue; + let s = e.attributeValueProcessor(i, t[i]); + s = ut(s, e), !0 === s && e.suppressBooleanAttributes ? n += ` ${i.substr(e.attributeNamePrefix.length)}` : n += ` ${i.substr(e.attributeNamePrefix.length)}="${s}"`; } - return n$1; + return n; } - function ut(t$1, e$1) { - let n$1 = (t$1 = t$1.substr(0, t$1.length - e$1.textNodeName.length - 1)).substr(t$1.lastIndexOf(".") + 1); - for (let i$1 in e$1.stopNodes) if (e$1.stopNodes[i$1] === t$1 || e$1.stopNodes[i$1] === "*." + n$1) return !0; + function lt(t, e) { + let n = (t = t.substr(0, t.length - e.textNodeName.length - 1)).substr(t.lastIndexOf(".") + 1); + for (let i in e.stopNodes) if (e.stopNodes[i] === t || e.stopNodes[i] === "*." + n) return !0; return !1; } - function ht(t$1, e$1) { - if (t$1 && t$1.length > 0 && e$1.processEntities) for (let n$1 = 0; n$1 < e$1.entities.length; n$1++) { - const i$1 = e$1.entities[n$1]; - t$1 = t$1.replace(i$1.regex, i$1.val); + function ut(t, e) { + if (t && t.length > 0 && e.processEntities) for (let n = 0; n < e.entities.length; n++) { + const i = e.entities[n]; + t = t.replace(i.regex, i.val); } - return t$1; + return t; } - const dt = { + const ht = { attributeNamePrefix: "@_", attributesGroupName: !1, textNodeName: "#text", @@ -12823,34 +13154,34 @@ var require_fxp = __commonJS({ "node_modules/.deno/fast-xml-parser@5.2.3/node_mo suppressEmptyNode: !1, suppressUnpairedNode: !0, suppressBooleanAttributes: !0, - tagValueProcessor: function(t$1, e$1) { - return e$1; + tagValueProcessor: function(t, e) { + return e; }, - attributeValueProcessor: function(t$1, e$1) { - return e$1; + attributeValueProcessor: function(t, e) { + return e; }, preserveOrder: !1, commentPropName: !1, unpairedTags: [], entities: [ { - regex: new RegExp("&", "g"), + regex: /* @__PURE__ */ new RegExp("&", "g"), val: "&" }, { - regex: new RegExp(">", "g"), + regex: /* @__PURE__ */ new RegExp(">", "g"), val: ">" }, { - regex: new RegExp("<", "g"), + regex: /* @__PURE__ */ new RegExp("<", "g"), val: "<" }, { - regex: new RegExp("'", "g"), + regex: /* @__PURE__ */ new RegExp("'", "g"), val: "'" }, { - regex: new RegExp("\"", "g"), + regex: /* @__PURE__ */ new RegExp("\"", "g"), val: """ } ], @@ -12858,97 +13189,97 @@ var require_fxp = __commonJS({ "node_modules/.deno/fast-xml-parser@5.2.3/node_mo stopNodes: [], oneListGroup: !1 }; - function ft(t$1) { - this.options = Object.assign({}, dt, t$1), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + function dt(t) { + this.options = Object.assign({}, ht, t), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { return !1; - } : (this.ignoreAttributesFn = _(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = gt), this.processTextOrObjNode = ct, this.options.format ? (this.indentate = pt, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + } : (this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ct), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ft, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { return ""; }, this.tagEndChar = ">", this.newLine = ""); } - function ct(t$1, e$1, n$1, i$1) { - const s$2 = this.j2x(t$1, n$1 + 1, i$1.concat(e$1)); - return void 0 !== t$1[this.options.textNodeName] && 1 === Object.keys(t$1).length ? this.buildTextValNode(t$1[this.options.textNodeName], e$1, s$2.attrStr, n$1) : this.buildObjectNode(s$2.val, e$1, s$2.attrStr, n$1); - } - function pt(t$1) { - return this.options.indentBy.repeat(t$1); - } - function gt(t$1) { - return !(!t$1.startsWith(this.options.attributeNamePrefix) || t$1 === this.options.textNodeName) && t$1.substr(this.attrPrefixLen); - } - ft.prototype.build = function(t$1) { - return this.options.preserveOrder ? rt(t$1, this.options) : (Array.isArray(t$1) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t$1 = { [this.options.arrayNodeName]: t$1 }), this.j2x(t$1, 0, []).val); - }, ft.prototype.j2x = function(t$1, e$1, n$1) { - let i$1 = "", s$2 = ""; - const r$1 = n$1.join("."); - for (let o$1 in t$1) if (Object.prototype.hasOwnProperty.call(t$1, o$1)) if (void 0 === t$1[o$1]) this.isAttribute(o$1) && (s$2 += ""); - else if (null === t$1[o$1]) this.isAttribute(o$1) || o$1 === this.options.cdataPropName ? s$2 += "" : "?" === o$1[0] ? s$2 += this.indentate(e$1) + "<" + o$1 + "?" + this.tagEndChar : s$2 += this.indentate(e$1) + "<" + o$1 + "/" + this.tagEndChar; - else if (t$1[o$1] instanceof Date) s$2 += this.buildTextValNode(t$1[o$1], o$1, "", e$1); - else if ("object" != typeof t$1[o$1]) { - const n$2 = this.isAttribute(o$1); - if (n$2 && !this.ignoreAttributesFn(n$2, r$1)) i$1 += this.buildAttrPairStr(n$2, "" + t$1[o$1]); - else if (!n$2) if (o$1 === this.options.textNodeName) { - let e$2 = this.options.tagValueProcessor(o$1, "" + t$1[o$1]); - s$2 += this.replaceEntitiesValue(e$2); - } else s$2 += this.buildTextValNode(t$1[o$1], o$1, "", e$1); - } else if (Array.isArray(t$1[o$1])) { - const i$2 = t$1[o$1].length; - let r$2 = "", a$1 = ""; - for (let l$1 = 0; l$1 < i$2; l$1++) { - const i$3 = t$1[o$1][l$1]; - if (void 0 === i$3); - else if (null === i$3) "?" === o$1[0] ? s$2 += this.indentate(e$1) + "<" + o$1 + "?" + this.tagEndChar : s$2 += this.indentate(e$1) + "<" + o$1 + "/" + this.tagEndChar; - else if ("object" == typeof i$3) if (this.options.oneListGroup) { - const t$2 = this.j2x(i$3, e$1 + 1, n$1.concat(o$1)); - r$2 += t$2.val, this.options.attributesGroupName && i$3.hasOwnProperty(this.options.attributesGroupName) && (a$1 += t$2.attrStr); - } else r$2 += this.processTextOrObjNode(i$3, o$1, e$1, n$1); + function pt(t, e, n, i) { + const s = this.j2x(t, n + 1, i.concat(e)); + return void 0 !== t[this.options.textNodeName] && 1 === Object.keys(t).length ? this.buildTextValNode(t[this.options.textNodeName], e, s.attrStr, n) : this.buildObjectNode(s.val, e, s.attrStr, n); + } + function ft(t) { + return this.options.indentBy.repeat(t); + } + function ct(t) { + return !(!t.startsWith(this.options.attributeNamePrefix) || t === this.options.textNodeName) && t.substr(this.attrPrefixLen); + } + dt.prototype.build = function(t) { + return this.options.preserveOrder ? st(t, this.options) : (Array.isArray(t) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t = { [this.options.arrayNodeName]: t }), this.j2x(t, 0, []).val); + }, dt.prototype.j2x = function(t, e, n) { + let i = "", s = ""; + const r = n.join("."); + for (let o in t) if (Object.prototype.hasOwnProperty.call(t, o)) if (void 0 === t[o]) this.isAttribute(o) && (s += ""); + else if (null === t[o]) this.isAttribute(o) || o === this.options.cdataPropName ? s += "" : "?" === o[0] ? s += this.indentate(e) + "<" + o + "?" + this.tagEndChar : s += this.indentate(e) + "<" + o + "/" + this.tagEndChar; + else if (t[o] instanceof Date) s += this.buildTextValNode(t[o], o, "", e); + else if ("object" != typeof t[o]) { + const n = this.isAttribute(o); + if (n && !this.ignoreAttributesFn(n, r)) i += this.buildAttrPairStr(n, "" + t[o]); + else if (!n) if (o === this.options.textNodeName) { + let e = this.options.tagValueProcessor(o, "" + t[o]); + s += this.replaceEntitiesValue(e); + } else s += this.buildTextValNode(t[o], o, "", e); + } else if (Array.isArray(t[o])) { + const i = t[o].length; + let r = "", a = ""; + for (let l = 0; l < i; l++) { + const i = t[o][l]; + if (void 0 === i); + else if (null === i) "?" === o[0] ? s += this.indentate(e) + "<" + o + "?" + this.tagEndChar : s += this.indentate(e) + "<" + o + "/" + this.tagEndChar; + else if ("object" == typeof i) if (this.options.oneListGroup) { + const t = this.j2x(i, e + 1, n.concat(o)); + r += t.val, this.options.attributesGroupName && i.hasOwnProperty(this.options.attributesGroupName) && (a += t.attrStr); + } else r += this.processTextOrObjNode(i, o, e, n); else if (this.options.oneListGroup) { - let t$2 = this.options.tagValueProcessor(o$1, i$3); - t$2 = this.replaceEntitiesValue(t$2), r$2 += t$2; - } else r$2 += this.buildTextValNode(i$3, o$1, "", e$1); - } - this.options.oneListGroup && (r$2 = this.buildObjectNode(r$2, o$1, a$1, e$1)), s$2 += r$2; - } else if (this.options.attributesGroupName && o$1 === this.options.attributesGroupName) { - const e$2 = Object.keys(t$1[o$1]), n$2 = e$2.length; - for (let s$3 = 0; s$3 < n$2; s$3++) i$1 += this.buildAttrPairStr(e$2[s$3], "" + t$1[o$1][e$2[s$3]]); - } else s$2 += this.processTextOrObjNode(t$1[o$1], o$1, e$1, n$1); + let t = this.options.tagValueProcessor(o, i); + t = this.replaceEntitiesValue(t), r += t; + } else r += this.buildTextValNode(i, o, "", e); + } + this.options.oneListGroup && (r = this.buildObjectNode(r, o, a, e)), s += r; + } else if (this.options.attributesGroupName && o === this.options.attributesGroupName) { + const e = Object.keys(t[o]), n = e.length; + for (let s = 0; s < n; s++) i += this.buildAttrPairStr(e[s], "" + t[o][e[s]]); + } else s += this.processTextOrObjNode(t[o], o, e, n); return { - attrStr: i$1, - val: s$2 + attrStr: i, + val: s }; - }, ft.prototype.buildAttrPairStr = function(t$1, e$1) { - return e$1 = this.options.attributeValueProcessor(t$1, "" + e$1), e$1 = this.replaceEntitiesValue(e$1), this.options.suppressBooleanAttributes && "true" === e$1 ? " " + t$1 : " " + t$1 + "=\"" + e$1 + "\""; - }, ft.prototype.buildObjectNode = function(t$1, e$1, n$1, i$1) { - if ("" === t$1) return "?" === e$1[0] ? this.indentate(i$1) + "<" + e$1 + n$1 + "?" + this.tagEndChar : this.indentate(i$1) + "<" + e$1 + n$1 + this.closeTag(e$1) + this.tagEndChar; + }, dt.prototype.buildAttrPairStr = function(t, e) { + return e = this.options.attributeValueProcessor(t, "" + e), e = this.replaceEntitiesValue(e), this.options.suppressBooleanAttributes && "true" === e ? " " + t : " " + t + "=\"" + e + "\""; + }, dt.prototype.buildObjectNode = function(t, e, n, i) { + if ("" === t) return "?" === e[0] ? this.indentate(i) + "<" + e + n + "?" + this.tagEndChar : this.indentate(i) + "<" + e + n + this.closeTag(e) + this.tagEndChar; { - let s$2 = "" + t$1 + s$2; - } - }, ft.prototype.closeTag = function(t$1) { - let e$1 = ""; - return -1 !== this.options.unpairedTags.indexOf(t$1) ? this.options.suppressUnpairedNode || (e$1 = "/") : e$1 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; - if (!1 !== this.options.commentPropName && e$1 === this.options.commentPropName) return this.indentate(i$1) + `\x3c!--${t$1}--\x3e` + this.newLine; - if ("?" === e$1[0]) return this.indentate(i$1) + "<" + e$1 + n$1 + "?" + this.tagEndChar; + let s = "" + t + s; + } + }, dt.prototype.closeTag = function(t) { + let e = ""; + return -1 !== this.options.unpairedTags.indexOf(t) ? this.options.suppressUnpairedNode || (e = "/") : e = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (!1 !== this.options.commentPropName && e === this.options.commentPropName) return this.indentate(i) + `\x3c!--${t}--\x3e` + this.newLine; + if ("?" === e[0]) return this.indentate(i) + "<" + e + n + "?" + this.tagEndChar; { - let s$2 = this.options.tagValueProcessor(e$1, t$1); - return s$2 = this.replaceEntitiesValue(s$2), "" === s$2 ? this.indentate(i$1) + "<" + e$1 + n$1 + this.closeTag(e$1) + this.tagEndChar : this.indentate(i$1) + "<" + e$1 + n$1 + ">" + s$2 + "" + s + " 0 && this.options.processEntities) for (let e$1 = 0; e$1 < this.options.entities.length; e$1++) { - const n$1 = this.options.entities[e$1]; - t$1 = t$1.replace(n$1.regex, n$1.val); + }, dt.prototype.replaceEntitiesValue = function(t) { + if (t && t.length > 0 && this.options.processEntities) for (let e = 0; e < this.options.entities.length; e++) { + const n = this.options.entities[e]; + t = t.replace(n.regex, n.val); } - return t$1; + return t; }; - const mt = { validate: a }; + const gt = { validate: a }; module.exports = e; })(); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.common.js -var require_xml_common = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.common.js"(exports) { +//#region node_modules/.deno/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/xml.common.js +var require_xml_common = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; /** @@ -12959,34 +13290,34 @@ var require_xml_common = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/ * Default key used to access the XML value content. */ exports.XML_CHARKEY = "_"; -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.js -var require_xml = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.js"(exports) { +//#region node_modules/.deno/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/xml.js +var require_xml = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.stringifyXML = stringifyXML; exports.parseXML = parseXML; const fast_xml_parser_1 = require_fxp(); - const xml_common_js_1$1 = require_xml_common(); + const xml_common_js_1 = require_xml_common(); function getCommonOptions(options) { - var _a$2; + var _a; return { - attributesGroupName: xml_common_js_1$1.XML_ATTRKEY, - textNodeName: (_a$2 = options.xmlCharKey) !== null && _a$2 !== void 0 ? _a$2 : xml_common_js_1$1.XML_CHARKEY, + attributesGroupName: xml_common_js_1.XML_ATTRKEY, + textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, ignoreAttributes: false, suppressBooleanAttributes: false }; } function getSerializerOptions(options = {}) { - var _a$2, _b$1; + var _a, _b; return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", - rootNodeName: (_a$2 = options.rootName) !== null && _a$2 !== void 0 ? _a$2 : "root", - cdataPropName: (_b$1 = options.cdataPropName) !== null && _b$1 !== void 0 ? _b$1 : "__cdata" + rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", + cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { @@ -13009,8 +13340,7 @@ var require_xml = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_mo const parserOptions = getSerializerOptions(opts); const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); const node = { [parserOptions.rootNodeName]: obj }; - const xmlData = j2x.build(node); - return `${xmlData}`.replace(/\n/g, ""); + return `${j2x.build(node)}`.replace(/\n/g, ""); } /** * Converts given XML string into JSON @@ -13022,8 +13352,7 @@ var require_xml = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_mo if (!str) throw new Error("Document is empty"); const validation = fast_xml_parser_1.XMLValidator.validate(str); if (validation !== true) throw validation; - const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); - const parsedXml = parser.parse(str); + const parsedXml = new fast_xml_parser_1.XMLParser(getParserOptions(opts)).parse(str); if (parsedXml["?xml"]) delete parsedXml["?xml"]; if (!opts.includeRoot) for (const key of Object.keys(parsedXml)) { const value = parsedXml[key]; @@ -13031,11 +13360,11 @@ var require_xml = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_mo } return parsedXml; } -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs$3 = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/index.js +var require_commonjs$5 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.parseXML = exports.stringifyXML = void 0; var xml_js_1 = require_xml(); @@ -13064,2209 +13393,1205 @@ var require_commonjs$3 = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/ return xml_common_js_1.XML_CHARKEY; } }); -} }); +})); //#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/logger.js -var require_logger = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports) { +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = void 0; - const logger_1 = require_commonjs$11(); + const logger_1 = require_commonjs$13(); /** * The `@azure/logger` configuration for this package. - * @internal */ - exports.logger = (0, logger_1.createClientLogger)("core-lro"); -} }); + exports.logger = (0, logger_1.createClientLogger)("storage-blob"); +})); //#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/constants.js -var require_constants = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports) { +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.terminalStates = exports.POLL_INTERVAL_IN_MS = void 0; - /** - * The default time interval to wait before sending the next polling request. - */ - exports.POLL_INTERVAL_IN_MS = 2e3; + exports.BuffersStream = void 0; + const node_stream_1$2 = __require("node:stream"); /** - * The closed set of terminal states. + * This class generates a readable stream from the data in an array of buffers. */ - exports.terminalStates = [ - "succeeded", - "canceled", - "failed" - ]; -} }); + var BuffersStream = class extends node_stream_1$2.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) buffersLength += buf.byteLength; + if (buffersLength < this.byteLength) throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) this.push(null); + if (!size) size = this.readableHighWaterMark; + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else this.byteOffsetInCurrentBuffer = end; + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) this.push(Buffer.concat(outBuffers)); + else if (outBuffers.length === 1) this.push(outBuffers[0]); + } + }; + exports.BuffersStream = BuffersStream; +})); //#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/operation.js -var require_operation$2 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports) { +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.pollOperation = exports.initOperation = exports.deserializeState = void 0; - const logger_js_1$2 = require_logger(); - const constants_js_1$2 = require_constants(); + exports.PooledBuffer = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const BuffersStream_js_1 = require_BuffersStream(); /** - * Deserializes the state + * maxBufferLength is max size of each buffer in the pooled buffers. */ - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); + const maxBufferLength = tslib_1.__importDefault(__require("node:buffer")).default.constants.MAX_LENGTH; + /** + * This class provides a buffer container which conceptually has no hard size limit. + * It accepts a capacity, an array of input buffers and the total length of input data. + * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers + * into the internal "buffer" serially with respect to the total length. + * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream + * assembled from all the data in the internal "buffer". + */ + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; } - } - exports.deserializeState = deserializeState; - function setStateError(inputs) { - const { state: state$1, stateProxy, isOperationError: isOperationError$1 } = inputs; - return (error) => { - if (isOperationError$1(error)) { - stateProxy.setError(state$1, error); - stateProxy.setFailed(state$1); + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) len = maxBufferLength; + this.buffers.push(Buffer.allocUnsafe(len)); } - throw error; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") message = message + "."; - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); + if (buffers) this.fill(buffers, totalLength); } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state: state$1, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state$1); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state$1, new Error(errStr)); - stateProxy.setFailed(state$1); - logger_js_1$2.logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state$1); - break; } + buffers.splice(0, i); + if (buffers.length > 0) buffers[0] = buffers[0].slice(sourceOffset); } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state$1)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) stateProxy.setResult(state$1, buildResult({ - response, - state: state$1, - processResult - })); - } - function buildResult(inputs) { - const { processResult, response, state: state$1 } = inputs; - return processResult ? processResult(response, state$1) : response; - } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports.PooledBuffer = PooledBuffer; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BufferScheduler = void 0; + const events_1$1 = __require("events"); + const PooledBuffer_js_1 = require_PooledBuffer(); /** - * Initiates the long-running operation. + * This class accepts a Node.js Readable stream as input, and keeps reading data + * from the stream into the internal buffer structure, until it reaches maxBuffers. + * Every available buffer will try to trigger outgoingHandler. + * + * The internal buffer structure includes an incoming buffer array, and a outgoing + * buffer array. The incoming buffer array includes the "empty" buffers can be filled + * with new incoming data. The outgoing array includes the filled buffers to be + * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. + * + * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING + * + * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers + * + * PERFORMANCE IMPROVEMENT TIPS: + * 1. Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * 2. concurrency should set a smaller value than maxBuffers, which is helpful to + * reduce the possibility when a outgoing handler waits for the stream data. + * in this situation, outgoing handlers are blocked. + * Outgoing queue shouldn't be empty. */ - async function initOperation(inputs) { - const { init: init$1, stateProxy, processResult, getOperationStatus: getOperationStatus$1, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata: metadata$1, response } = await init$1(); - if (operationLocation) withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(operationLocation, false); - const config = { - metadata: metadata$1, - operationLocation, - resourceLocation - }; - logger_js_1$2.logger.verbose(`LRO: Operation description:`, config); - const state$1 = stateProxy.initState(config); - const status = getOperationStatus$1({ - response, - state: state$1, - operationLocation - }); - processOperationStatus({ - state: state$1, - status, - stateProxy, - response, - setErrorAsResult, - processResult - }); - return state$1; - } - exports.initOperation = initOperation; - async function pollOperationHelper(inputs) { - const { poll, state: state$1, stateProxy, operationLocation, getOperationStatus: getOperationStatus$1, getResourceLocation: getResourceLocation$1, isOperationError: isOperationError$1, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state: state$1, - stateProxy, - isOperationError: isOperationError$1 - })); - const status = getOperationStatus$1(response, state$1); - logger_js_1$2.logger.verbose(`LRO: Status:\n\tPolling from: ${state$1.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${constants_js_1$2.terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation$1(response, state$1); - if (resourceLocation !== void 0) return { - response: await poll(resourceLocation).catch(setStateError({ - state: state$1, - stateProxy, - isOperationError: isOperationError$1 - })), - status - }; + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1$1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + if (maxBuffers <= 0) throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + if (concurrency <= 0) throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; } - return { - response, - status - }; - } - /** Polls the long-running operation. */ - async function pollOperation(inputs) { - const { poll, state: state$1, stateProxy, options, getOperationStatus: getOperationStatus$1, getResourceLocation: getResourceLocation$1, getOperationLocation: getOperationLocation$1, isOperationError: isOperationError$1, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state$1.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus$1, - state: state$1, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation$1, - isOperationError: isOperationError$1, - options - }); - processOperationStatus({ - status, - response, - state: state$1, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) this.readable.pause(); + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) return; + else resolve(); + }); }); - if (!constants_js_1$2.terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) setDelay(intervalInMs); - const location = getOperationLocation$1 === null || getOperationLocation$1 === void 0 ? void 0 : getOperationLocation$1(response, state$1); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state$1.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(location, isUpdated); - } else withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(operationLocation, false); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + else buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else return false; + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); } - updateState === null || updateState === void 0 || updateState(state$1, response); + return true; } - } - exports.pollOperation = pollOperation; -} }); + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) return; + buffer = this.outgoing.shift(); + if (buffer) this.triggerOutgoingHandler(buffer); + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) this.readable.resume(); + } + }; + exports.BufferScheduler = BufferScheduler; +})); //#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/operation.js -var require_operation$1 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports) { +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.pollHttpOperation = exports.isOperationError = exports.getResourceLocation = exports.getOperationStatus = exports.getOperationLocation = exports.initHttpOperation = exports.getStatusFromInitialResponse = exports.getErrorFromResponse = exports.parseRetryAfter = exports.inferLroMode = void 0; - const operation_js_1$4 = require_operation$2(); - const logger_js_1$1 = require_logger(); - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + const core_rest_pipeline_1 = require_commonjs$9(); + let _defaultHttpClient; + function getCachedDefaultHttpClient() { + if (!_defaultHttpClient) _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); + return _defaultHttpClient; } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/interfaces.js +var require_interfaces = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BaseRequestPolicy = void 0; + /** + * The base class from which all request policies derive. + */ + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports.BaseRequestPolicy = BaseRequestPolicy; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PathStylePorts = exports.DevelopmentConnectionString = exports.HeaderConstants = exports.URLConstants = exports.SDK_VERSION = void 0; + exports.SDK_VERSION = "1.0.0"; + exports.URLConstants = { Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } }; + exports.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.escapeURLPath = escapeURLPath; + exports.getValueInConnString = getValueInConnString; + exports.extractConnectionStringParts = extractConnectionStringParts; + exports.appendToURLPath = appendToURLPath; + exports.setURLParameter = setURLParameter; + exports.getURLParameter = getURLParameter; + exports.setURLHost = setURLHost; + exports.getURLPath = getURLPath; + exports.getURLScheme = getURLScheme; + exports.getURLPathAndQuery = getURLPathAndQuery; + exports.getURLQueries = getURLQueries; + exports.appendToURLQuery = appendToURLQuery; + exports.truncatedISO8061Date = truncatedISO8061Date; + exports.base64encode = base64encode; + exports.base64decode = base64decode; + exports.generateBlockID = generateBlockID; + exports.delay = delay; + exports.padStart = padStart; + exports.sanitizeURL = sanitizeURL; + exports.sanitizeHeaders = sanitizeHeaders; + exports.iEqual = iEqual; + exports.getAccountNameFromUrl = getAccountNameFromUrl; + exports.isIpEndpointStyle = isIpEndpointStyle; + exports.attachCredential = attachCredential; + exports.httpAuthorizationToString = httpAuthorizationToString; + exports.EscapePath = EscapePath; + exports.assertResponse = assertResponse; + const core_rest_pipeline_1 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); + const constants_js_1 = require_constants$2(); + /** + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @param url - + */ + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path || "/"; + path = escape(path); + urlParsed.pathname = path; + return urlParsed.toString(); } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) if (element.trim().startsWith("DevelopmentStorageProxyUri=")) proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + return proxyUri; } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) if (element.trim().startsWith(argument)) return element.trim().match(argument + "=(.*)")[1]; + return ""; } - function findResourceLocation(inputs) { - var _a$2; - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": return requestPath; - case "DELETE": return void 0; - case "PATCH": return (_a$2 = getDefault()) !== null && _a$2 !== void 0 ? _a$2 : requestPath; - default: return getDefault(); + /** + * Extracts the parts of an Azure Storage account connection string. + * + * @param connectionString - Connection string. + * @returns String key value pairs of the storage account's url and credentials. + */ + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; } - function getDefault() { - switch (resourceLocationConfig) { - case "azure-async-operation": return void 0; - case "original-uri": return requestPath; - case "location": - default: return location; + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) throw new Error("Invalid EndpointSuffix in the provided Connection String"); + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; } + if (!accountName) throw new Error("Invalid AccountName in the provided Connection String"); + else if (accountKey.length === 0) throw new Error("Invalid AccountKey in the provided Connection String"); + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) accountName = getAccountNameFromUrl(blobEndpoint); + if (!blobEndpoint) throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + else if (!accountSas) throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + if (accountSas.startsWith("?")) accountSas = accountSas.substring(1); + return { + kind: "SASConnString", + url: blobEndpoint, + accountName, + accountSas + }; } } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ - operationLocation, - azureAsyncOperation - }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - else if (location !== void 0) return { - mode: "ResourceLocation", - operationLocation: location - }; - else if (normalizedRequestMethod === "PUT" && requestPath) return { - mode: "Body", - operationLocation: requestPath - }; - else return void 0; - } - exports.inferLroMode = inferLroMode; - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: return toOperationStatus(statusCode); - case "succeeded": return "succeeded"; - case "failed": return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": return "running"; - case "canceled": - case "cancelled": return "canceled"; - default: { - logger_js_1$1.logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } + /** + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. + * + * @param text - + */ + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function getStatus(rawResponse) { - var _a$2; - const { status } = (_a$2 = rawResponse.body) !== null && _a$2 !== void 0 ? _a$2 : {}; - return transformStatus({ - status, - statusCode: rawResponse.statusCode - }); + /** + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". + * + * @param url - Source URL string + * @param name - String to be appended to URL + * @returns An updated URL string + */ + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path ? path.endsWith("/") ? `${path}${name}` : `${path}/${name}` : name; + urlParsed.pathname = path; + return urlParsed.toString(); } - function getProvisioningState(rawResponse) { - var _a$2, _b$1; - const { properties, provisioningState } = (_a$2 = rawResponse.body) !== null && _a$2 !== void 0 ? _a$2 : {}; - const status = (_b$1 = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b$1 !== void 0 ? _b$1 : provisioningState; - return transformStatus({ - status, - statusCode: rawResponse.statusCode - }); + /** + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. + * + * @param url - Source URL string + * @param name - Parameter name + * @param value - Parameter value + * @returns An updated URL string + */ + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) searchPieces.push(pair); + } + if (encodedValue) searchPieces.push(`${encodedName}=${encodedValue}`); + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); } - function toOperationStatus(statusCode) { - if (statusCode === 202) return "running"; - else if (statusCode < 300) return "succeeded"; - else return "failed"; + /** + * Get URL parameter by name. + * + * @param url - + * @param name - + */ + function getURLParameter(url, name) { + return new URL(url).searchParams.get(name) ?? void 0; } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; + /** + * Set URL host. + * + * @param url - Source URL string + * @param host - New host string + * @returns An updated URL string + */ + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); } - exports.parseRetryAfter = parseRetryAfter; - function getErrorFromResponse(response) { - const error = accessBodyProperty(response, "error"); - if (!error) { - logger_js_1$1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + /** + * Get URL path from an URL string. + * + * @param url - Source URL string + */ + function getURLPath(url) { + try { + return new URL(url).pathname; + } catch (e) { return; } - if (!error.code || !error.message) { - logger_js_1$1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + } + /** + * Get URL scheme from an URL string. + * + * @param url - Source URL string + */ + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { return; } - return error; - } - exports.getErrorFromResponse = getErrorFromResponse; - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor(new Date().getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) return retryAfterTime - timeNow; - return void 0; } - function getStatusFromInitialResponse(inputs) { - const { response, state: state$1, operationLocation } = inputs; - function helper() { - var _a$2; - const mode = (_a$2 = state$1.config.metadata) === null || _a$2 === void 0 ? void 0 : _a$2["mode"]; - switch (mode) { - case void 0: return toOperationStatus(response.rawResponse.statusCode); - case "Body": return getOperationStatus(response, state$1); - default: return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; + /** + * Get URL path and query from an URL string. + * + * @param url - Source URL string + */ + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) throw new RangeError("Invalid url without valid path."); + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + return `${pathString}${queryString}`; } - exports.getStatusFromInitialResponse = getStatusFromInitialResponse; /** - * Initiates the long-running operation. + * Get URL query key value pairs from an URL string. + * + * @param url - */ - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return (0, operation_js_1$4.initOperation)({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ - response, - operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, - resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation - }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state$1) => processResult(flatResponse, state$1) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) return {}; + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; }); - } - exports.initHttpOperation = initHttpOperation; - function getOperationLocation({ rawResponse }, state$1) { - var _a$2; - const mode = (_a$2 = state$1.config.metadata) === null || _a$2 === void 0 ? void 0 : _a$2["mode"]; - switch (mode) { - case "OperationLocation": return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - case "ResourceLocation": return getLocationHeader(rawResponse); - case "Body": - default: return void 0; - } - } - exports.getOperationLocation = getOperationLocation; - function getOperationStatus({ rawResponse }, state$1) { - var _a$2; - const mode = (_a$2 = state$1.config.metadata) === null || _a$2 === void 0 ? void 0 : _a$2["mode"]; - switch (mode) { - case "OperationLocation": return getStatus(rawResponse); - case "ResourceLocation": return toOperationStatus(rawResponse.statusCode); - case "Body": return getProvisioningState(rawResponse); - default: throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + queries[key] = splitResults[1]; } + return queries; } - exports.getOperationStatus = getOperationStatus; - function accessBodyProperty({ flatResponse, rawResponse }, prop) { - var _a$2, _b$1; - return (_a$2 = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a$2 !== void 0 ? _a$2 : (_b$1 = rawResponse.body) === null || _b$1 === void 0 ? void 0 : _b$1[prop]; + /** + * Append a string to URL query. + * + * @param url - Source URL string. + * @param queryParts - String to be appended to the URL query. + * @returns An updated URL string. + */ + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) query += "&" + queryParts; + else query = queryParts; + urlParsed.search = query; + return urlParsed.toString(); } - function getResourceLocation(res, state$1) { - const loc = accessBodyProperty(res, "resourceLocation"); - if (loc && typeof loc === "string") state$1.config.resourceLocation = loc; - return state$1.config.resourceLocation; + /** + * Rounds a date off to seconds. + * + * @param date - + * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns Date string in ISO8061 format, with or without 7 milliseconds component + */ + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } - exports.getResourceLocation = getResourceLocation; - function isOperationError(e) { - return e.name === "RestError"; + /** + * Base64 encode. + * + * @param content - + */ + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); } - exports.isOperationError = isOperationError; - /** Polls the long-running operation. */ - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state: state$1, setErrorAsResult } = inputs; - return (0, operation_js_1$4.pollOperation)({ - state: state$1, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); + /** + * Base64 decode. + * + * @param encodedString - + */ + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } - exports.pollHttpOperation = pollHttpOperation; -} }); - -//#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/poller.js -var require_poller$2 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.buildCreatePoller = void 0; - const operation_js_1$3 = require_operation$2(); - const constants_js_1$1 = require_constants(); - const core_util_1 = require_commonjs$9(); - const createStateProxy$1 = () => ({ - initState: (config) => ({ - status: "running", - config - }), - setCanceled: (state$1) => state$1.status = "canceled", - setError: (state$1, error) => state$1.error = error, - setResult: (state$1, result) => state$1.result = result, - setRunning: (state$1) => state$1.status = "running", - setSucceeded: (state$1) => state$1.status = "succeeded", - setFailed: (state$1) => state$1.status = "failed", - getError: (state$1) => state$1.error, - getResult: (state$1) => state$1.result, - isCanceled: (state$1) => state$1.status === "canceled", - isFailed: (state$1) => state$1.status === "failed", - isRunning: (state$1) => state$1.status === "running", - isSucceeded: (state$1) => state$1.status === "succeeded" - }); /** - * Returns a poller factory. + * Generate a 64 bytes base64 block ID string. + * + * @param blockIndex - */ - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation$1, getStatusFromInitialResponse: getStatusFromInitialResponse$1, getStatusFromPollResponse, isOperationError: isOperationError$1, getResourceLocation: getResourceLocation$1, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init: init$1, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1$1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) withOperationLocationCallback(operationLocation); - else if (!called) withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state$1 = restoreFrom ? (0, operation_js_1$3.deserializeState)(restoreFrom) : await (0, operation_js_1$3.initOperation)({ - init: init$1, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse$1, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new AbortController(); - const handlers = new Map(); - const handleProgressEvents = async () => handlers.forEach((h$1) => h$1(state$1)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state$1, - getResult: () => state$1.result, - isDone: () => [ - "succeeded", - "failed", - "canceled" - ].includes(state$1.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ state: state$1 }), - onProgress: (callback) => { - const s$1 = Symbol(); - handlers.set(s$1, callback); - return () => handlers.delete(s$1); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - function abortListener() { - abortController$1.abort(); - } - const abortSignal$1 = abortController$1.signal; - if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) abortController$1.abort(); - else if (!abortSignal$1.aborted) inputAbortSignal === null || inputAbortSignal === void 0 || inputAbortSignal.addEventListener("abort", abortListener, { once: true }); - try { - if (!poller.isDone()) { - await poller.poll({ abortSignal: abortSignal$1 }); - while (!poller.isDone()) { - await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal: abortSignal$1 }); - await poller.poll({ abortSignal: abortSignal$1 }); - } - } - } finally { - inputAbortSignal === null || inputAbortSignal === void 0 || inputAbortSignal.removeEventListener("abort", abortListener); - } - if (resolveOnUnsuccessful) return poller.getResult(); - else switch (state$1.status) { - case "succeeded": return poller.getResult(); - case "canceled": throw new Error(cancelErrMsg); - case "failed": throw state$1.error; - case "notStarted": - case "running": throw new Error(`Polling completed without succeeding or failing`); - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) return; - } else switch (state$1.status) { - case "succeeded": return; - case "canceled": throw new Error(cancelErrMsg); - case "failed": throw state$1.error; - } - await (0, operation_js_1$3.pollOperation)({ - poll, - state: state$1, - stateProxy, - getOperationLocation: getOperationLocation$1, - isOperationError: isOperationError$1, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation$1, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) switch (state$1.status) { - case "canceled": throw new Error(cancelErrMsg); - case "failed": throw state$1.error; - } - } - }; - return poller; - }; + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - 6; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + return base64encode(blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0")); } - exports.buildCreatePoller = buildCreatePoller; -} }); - -//#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/poller.js -var require_poller$1 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.createHttpPoller = void 0; - const operation_js_1$2 = require_operation$1(); - const poller_js_1$2 = require_poller$2(); /** - * Creates a poller that can be used to poll a long-running operation. - * @param lro - Description of the long-running operation - * @param options - options to configure the poller - * @returns an initialized poller + * Delay specified time interval. + * + * @param timeInMs - + * @param aborter - + * @param abortError - */ - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return (0, poller_js_1$2.buildCreatePoller)({ - getStatusFromInitialResponse: operation_js_1$2.getStatusFromInitialResponse, - getStatusFromPollResponse: operation_js_1$2.getOperationStatus, - isOperationError: operation_js_1$2.isOperationError, - getOperationLocation: operation_js_1$2.getOperationLocation, - getResourceLocation: operation_js_1$2.getResourceLocation, - getPollingInterval: operation_js_1$2.parseRetryAfter, - getError: operation_js_1$2.getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = (0, operation_js_1$2.inferLroMode)({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ - response, - operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, - resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation - }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state$1) => processResult(flatResponse, state$1) : ({ flatResponse }) => flatResponse + async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) clearTimeout(timeout); + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) aborter.removeEventListener("abort", abortHandler); + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) aborter.addEventListener("abort", abortHandler); }); } - exports.createHttpPoller = createHttpPoller; -} }); - -//#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js -var require_operation = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.GenericPollOperation = void 0; - const operation_js_1$1 = require_operation$1(); - const logger_js_1 = require_logger(); - const createStateProxy = () => ({ - initState: (config) => ({ - config, - isStarted: true - }), - setCanceled: (state$1) => state$1.isCancelled = true, - setError: (state$1, error) => state$1.error = error, - setResult: (state$1, result) => state$1.result = result, - setRunning: (state$1) => state$1.isStarted = true, - setSucceeded: (state$1) => state$1.isCompleted = true, - setFailed: () => { - /** empty body */ - }, - getError: (state$1) => state$1.error, - getResult: (state$1) => state$1.result, - isCanceled: (state$1) => !!state$1.isCancelled, - isFailed: (state$1) => !!state$1.error, - isRunning: (state$1) => !!state$1.isStarted, - isSucceeded: (state$1) => Boolean(state$1.isCompleted && !state$1.isCancelled && !state$1.error) - }); - var GenericPollOperation = class { - constructor(state$1, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state$1; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a$2; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1$1.initHttpOperation)({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) await (0, operation_js_1$1.pollHttpOperation)({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state$1, { rawResponse }) => updateState(state$1, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state$1) => isDone(flatResponse, state$1) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - (_a$2 = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a$2 === void 0 || _a$2.call(options, this.state); - return this; - } - async cancel() { - logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ state: this.state }); - } - }; - exports.GenericPollOperation = GenericPollOperation; -} }); - -//#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js -var require_poller = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Poller = exports.PollerCancelledError = exports.PollerStoppedError = void 0; /** - * When a poller is manually stopped through the `stopPolling` method, - * the poller will be rejected with an instance of the PollerStoppedError. + * String.prototype.padStart() + * + * @param currentString - + * @param targetLength - + * @param padString - */ - var PollerStoppedError = class PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, PollerStoppedError.prototype); + function padStart(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) return currentString.padStart(targetLength, padString); + padString = padString || " "; + if (currentString.length > targetLength) return currentString; + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) padString += padString.repeat(targetLength / padString.length); + return padString.slice(0, targetLength) + currentString; } - }; - exports.PollerStoppedError = PollerStoppedError; + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) headers.set(name, "*****"); + else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) headers.set(name, sanitizeURL(value)); + else headers.set(name, value); + return headers; + } /** - * When the operation is cancelled, the poller will be rejected with an instance - * of the PollerCancelledError. + * If two strings are equal when compared case insensitive. + * + * @param str1 - + * @param str2 - */ - var PollerCancelledError = class PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, PollerCancelledError.prototype); + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + /** + * Extracts account name from the url + * @param url - url to extract the account name from + * @returns with the account name + */ + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") accountName = parsedUrl.hostname.split(".")[0]; + else if (isIpEndpointStyle(parsedUrl)) accountName = parsedUrl.pathname.split("/")[1]; + else accountName = ""; + return accountName; + } catch (error) { + throw new Error("Unable to extract accountName with provided information."); } - }; - exports.PollerCancelledError = PollerCancelledError; + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } /** - * A class that represents the definition of a program that polls through consecutive requests - * until it reaches a state of completion. - * - * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. - * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. - * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. - * - * ```ts - * const poller = new MyPoller(); - * - * // Polling just once: - * await poller.poll(); - * - * // We can try to cancel the request here, by calling: - * // - * // await poller.cancelOperation(); - * // - * - * // Getting the final result: - * const result = await poller.pollUntilDone(); - * ``` - * - * The Poller is defined by two types, a type representing the state of the poller, which - * must include a basic set of properties from `PollOperationState`, - * and a return type defined by `TResult`, which can be anything. - * - * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having - * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. - * - * ```ts - * class Client { - * public async makePoller: PollerLike { - * const poller = new MyPoller({}); - * // It might be preferred to return the poller after the first request is made, - * // so that some information can be obtained right away. - * await poller.poll(); - * return poller; - * } - * } - * - * const poller: PollerLike = myClient.makePoller(); - * ``` - * - * A poller can be created through its constructor, then it can be polled until it's completed. - * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. - * At any point in time, the intermediate forms of the result type can be requested without delay. - * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * Attach a TokenCredential to an object. * - * ```ts - * const poller = myClient.makePoller(); - * const state: MyOperationState = poller.getOperationState(); + * @param thing - + * @param credential - + */ + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + /** + * Escape the blobName but keep path separator ('/'). + */ + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) split[i] = encodeURIComponent(split[i]); + return split.join("/"); + } + /** + * A typesafe helper for ensuring that a given response object has + * the original _response attached. + * @param response - A response object from calling a client operation + * @returns The same object, but with known _response property + */ + function assertResponse(response) { + if (`_response` in response) return response; + throw new TypeError(`Unexpected response object ${response}`); + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageBrowserPolicy = void 0; + const RequestPolicy_js_1 = require_RequestPolicy(); + const core_util_1 = require_commonjs$11(); + const constants_js_1 = require_constants$2(); + const utils_common_js_1 = require_utils_common$2(); + /** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: * - * // The intermediate result can be obtained at any time. - * const result: MyResult | undefined = poller.getResult(); + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. * - * // The final result can only be obtained after the poller finishes. - * const result: MyResult = await poller.pollUntilDone(); - * ``` + * 2. Remove cookie header for security * + * 3. Remove content-length header to avoid browsers warning */ - var Poller = class { + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - */ - constructor(operation) { - /** controls whether to throw an error if the operation failed or was canceled. */ - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve, reject) => { - this.resolve = resolve; - this.reject = reject; - }); - this.promise.catch(() => {}); + constructor(nextPolicy, options) { + super(nextPolicy, options); } /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. + * Sends out request. + * + * @param request - */ - async startPolling(pollOptions = {}) { - if (this.stopped) this.stopped = false; - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } + async sendRequest(request) { + if (core_util_1.isNodeLike) return this._nextPolicy.sendRequest(request); + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports.StorageBrowserPolicy = StorageBrowserPolicy; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0; + const StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports, "StorageBrowserPolicy", { + enumerable: true, + get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } + }); + /** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + */ + var StorageBrowserPolicyFactory = class { /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * Creates a StorageBrowserPolicyFactory object. * - * @param options - Optional properties passed to the operation's update method. + * @param nextPolicy - + * @param options - */ - async pollOnce(options = {}) { - if (!this.isDone()) this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - this.processUpdatedState(); + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } + }; + exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CredentialPolicy = void 0; + const RequestPolicy_js_1 = require_RequestPolicy(); + /** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + */ + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. + * Sends out request. * - * @param state - The current operation state. + * @param request - */ - fireProgress(state$1) { - for (const callback of this.pollProgressCallbacks) callback(state$1); + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); } /** - * Invokes the underlying operation's cancel method. + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); + signRequest(request) { + return request; } + }; + exports.CredentialPolicy = CredentialPolicy; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AnonymousCredentialPolicy = void 0; + const CredentialPolicy_js_1 = require_CredentialPolicy(); + /** + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). + */ + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error = new PollerCancelledError("Operation was canceled"); - this.reject(error); - throw error; - } - } - if (this.isDone() && this.resolve) this.resolve(this.getResult()); - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) this.startPolling(pollOptions).catch(this.reject); - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state$1 = this.operation.state; - return Boolean(state$1.isCompleted || state$1.isCancelled || state$1.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) this.cancelPromise = this.cancelOnce(options); - else if (options.abortSignal) throw new Error("A cancel request is currently pending"); - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state$1 = this.operation.state; - return state$1.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); + constructor(nextPolicy, options) { + super(nextPolicy, options); } }; - exports.Poller = Poller; -} }); + exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; +})); //#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js -var require_lroEngine$1 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports) { +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.LroEngine = void 0; - const operation_js_1 = require_operation(); - const constants_js_1 = require_constants(); - const poller_js_1$1 = require_poller(); - const operation_js_2 = require_operation$2(); + exports.Credential = void 0; /** - * The LRO Engine, a class that performs polling. + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. */ - var LroEngine = class extends poller_js_1$1.Poller { - constructor(lro, options) { - const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state$1 = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; - const operation = new operation_js_1.GenericPollOperation(state$1, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } + var Credential = class { /** - * The method used by the poller to wait before attempting to update its operation. + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - */ - delay() { - return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); } }; - exports.LroEngine = LroEngine; -} }); - -//#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js -var require_lroEngine = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.LroEngine = void 0; - var lroEngine_js_1 = require_lroEngine$1(); - Object.defineProperty(exports, "LroEngine", { - enumerable: true, - get: function() { - return lroEngine_js_1.LroEngine; - } - }); -} }); - -//#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js -var require_pollOperation = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); -} }); + exports.Credential = Credential; +})); //#endregion -//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/index.js -var require_commonjs$2 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/index.js"(exports) { +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.createHttpPoller = void 0; - const tslib_1 = require_tslib(); - var poller_js_1 = require_poller$1(); - Object.defineProperty(exports, "createHttpPoller", { - enumerable: true, - get: function() { - return poller_js_1.createHttpPoller; - } - }); - /** - * This can be uncommented to expose the protocol-agnostic poller - */ - /** legacy */ - tslib_1.__exportStar(require_lroEngine(), exports); - tslib_1.__exportStar(require_poller(), exports); - tslib_1.__exportStar(require_pollOperation(), exports); -} }); - -//#endregion -//#region node_modules/.deno/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist/index.js -var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist/index.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs$7(); - var tslib = require_tslib(); - var coreAuth = require_commonjs$6(); - var coreUtil = require_commonjs$9(); - var coreHttpCompat = require_commonjs$4(); - var coreClient = require_commonjs$5(); - var coreXml = require_commonjs$3(); - var logger$1 = require_commonjs$11(); - var abortController = require_commonjs$10(); - var crypto$1 = __require("crypto"); - var coreTracing = require_commonjs$8(); - var stream$2 = __require("stream"); - var coreLro = require_commonjs$2(); - var events = __require("events"); - var fs$4 = __require("fs"); - var util$2 = __require("util"); - var buffer$1 = __require("buffer"); - function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d$1 = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d$1.get ? d$1 : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs$4); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util$2); - /** - * The `@azure/logger` configuration for this package. - */ - const logger = logger$1.createClientLogger("storage-blob"); + exports.AnonymousCredential = void 0; + const AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + const Credential_js_1 = require_Credential(); /** - * The base class from which all request policies derive. + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). */ - var BaseRequestPolicy = class { - /** - * The main method to implement that manipulates a request/response. - */ - constructor(_nextPolicy, _options) { - this._nextPolicy = _nextPolicy; - this._options = _options; - } - /** - * Get whether or not a log with the provided log level should be logged. - * @param logLevel - The log level of the log that will be logged. - * @returns Whether or not a log with the provided log level should be logged. - */ - shouldLog(logLevel) { - return this._options.shouldLog(logLevel); - } + var AnonymousCredential = class extends Credential_js_1.Credential { /** - * Attempt to log the provided message to the provided logger. If no logger was provided or if - * the log level does not meat the logger's threshold, then nothing will be logged. - * @param logLevel - The log level of this log. - * @param message - The message of this log. + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - */ - log(logLevel, message) { - this._options.log(logLevel, message); - } - }; - const SDK_VERSION = "12.27.0"; - const SERVICE_VERSION = "2025-05-05"; - const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - const BLOCK_BLOB_MAX_BLOCKS = 5e4; - const DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - const REQUEST_TIMEOUT = 100 * 1e3; - /** - * The OAuth scope to use with Azure Storage. - */ - const StorageOAuthScopes = "https://storage.azure.com/.default"; - const URLConstants = { Parameters: { - FORCE_BROWSER_NO_CACHE: "_", - SNAPSHOT: "snapshot", - VERSIONID: "versionid", - TIMEOUT: "timeout" - } }; - const HTTPURLConnection = { HTTP_ACCEPTED: 202 }; - const HeaderConstants = { - AUTHORIZATION: "Authorization", - CONTENT_ENCODING: "Content-Encoding", - CONTENT_ID: "Content-ID", - CONTENT_LANGUAGE: "Content-Language", - CONTENT_LENGTH: "Content-Length", - CONTENT_MD5: "Content-Md5", - CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", - CONTENT_TYPE: "Content-Type", - COOKIE: "Cookie", - DATE: "date", - IF_MATCH: "if-match", - IF_MODIFIED_SINCE: "if-modified-since", - IF_NONE_MATCH: "if-none-match", - IF_UNMODIFIED_SINCE: "if-unmodified-since", - PREFIX_FOR_STORAGE: "x-ms-", - RANGE: "Range", - X_MS_DATE: "x-ms-date", - X_MS_ERROR_CODE: "x-ms-error-code", - X_MS_VERSION: "x-ms-version" - }; - const ETagNone = ""; - const ETagAny = "*"; - const SIZE_1_MB = 1 * 1024 * 1024; - const BATCH_MAX_REQUEST = 256; - const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - const HTTP_LINE_ENDING = "\r\n"; - const HTTP_VERSION_1_1 = "HTTP/1.1"; - const EncryptionAlgorithmAES25 = "AES256"; - const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - const StorageBlobLoggingAllowedHeaderNames = [ - "Access-Control-Allow-Origin", - "Cache-Control", - "Content-Length", - "Content-Type", - "Date", - "Request-Id", - "traceparent", - "Transfer-Encoding", - "User-Agent", - "x-ms-client-request-id", - "x-ms-date", - "x-ms-error-code", - "x-ms-request-id", - "x-ms-return-client-request-id", - "x-ms-version", - "Accept-Ranges", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-MD5", - "Content-Range", - "ETag", - "Last-Modified", - "Server", - "Vary", - "x-ms-content-crc64", - "x-ms-copy-action", - "x-ms-copy-completion-time", - "x-ms-copy-id", - "x-ms-copy-progress", - "x-ms-copy-status", - "x-ms-has-immutability-policy", - "x-ms-has-legal-hold", - "x-ms-lease-state", - "x-ms-lease-status", - "x-ms-range", - "x-ms-request-server-encrypted", - "x-ms-server-encrypted", - "x-ms-snapshot", - "x-ms-source-range", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "x-ms-access-tier", - "x-ms-access-tier-change-time", - "x-ms-access-tier-inferred", - "x-ms-account-kind", - "x-ms-archive-status", - "x-ms-blob-append-offset", - "x-ms-blob-cache-control", - "x-ms-blob-committed-block-count", - "x-ms-blob-condition-appendpos", - "x-ms-blob-condition-maxsize", - "x-ms-blob-content-disposition", - "x-ms-blob-content-encoding", - "x-ms-blob-content-language", - "x-ms-blob-content-length", - "x-ms-blob-content-md5", - "x-ms-blob-content-type", - "x-ms-blob-public-access", - "x-ms-blob-sequence-number", - "x-ms-blob-type", - "x-ms-copy-destination-snapshot", - "x-ms-creation-time", - "x-ms-default-encryption-scope", - "x-ms-delete-snapshots", - "x-ms-delete-type-permanent", - "x-ms-deny-encryption-scope-override", - "x-ms-encryption-algorithm", - "x-ms-if-sequence-number-eq", - "x-ms-if-sequence-number-le", - "x-ms-if-sequence-number-lt", - "x-ms-incremental-copy", - "x-ms-lease-action", - "x-ms-lease-break-period", - "x-ms-lease-duration", - "x-ms-lease-id", - "x-ms-lease-time", - "x-ms-page-write", - "x-ms-proposed-lease-id", - "x-ms-range-get-content-md5", - "x-ms-rehydrate-priority", - "x-ms-sequence-number-action", - "x-ms-sku-name", - "x-ms-source-content-md5", - "x-ms-source-if-match", - "x-ms-source-if-modified-since", - "x-ms-source-if-none-match", - "x-ms-source-if-unmodified-since", - "x-ms-tag-count", - "x-ms-encryption-key-sha256", - "x-ms-copy-source-error-code", - "x-ms-copy-source-status-code", - "x-ms-if-tags", - "x-ms-source-if-tags" - ]; - const StorageBlobLoggingAllowedQueryParameters = [ - "comp", - "maxresults", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "se", - "si", - "sip", - "sp", - "spr", - "sr", - "srt", - "ss", - "st", - "sv", - "include", - "marker", - "prefix", - "copyid", - "restype", - "blockid", - "blocklisttype", - "delimiter", - "prevsnapshot", - "ske", - "skoid", - "sks", - "skt", - "sktid", - "skv", - "snapshot" - ]; - const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - const BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - const PathStylePorts = [ - "10000", - "10001", - "10002", - "10003", - "10004", - "10100", - "10101", - "10102", - "10103", - "10104", - "11000", - "11001", - "11002", - "11003", - "11004", - "11100", - "11101", - "11102", - "11103", - "11104" - ]; - /** - * Reserved URL characters must be properly escaped for Storage services like Blob or File. - * - * ## URL encode and escape strategy for JS SDKs - * - * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. - * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL - * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. - * - * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. - * - * This is what legacy V2 SDK does, simple and works for most of the cases. - * - When customer URL string is "http://account.blob.core.windows.net/con/b:", - * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", - * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. - * - * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is - * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. - * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. - * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. - * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: - * - * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. - * - * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. - * - When customer URL string is "http://account.blob.core.windows.net/con/b:", - * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", - * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", - * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. - * - * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string - * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. - * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. - * And following URL strings are invalid: - * - "http://account.blob.core.windows.net/con/b%" - * - "http://account.blob.core.windows.net/con/b%2" - * - "http://account.blob.core.windows.net/con/b%G" - * - * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. - * - * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` - * - * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata - * - * @param url - - */ - function escapeURLPath(url$1) { - const urlParsed = new URL(url$1); - let path$13 = urlParsed.pathname; - path$13 = path$13 || "/"; - path$13 = escape(path$13); - urlParsed.pathname = path$13; - return urlParsed.toString(); - } - function getProxyUriFromDevConnString(connectionString) { - let proxyUri = ""; - if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { - const matchCredentials = connectionString.split(";"); - for (const element of matchCredentials) if (element.trim().startsWith("DevelopmentStorageProxyUri=")) proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; - } - return proxyUri; - } - function getValueInConnString(connectionString, argument) { - const elements = connectionString.split(";"); - for (const element of elements) if (element.trim().startsWith(argument)) return element.trim().match(argument + "=(.*)")[1]; - return ""; - } - /** - * Extracts the parts of an Azure Storage account connection string. - * - * @param connectionString - Connection string. - * @returns String key value pairs of the storage account's url and credentials. - */ - function extractConnectionStringParts(connectionString) { - let proxyUri = ""; - if (connectionString.startsWith("UseDevelopmentStorage=true")) { - proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; - } - let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); - blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; - if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { - let defaultEndpointsProtocol = ""; - let accountName = ""; - let accountKey = Buffer.from("accountKey", "base64"); - let endpointSuffix = ""; - accountName = getValueInConnString(connectionString, "AccountName"); - accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); - if (!blobEndpoint) { - defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); - const protocol = defaultEndpointsProtocol.toLowerCase(); - if (protocol !== "https" && protocol !== "http") throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); - endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); - if (!endpointSuffix) throw new Error("Invalid EndpointSuffix in the provided Connection String"); - blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; - } - if (!accountName) throw new Error("Invalid AccountName in the provided Connection String"); - else if (accountKey.length === 0) throw new Error("Invalid AccountKey in the provided Connection String"); - return { - kind: "AccountConnString", - url: blobEndpoint, - accountName, - accountKey, - proxyUri - }; - } else { - let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); - let accountName = getValueInConnString(connectionString, "AccountName"); - if (!accountName) accountName = getAccountNameFromUrl(blobEndpoint); - if (!blobEndpoint) throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); - else if (!accountSas) throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); - if (accountSas.startsWith("?")) accountSas = accountSas.substring(1); - return { - kind: "SASConnString", - url: blobEndpoint, - accountName, - accountSas - }; - } - } - /** - * Internal escape method implemented Strategy Two mentioned in escapeURL() description. - * - * @param text - - */ - function escape(text) { - return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); - } - /** - * Append a string to URL path. Will remove duplicated "/" in front of the string - * when URL path ends with a "/". - * - * @param url - Source URL string - * @param name - String to be appended to URL - * @returns An updated URL string - */ - function appendToURLPath(url$1, name) { - const urlParsed = new URL(url$1); - let path$13 = urlParsed.pathname; - path$13 = path$13 ? path$13.endsWith("/") ? `${path$13}${name}` : `${path$13}/${name}` : name; - urlParsed.pathname = path$13; - return urlParsed.toString(); - } - /** - * Set URL parameter name and value. If name exists in URL parameters, old value - * will be replaced by name key. If not provide value, the parameter will be deleted. - * - * @param url - Source URL string - * @param name - Parameter name - * @param value - Parameter value - * @returns An updated URL string - */ - function setURLParameter(url$1, name, value) { - const urlParsed = new URL(url$1); - const encodedName = encodeURIComponent(name); - const encodedValue = value ? encodeURIComponent(value) : void 0; - const searchString = urlParsed.search === "" ? "?" : urlParsed.search; - const searchPieces = []; - for (const pair of searchString.slice(1).split("&")) if (pair) { - const [key] = pair.split("=", 2); - if (key !== encodedName) searchPieces.push(pair); - } - if (encodedValue) searchPieces.push(`${encodedName}=${encodedValue}`); - urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; - return urlParsed.toString(); - } - /** - * Get URL parameter by name. - * - * @param url - - * @param name - - */ - function getURLParameter(url$1, name) { - var _a$2; - const urlParsed = new URL(url$1); - return (_a$2 = urlParsed.searchParams.get(name)) !== null && _a$2 !== void 0 ? _a$2 : void 0; - } - /** - * Set URL host. - * - * @param url - Source URL string - * @param host - New host string - * @returns An updated URL string - */ - function setURLHost(url$1, host) { - const urlParsed = new URL(url$1); - urlParsed.hostname = host; - return urlParsed.toString(); - } - /** - * Get URL path from an URL string. - * - * @param url - Source URL string - */ - function getURLPath(url$1) { - try { - const urlParsed = new URL(url$1); - return urlParsed.pathname; - } catch (e) { - return void 0; - } - } - /** - * Get URL scheme from an URL string. - * - * @param url - Source URL string - */ - function getURLScheme(url$1) { - try { - const urlParsed = new URL(url$1); - return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; - } catch (e) { - return void 0; - } - } - /** - * Get URL path and query from an URL string. - * - * @param url - Source URL string - */ - function getURLPathAndQuery(url$1) { - const urlParsed = new URL(url$1); - const pathString = urlParsed.pathname; - if (!pathString) throw new RangeError("Invalid url without valid path."); - let queryString = urlParsed.search || ""; - queryString = queryString.trim(); - if (queryString !== "") queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; - return `${pathString}${queryString}`; - } - /** - * Get URL query key value pairs from an URL string. - * - * @param url - - */ - function getURLQueries(url$1) { - let queryString = new URL(url$1).search; - if (!queryString) return {}; - queryString = queryString.trim(); - queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; - let querySubStrings = queryString.split("&"); - querySubStrings = querySubStrings.filter((value) => { - const indexOfEqual = value.indexOf("="); - const lastIndexOfEqual = value.lastIndexOf("="); - return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; - }); - const queries = {}; - for (const querySubString of querySubStrings) { - const splitResults = querySubString.split("="); - const key = splitResults[0]; - const value = splitResults[1]; - queries[key] = value; - } - return queries; - } - /** - * Append a string to URL query. - * - * @param url - Source URL string. - * @param queryParts - String to be appended to the URL query. - * @returns An updated URL string. - */ - function appendToURLQuery(url$1, queryParts) { - const urlParsed = new URL(url$1); - let query = urlParsed.search; - if (query) query += "&" + queryParts; - else query = queryParts; - urlParsed.search = query; - return urlParsed.toString(); - } - /** - * Rounds a date off to seconds. - * - * @param date - - * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; - * If false, YYYY-MM-DDThh:mm:ssZ will be returned. - * @returns Date string in ISO8061 format, with or without 7 milliseconds component - */ - function truncatedISO8061Date(date, withMilliseconds = true) { - const dateString = date.toISOString(); - return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; - } - /** - * Base64 encode. - * - * @param content - - */ - function base64encode$1(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); - } - /** - * Generate a 64 bytes base64 block ID string. - * - * @param blockIndex - - */ - function generateBlockID(blockIDPrefix, blockIndex) { - const maxSourceStringLength = 48; - const maxBlockIndexLength = 6; - const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; - if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); - const res = blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); - return base64encode$1(res); - } - /** - * Delay specified time interval. - * - * @param timeInMs - - * @param aborter - - * @param abortError - - */ - async function delay$1(timeInMs, aborter, abortError) { - return new Promise((resolve, reject) => { - let timeout; - const abortHandler = () => { - if (timeout !== void 0) clearTimeout(timeout); - reject(abortError); - }; - const resolveHandler = () => { - if (aborter !== void 0) aborter.removeEventListener("abort", abortHandler); - resolve(); - }; - timeout = setTimeout(resolveHandler, timeInMs); - if (aborter !== void 0) aborter.addEventListener("abort", abortHandler); - }); - } - /** - * String.prototype.padStart() - * - * @param currentString - - * @param targetLength - - * @param padString - - */ - function padStart(currentString, targetLength, padString = " ") { - if (String.prototype.padStart) return currentString.padStart(targetLength, padString); - padString = padString || " "; - if (currentString.length > targetLength) return currentString; - else { - targetLength = targetLength - currentString.length; - if (targetLength > padString.length) padString += padString.repeat(targetLength / padString.length); - return padString.slice(0, targetLength) + currentString; - } - } - /** - * If two strings are equal when compared case insensitive. - * - * @param str1 - - * @param str2 - - */ - function iEqual(str1, str2) { - return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); - } - /** - * Extracts account name from the url - * @param url - url to extract the account name from - * @returns with the account name - */ - function getAccountNameFromUrl(url$1) { - const parsedUrl = new URL(url$1); - let accountName; - try { - if (parsedUrl.hostname.split(".")[1] === "blob") accountName = parsedUrl.hostname.split(".")[0]; - else if (isIpEndpointStyle(parsedUrl)) accountName = parsedUrl.pathname.split("/")[1]; - else accountName = ""; - return accountName; - } catch (error) { - throw new Error("Unable to extract accountName with provided information."); - } - } - function isIpEndpointStyle(parsedUrl) { - const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); - } - /** - * Convert Tags to encoded string. - * - * @param tags - - */ - function toBlobTagsString(tags$1) { - if (tags$1 === void 0) return void 0; - const tagPairs = []; - for (const key in tags$1) if (Object.prototype.hasOwnProperty.call(tags$1, key)) { - const value = tags$1[key]; - tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); - } - return tagPairs.join("&"); - } - /** - * Convert Tags type to BlobTags. - * - * @param tags - - */ - function toBlobTags(tags$1) { - if (tags$1 === void 0) return void 0; - const res = { blobTagSet: [] }; - for (const key in tags$1) if (Object.prototype.hasOwnProperty.call(tags$1, key)) { - const value = tags$1[key]; - res.blobTagSet.push({ - key, - value - }); - } - return res; - } - /** - * Covert BlobTags to Tags type. - * - * @param tags - - */ - function toTags(tags$1) { - if (tags$1 === void 0) return void 0; - const res = {}; - for (const blobTag of tags$1.blobTagSet) res[blobTag.key] = blobTag.value; - return res; - } - /** - * Convert BlobQueryTextConfiguration to QuerySerialization type. - * - * @param textConfiguration - - */ - function toQuerySerialization(textConfiguration) { - if (textConfiguration === void 0) return void 0; - switch (textConfiguration.kind) { - case "csv": return { format: { - type: "delimited", - delimitedTextConfiguration: { - columnSeparator: textConfiguration.columnSeparator || ",", - fieldQuote: textConfiguration.fieldQuote || "", - recordSeparator: textConfiguration.recordSeparator, - escapeChar: textConfiguration.escapeCharacter || "", - headersPresent: textConfiguration.hasHeaders || false - } - } }; - case "json": return { format: { - type: "json", - jsonTextConfiguration: { recordSeparator: textConfiguration.recordSeparator } - } }; - case "arrow": return { format: { - type: "arrow", - arrowConfiguration: { schema: textConfiguration.schema } - } }; - case "parquet": return { format: { type: "parquet" } }; - default: throw Error("Invalid BlobQueryTextConfiguration."); - } - } - function parseObjectReplicationRecord(objectReplicationRecord) { - if (!objectReplicationRecord) return void 0; - if ("policy-id" in objectReplicationRecord) return void 0; - const orProperties = []; - for (const key in objectReplicationRecord) { - const ids = key.split("_"); - const policyPrefix = "or-"; - if (ids[0].startsWith(policyPrefix)) ids[0] = ids[0].substring(policyPrefix.length); - const rule = { - ruleId: ids[1], - replicationStatus: objectReplicationRecord[key] - }; - const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); - if (policyIndex > -1) orProperties[policyIndex].rules.push(rule); - else orProperties.push({ - policyId: ids[0], - rules: [rule] - }); - } - return orProperties; - } - function httpAuthorizationToString(httpAuthorization) { - return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; - } - function BlobNameToString(name) { - if (name.encoded) return decodeURIComponent(name.content); - else return name.content; - } - function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) } }); - } - function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a$2; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a$2 = internalResponse.segment.blobPrefixes) === null || _a$2 === void 0 ? void 0 : _a$2.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); - } - function* ExtractPageRangeInfoItems(getPageRangesSegment) { - let pageRange = []; - let clearRange = []; - if (getPageRangesSegment.pageRange) pageRange = getPageRangesSegment.pageRange; - if (getPageRangesSegment.clearRange) clearRange = getPageRangesSegment.clearRange; - let pageRangeIndex = 0; - let clearRangeIndex = 0; - while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { - yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false - }; - ++pageRangeIndex; - } else { - yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true - }; - ++clearRangeIndex; - } - for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false - }; - for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true - }; - } - /** - * Escape the blobName but keep path separator ('/'). - */ - function EscapePath(blobName) { - const split = blobName.split("/"); - for (let i = 0; i < split.length; i++) split[i] = encodeURIComponent(split[i]); - return split.join("/"); - } - /** - * A typesafe helper for ensuring that a given response object has - * the original _response attached. - * @param response - A response object from calling a client operation - * @returns The same object, but with known _response property - */ - function assertResponse(response) { - if (`_response` in response) return response; - throw new TypeError(`Unexpected response object ${response}`); - } - /** - * RetryPolicy types. - */ - exports.StorageRetryPolicyType = void 0; - (function(StorageRetryPolicyType$1) { - /** - * Exponential retry. Retry time delay grows exponentially. - */ - StorageRetryPolicyType$1[StorageRetryPolicyType$1["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - /** - * Linear retry. Retry time delay grows linearly. - */ - StorageRetryPolicyType$1[StorageRetryPolicyType$1["FIXED"] = 1] = "FIXED"; - })(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {})); - const DEFAULT_RETRY_OPTIONS$1 = { - maxRetryDelayInMs: 120 * 1e3, - maxTries: 4, - retryDelayInMs: 4 * 1e3, - retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL, - secondaryHost: "", - tryTimeoutInMs: void 0 - }; - const RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - /** - * Retry policy with exponential retry and linear retry implemented. - */ - var StorageRetryPolicy = class extends BaseRequestPolicy { - /** - * Creates an instance of RetryPolicy. - * - * @param nextPolicy - - * @param options - - * @param retryOptions - - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { - super(nextPolicy, options); - this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost - }; - } - /** - * Sends request. - * - * @param request - - */ - async sendRequest(request) { - return this.attemptSendRequest(request, false, 1); - } - /** - * Decide and perform next retry. Won't mutate request parameter. - * - * @param request - - * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then - * the resource was not found. This may be due to replication delay. So, in this - * case, we'll never try the secondary again for this operation. - * @param attempt - How many retries has been attempted to performed, starting from 1, which includes - * the attempt will be performed by this method call. - */ - async attemptSendRequest(request, secondaryHas404, attempt) { - const newRequest = request.clone(); - const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; - if (!isPrimaryRetry) newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); - if (this.retryOptions.tryTimeoutInMs) newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); - let response; - try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); - response = await this._nextPolicy.sendRequest(newRequest); - if (!this.shouldRetry(isPrimaryRetry, attempt, response)) return response; - secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; - } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); - if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) throw err; - } - await this.delay(isPrimaryRetry, attempt, request.abortSignal); - return this.attemptSendRequest(request, secondaryHas404, ++attempt); - } - /** - * Decide whether to retry according to last HTTP response and retry counters. - * - * @param isPrimaryRetry - - * @param attempt - - * @param response - - * @param err - - */ - shouldRetry(isPrimaryRetry, attempt, response, err) { - if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); - return false; - } - const retriableErrors$1 = [ - "ETIMEDOUT", - "ESOCKETTIMEDOUT", - "ECONNREFUSED", - "ECONNRESET", - "ENOENT", - "ENOTFOUND", - "TIMEOUT", - "EPIPE", - "REQUEST_SEND_ERROR" - ]; - if (err) { - for (const retriableError of retriableErrors$1) if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); - return true; - } - } - if (response || err) { - const statusCode = response ? response.status : err ? err.statusCode : 0; - if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); - return true; - } - if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); - return true; - } - } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); - return true; - } - return false; - } - /** - * Delay a calculated time between retries. - * - * @param isPrimaryRetry - - * @param attempt - - * @param abortSignal - - */ - async delay(isPrimaryRetry, attempt, abortSignal$1) { - let delayTimeInMs = 0; - if (isPrimaryRetry) switch (this.retryOptions.retryPolicyType) { - case exports.StorageRetryPolicyType.EXPONENTIAL: - delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); - break; - case exports.StorageRetryPolicyType.FIXED: - delayTimeInMs = this.retryOptions.retryDelayInMs; - break; - } - else delayTimeInMs = Math.random() * 1e3; - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay$1(delayTimeInMs, abortSignal$1, RETRY_ABORT_ERROR$1); - } - }; - /** - * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. - */ - var StorageRetryPolicyFactory = class { - /** - * Creates an instance of StorageRetryPolicyFactory. - * @param retryOptions - - */ - constructor(retryOptions) { - this.retryOptions = retryOptions; - } - /** - * Creates a StorageRetryPolicy object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); - } - }; - /** - * Credential policy used to sign HTTP(S) requests before sending. This is an - * abstract class. - */ - var CredentialPolicy = class extends BaseRequestPolicy { - /** - * Sends out request. - * - * @param request - - */ - sendRequest(request) { - return this._nextPolicy.sendRequest(this.signRequest(request)); - } - /** - * Child classes must implement this method with request signing. This method - * will be executed in {@link sendRequest}. - * - * @param request - - */ - signRequest(request) { - return request; + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports.AnonymousCredential = AnonymousCredential; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.compareHeader = compareHeader; const table_lv0 = new Uint32Array([ 0, 0, @@ -15687,10 +15012,25 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } return false; } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageSharedKeyCredentialPolicy = void 0; + const constants_js_1 = require_constants$2(); + const utils_common_js_1 = require_utils_common$2(); + const CredentialPolicy_js_1 = require_CredentialPolicy(); + const SharedKeyComparator_js_1 = require_SharedKeyComparator(); /** * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. */ - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -15707,29 +15047,29 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); - if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -15737,7 +15077,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) return ""; - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") return ""; + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") return ""; return value; } /** @@ -15755,10 +15095,10 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) return false; @@ -15776,10 +15116,10 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param request - */ getCanonicalizedResourceString(request) { - const path$13 = getURLPath(request.url) || "/"; + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path$13}`; - const queries = getURLQueries(request.url); + canonicalizedResourceString += `/${this.factory.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -15794,27 +15134,31 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return canonicalizedResourceString; } }; - /** - * Credential is an abstract class for Azure Storage HTTP requests signing. This - * class will host an credentialPolicyCreator factory which generates CredentialPolicy. - */ - var Credential = class { - /** - * Creates a RequestPolicy object. - * - * @param _nextPolicy - - * @param _options - - */ - create(_nextPolicy, _options) { - throw new Error("Method should be implemented in children classes."); - } - }; + exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageSharedKeyCredential = void 0; + const node_crypto_1$2 = __require("node:crypto"); + const StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + const Credential_js_1 = require_Credential(); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * * StorageSharedKeyCredential for account key authorization of Azure Storage service. */ - var StorageSharedKeyCredential = class extends Credential { + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -15832,7 +15176,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -15840,88 +15184,351 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto$1.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1$2.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; + exports.StorageSharedKeyCredential = StorageSharedKeyCredential; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logger = void 0; + const logger_1 = require_commonjs$13(); /** - * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources - * or for use with Shared Access Signatures (SAS). + * The `@azure/logger` configuration for this package. + */ + exports.logger = (0, logger_1.createClientLogger)("storage-common"); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageRetryPolicyType = void 0; + /** + * RetryPolicy types. */ - var AnonymousCredentialPolicy = class extends CredentialPolicy { + var StorageRetryPolicyType; + (function(StorageRetryPolicyType) { /** - * Creates an instance of AnonymousCredentialPolicy. + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; + })(StorageRetryPolicyType || (exports.StorageRetryPolicyType = StorageRetryPolicyType = {})); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageRetryPolicy = void 0; + exports.NewRetryPolicyFactory = NewRetryPolicyFactory; + const abort_controller_1 = require_commonjs$12(); + const RequestPolicy_js_1 = require_RequestPolicy(); + const constants_js_1 = require_constants$2(); + const utils_common_js_1 = require_utils_common$2(); + const log_js_1 = require_log(); + const StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + /** + * A factory method used to generated a RetryPolicy factory. + * + * @param retryOptions - + */ + function NewRetryPolicyFactory(retryOptions) { + return { create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } }; + } + const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + }; + const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + /** + * Retry policy with exponential retry and linear retry implemented. + */ + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * * @param nextPolicy - * @param options - + * @param retryOptions - */ - constructor(nextPolicy, options) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + if (this.retryOptions.tryTimeoutInMs) newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) return response; + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) throw err; + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + if (err) { + for (const retriableError of retriableErrors) if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": return true; + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + else delayTimeInMs = Math.random() * 1e3; + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports.StorageRetryPolicy = StorageRetryPolicy; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageRetryPolicyFactory = exports.NewRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0; + const StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports, "StorageRetryPolicy", { + enumerable: true, + get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } + }); + Object.defineProperty(exports, "NewRetryPolicyFactory", { + enumerable: true, + get: function() { + return StorageRetryPolicy_js_1.NewRetryPolicyFactory; + } + }); + const StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports, "StorageRetryPolicyType", { + enumerable: true, + get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } + }); /** - * AnonymousCredential provides a credentialPolicyCreator member used to create - * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with - * HTTP(S) requests that read public resources or for use with Shared Access - * Signatures (SAS). + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. */ - var AnonymousCredential = class extends Credential { + var StorageRetryPolicyFactory = class { + retryOptions; /** - * Creates an {@link AnonymousCredentialPolicy} object. + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - let _defaultHttpClient; - function getCachedDefaultHttpClient() { - if (!_defaultHttpClient) _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); - return _defaultHttpClient; - } + exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.storageBrowserPolicyName = void 0; + exports.storageBrowserPolicy = storageBrowserPolicy; + const core_util_1 = require_commonjs$11(); + const constants_js_1 = require_constants$2(); + const utils_common_js_1 = require_utils_common$2(); /** * The programmatic identifier of the StorageBrowserPolicy. */ - const storageBrowserPolicyName = "storageBrowserPolicy"; + exports.storageBrowserPolicyName = "storageBrowserPolicy"; /** * storageBrowserPolicy is a policy used to prevent browsers from caching requests * and to remove cookies and explicit content-length headers. */ function storageBrowserPolicy() { return { - name: storageBrowserPolicyName, + name: exports.storageBrowserPolicyName, async sendRequest(request, next) { - if (coreUtil.isNode) return next(request); - if (request.method === "GET" || request.method === "HEAD") request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); + if (core_util_1.isNodeLike) return next(request); + if (request.method === "GET" || request.method === "HEAD") request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); return next(request); } }; } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.storageCorrectContentLengthPolicyName = void 0; + exports.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + const constants_js_1 = require_constants$2(); /** - * Name of the {@link storageRetryPolicy} + * The programmatic identifier of the storageCorrectContentLengthPolicy. */ - const storageRetryPolicyName = "storageRetryPolicy"; + exports.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; /** - * RetryPolicy types. + * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. */ - var StorageRetryPolicyType; - (function(StorageRetryPolicyType$1) { - /** - * Exponential retry. Retry time delay grows exponentially. - */ - StorageRetryPolicyType$1[StorageRetryPolicyType$1["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - /** - * Linear retry. Retry time delay grows linearly. - */ - StorageRetryPolicyType$1[StorageRetryPolicyType$1["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + return { + name: exports.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.storageRetryPolicyName = void 0; + exports.storageRetryPolicy = storageRetryPolicy; + const abort_controller_1 = require_commonjs$12(); + const core_rest_pipeline_1 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); + const StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + const constants_js_1 = require_constants$2(); + const utils_common_js_1 = require_utils_common$2(); + const log_js_1 = require_log(); + /** + * Name of the {@link storageRetryPolicy} + */ + exports.storageRetryPolicyName = "storageRetryPolicy"; const DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 }; @@ -15936,67 +15543,75 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. "EPIPE", "REQUEST_SEND_ERROR" ]; - const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); /** * Retry policy with exponential retry and linear retry implemented. */ function storageRetryPolicy(options = {}) { - var _a$2, _b$1, _c$1, _d$1, _e, _f; - const retryPolicyType = (_a$2 = options.retryPolicyType) !== null && _a$2 !== void 0 ? _a$2 : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b$1 = options.maxTries) !== null && _b$1 !== void 0 ? _b$1 : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c$1 = options.retryDelayInMs) !== null && _c$1 !== void 0 ? _c$1 : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d$1 = options.maxRetryDelayInMs) !== null && _d$1 !== void 0 ? _d$1 : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error }) { - var _a$3, _b$2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error) { for (const retriableError of retriableErrors) if (error.name.toUpperCase().includes(retriableError) || error.message.toUpperCase().includes(retriableError) || error.code && error.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } - if ((error === null || error === void 0 ? void 0 : error.code) === "PARSE_ERROR" && (error === null || error === void 0 ? void 0 : error.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error?.code === "PARSE_ERROR" && error?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error) { - const statusCode = (_b$2 = (_a$3 = response === null || response === void 0 ? void 0 : response.status) !== null && _a$3 !== void 0 ? _a$3 : error === null || error === void 0 ? void 0 : error.statusCode) !== null && _b$2 !== void 0 ? _b$2 : 0; + const statusCode = response?.status ?? error?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": return true; + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } else delayTimeInMs = Math.random() * 1e3; - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports.storageRetryPolicyName, async sendRequest(request, next) { - if (tryTimeoutInMs) request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + if (tryTimeoutInMs) request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -16012,15 +15627,15 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. response = void 0; error = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } @@ -16030,50 +15645,62 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. response, error }); - if (retryAgain) await delay$1(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + if (retryAgain) await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); attempt++; } if (response) return response; - throw error !== null && error !== void 0 ? error : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.storageSharedKeyCredentialPolicyName = void 0; + exports.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + const node_crypto_1$1 = __require("node:crypto"); + const constants_js_1 = require_constants$2(); + const utils_common_js_1 = require_utils_common$2(); + const SharedKeyComparator_js_1 = require_SharedKeyComparator(); /** * The programmatic identifier of the storageSharedKeyCredentialPolicy. */ - const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + exports.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; /** * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. */ function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); - if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto$1.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1$1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } /** * Retrieve header value according to shared key sign rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key */ function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) return ""; - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") return ""; + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") return ""; return value; } /** @@ -16090,12 +15717,12 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. */ function getCanonicalizedHeadersString(request) { let headersArray = []; - for (const [name, value] of request.headers) if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) headersArray.push({ + for (const [name, value] of request.headers) if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) headersArray.push({ name, value }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) return false; @@ -16108,10 +15735,10 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path$13 = getURLPath(request.url) || "/"; + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path$13}`; - const queries = getURLQueries(request.url); + canonicalizedResourceString += `/${options.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -16126,79 +15753,379 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.storageRequestFailureDetailsParserPolicyName = void 0; + exports.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; /** - * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: - * - * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. - * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL - * thus avoid the browser cache. - * - * 2. Remove cookie header for security + * The programmatic identifier of the StorageRequestFailureDetailsParserPolicy. + */ + exports.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + /** + * StorageRequestFailureDetailsParserPolicy + */ + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + return await next(request); + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + throw err; + } + } + }; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.UserDelegationKeyCredential = void 0; + const node_crypto_1 = __require("node:crypto"); + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * 3. Remove content-length header to avoid browsers warning + * UserDelegationKeyCredential is only used for generation of user delegation SAS. + * @see https://learn.microsoft.com/rest/api/storageservices/create-user-delegation-sas */ - var StorageBrowserPolicy = class extends BaseRequestPolicy { + var UserDelegationKeyCredential = class { /** - * Creates an instance of StorageBrowserPolicy. - * @param nextPolicy - - * @param options - + * Azure Storage account name; readonly. */ - constructor(nextPolicy, options) { - super(nextPolicy, options); - } + accountName; /** - * Sends out request. - * - * @param request - + * Azure Storage user delegation key; readonly. */ - async sendRequest(request) { - if (coreUtil.isNode) return this._nextPolicy.sendRequest(request); - if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); - return this._nextPolicy.sendRequest(request); + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; + /** + * Creates an instance of UserDelegationKeyCredential. + * @param accountName - + * @param userDelegationKey - + */ + constructor(accountName, userDelegationKey) { + this.accountName = accountName; + this.userDelegationKey = userDelegationKey; + this.key = Buffer.from(userDelegationKey.value, "base64"); } - }; - /** - * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. - */ - var StorageBrowserPolicyFactory = class { /** - * Creates a StorageBrowserPolicyFactory object. + * Generates a hash signature for an HTTP request or for a SAS. * - * @param nextPolicy - - * @param options - + * @param stringToSign - */ - create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports.UserDelegationKeyCredential = UserDelegationKeyCredential; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-common@12.3.0/node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs$4 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BaseRequestPolicy = exports.getCachedDefaultHttpClient = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports); + var cache_js_1 = require_cache$2(); + Object.defineProperty(exports, "getCachedDefaultHttpClient", { + enumerable: true, + get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } + }); + tslib_1.__exportStar(require_interfaces(), exports); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports); + tslib_1.__exportStar(require_AnonymousCredential(), exports); + tslib_1.__exportStar(require_Credential(), exports); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports, "BaseRequestPolicy", { + enumerable: true, + get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } + }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports); + tslib_1.__exportStar(require_CredentialPolicy(), exports); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports); + tslib_1.__exportStar(require_UserDelegationKeyCredential(), exports); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PathStylePorts = exports.BlobDoesNotUseCustomerSpecifiedEncryption = exports.BlobUsesCustomerSpecifiedEncryptionMsg = exports.StorageBlobLoggingAllowedQueryParameters = exports.StorageBlobLoggingAllowedHeaderNames = exports.DevelopmentConnectionString = exports.EncryptionAlgorithmAES25 = exports.HTTP_VERSION_1_1 = exports.HTTP_LINE_ENDING = exports.BATCH_MAX_PAYLOAD_IN_BYTES = exports.BATCH_MAX_REQUEST = exports.SIZE_1_MB = exports.ETagAny = exports.ETagNone = exports.HeaderConstants = exports.HTTPURLConnection = exports.URLConstants = exports.StorageOAuthScopes = exports.REQUEST_TIMEOUT = exports.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports.BLOCK_BLOB_MAX_BLOCKS = exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports.SERVICE_VERSION = exports.SDK_VERSION = void 0; + exports.SDK_VERSION = "12.31.0"; + exports.SERVICE_VERSION = "2026-02-06"; + exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports.REQUEST_TIMEOUT = 100 * 1e3; /** - * The programmatic identifier of the storageCorrectContentLengthPolicy. - */ - const storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; - /** - * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. + * The OAuth scope to use with Azure Storage. */ - function storageCorrectContentLengthPolicy() { - function correctContentLength(request) { - if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + exports.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports.URLConstants = { Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } }; + exports.HTTPURLConnection = { + HTTP_ACCEPTED: 202, + HTTP_CONFLICT: 409, + HTTP_NOT_FOUND: 404, + HTTP_PRECON_FAILED: 412, + HTTP_RANGE_NOT_SATISFIABLE: 416 + }; + exports.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports.ETagNone = ""; + exports.ETagAny = "*"; + exports.SIZE_1_MB = 1 * 1024 * 1024; + exports.BATCH_MAX_REQUEST = 256; + exports.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports.SIZE_1_MB; + exports.HTTP_LINE_ENDING = "\r\n"; + exports.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports.EncryptionAlgorithmAES25 = "AES256"; + exports.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports.StorageBlobLoggingAllowedHeaderNames = [ + "Access-Control-Allow-Origin", + "Cache-Control", + "Content-Length", + "Content-Type", + "Date", + "Request-Id", + "traceparent", + "Transfer-Encoding", + "User-Agent", + "x-ms-client-request-id", + "x-ms-date", + "x-ms-error-code", + "x-ms-request-id", + "x-ms-return-client-request-id", + "x-ms-version", + "Accept-Ranges", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-MD5", + "Content-Range", + "ETag", + "Last-Modified", + "Server", + "Vary", + "x-ms-content-crc64", + "x-ms-copy-action", + "x-ms-copy-completion-time", + "x-ms-copy-id", + "x-ms-copy-progress", + "x-ms-copy-status", + "x-ms-has-immutability-policy", + "x-ms-has-legal-hold", + "x-ms-lease-state", + "x-ms-lease-status", + "x-ms-range", + "x-ms-request-server-encrypted", + "x-ms-server-encrypted", + "x-ms-snapshot", + "x-ms-source-range", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "x-ms-access-tier", + "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", + "x-ms-account-kind", + "x-ms-archive-status", + "x-ms-blob-append-offset", + "x-ms-blob-cache-control", + "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", + "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", + "x-ms-blob-content-language", + "x-ms-blob-content-length", + "x-ms-blob-content-md5", + "x-ms-blob-content-type", + "x-ms-blob-public-access", + "x-ms-blob-sequence-number", + "x-ms-blob-type", + "x-ms-copy-destination-snapshot", + "x-ms-creation-time", + "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", + "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", + "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", + "x-ms-incremental-copy", + "x-ms-lease-action", + "x-ms-lease-break-period", + "x-ms-lease-duration", + "x-ms-lease-id", + "x-ms-lease-time", + "x-ms-page-write", + "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", + "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", + "x-ms-sku-name", + "x-ms-source-content-md5", + "x-ms-source-if-match", + "x-ms-source-if-modified-since", + "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", + "x-ms-tag-count", + "x-ms-encryption-key-sha256", + "x-ms-copy-source-error-code", + "x-ms-copy-source-status-code", + "x-ms-if-tags", + "x-ms-source-if-tags" + ]; + exports.StorageBlobLoggingAllowedQueryParameters = [ + "comp", + "maxresults", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "se", + "si", + "sip", + "sp", + "spr", + "sr", + "srt", + "ss", + "st", + "sv", + "include", + "marker", + "prefix", + "copyid", + "restype", + "blockid", + "blocklisttype", + "delimiter", + "prevsnapshot", + "ske", + "skoid", + "sks", + "skt", + "sktid", + "skv", + "snapshot" + ]; + exports.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Pipeline = exports.StorageOAuthScopes = void 0; + exports.isPipelineLike = isPipelineLike; + exports.newPipeline = newPipeline; + exports.getCoreClientOptions = getCoreClientOptions; + exports.getCredentialFromPipeline = getCredentialFromPipeline; + const core_http_compat_1 = require_commonjs$6(); + const core_rest_pipeline_1 = require_commonjs$9(); + const core_client_1 = require_commonjs$7(); + const core_xml_1 = require_commonjs$5(); + const core_auth_1 = require_commonjs$8(); + const log_js_1 = require_log$1(); + const storage_common_1 = require_commonjs$4(); + const constants_js_1 = require_constants$1(); + Object.defineProperty(exports, "StorageOAuthScopes", { + enumerable: true, + get: function() { + return constants_js_1.StorageOAuthScopes; } - return { - name: storageCorrectContentLengthPolicyName, - async sendRequest(request, next) { - correctContentLength(request); - return next(request); - } - }; - } + }); /** * A helper to decide if a given argument satisfies the Pipeline contract * @param pipeline - An argument that may be a Pipeline @@ -16218,6 +16145,14 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * customized Pipeline. */ var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -16241,6 +16176,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. }; } }; + exports.Pipeline = Pipeline; /** * Creates a new Pipeline object with Credential provided. * @@ -16249,7 +16185,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @returns A new Pipeline object. */ function newPipeline(credential, pipelineOptions = {}) { - if (!credential) credential = new AnonymousCredential(); + if (!credential) credential = new storage_common_1.AnonymousCredential(); const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; return pipeline; @@ -16271,90 +16207,91 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } } - return void 0; } function getCoreClientOptions(pipeline) { - var _a$2; - const _b$1 = pipeline.options, { httpClient: v1Client } = _b$1, restOptions = tslib.__rest(_b$1, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info }, userAgentOptions: { userAgentPrefix }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" } } }, deserializationOptions: { - parseXML: coreXml.parseXML, + parseXML: core_xml_1.parseXML, serializerOptions: { xml: { xmlCharKey: "#" } } } - })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, storage_common_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, storage_common_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, storage_common_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a$2 = restOptions.audience) !== null && _a$2 !== void 0 ? _a$2 : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - else if (credential instanceof StorageSharedKeyCredential) corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + else if (credential instanceof storage_common_1.StorageSharedKeyCredential) corePipeline.addPolicy((0, storage_common_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { + return { + ...restOptions, allowInsecureConnection: true, httpClient, pipeline: corePipeline - }); + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) return pipeline._credential; - let credential = new AnonymousCredential(); - for (const factory of pipeline.factories) if (coreAuth.isTokenCredential(factory.credential)) credential = factory.credential; + let credential = new storage_common_1.AnonymousCredential(); + for (const factory of pipeline.factories) if ((0, core_auth_1.isTokenCredential)(factory.credential)) credential = factory.credential; else if (isStorageSharedKeyCredential(factory)) return factory; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) return true; + if (factory instanceof storage_common_1.StorageSharedKeyCredential) return true; return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) return true; + if (factory instanceof storage_common_1.AnonymousCredential) return true; return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) return true; + if (factory instanceof storage_common_1.StorageBrowserPolicyFactory) return true; return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) return true; + if (factory instanceof storage_common_1.StorageRetryPolicyFactory) return true; return factory.constructor.name === "StorageRetryPolicyFactory"; } function isStorageTelemetryPolicyFactory(factory) { @@ -16373,26 +16310,296 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. "KeepAlivePolicy", "DeserializationPolicy" ]; - const mockHttpClient = { sendRequest: async (request) => { + const policyName = factory.create({ sendRequest: async (request) => { return { request, headers: request.headers.clone(), status: 500 }; - } }; - const mockRequestPolicyOptions$1 = { + } }, { log(_logLevel, _message) {}, shouldLog(_logLevel) { return false; } - }; - const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions$1); - const policyName = policyInstance.constructor.name; + }).constructor.name; return knownPolicies.some((knownPolicyName) => { return policyName.startsWith(knownPolicyName); }); } - const BlobServiceProperties = { +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.KnownStorageErrorCode = exports.KnownBlobExpiryOptions = exports.KnownFileShareTokenIntent = exports.KnownEncryptionAlgorithmType = void 0; + /** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType) { + /** AES256 */ + KnownEncryptionAlgorithmType["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + /** Known values of {@link FileShareTokenIntent} that the service accepts. */ + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent) { + /** Backup */ + KnownFileShareTokenIntent["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + /** Known values of {@link BlobExpiryOptions} that the service accepts. */ + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions) { + /** NeverExpire */ + KnownBlobExpiryOptions["NeverExpire"] = "NeverExpire"; + /** RelativeToCreation */ + KnownBlobExpiryOptions["RelativeToCreation"] = "RelativeToCreation"; + /** RelativeToNow */ + KnownBlobExpiryOptions["RelativeToNow"] = "RelativeToNow"; + /** Absolute */ + KnownBlobExpiryOptions["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + /** Known values of {@link StorageErrorCode} that the service accepts. */ + var KnownStorageErrorCode; + (function(KnownStorageErrorCode) { + /** AccountAlreadyExists */ + KnownStorageErrorCode["AccountAlreadyExists"] = "AccountAlreadyExists"; + /** AccountBeingCreated */ + KnownStorageErrorCode["AccountBeingCreated"] = "AccountBeingCreated"; + /** AccountIsDisabled */ + KnownStorageErrorCode["AccountIsDisabled"] = "AccountIsDisabled"; + /** AuthenticationFailed */ + KnownStorageErrorCode["AuthenticationFailed"] = "AuthenticationFailed"; + /** AuthorizationFailure */ + KnownStorageErrorCode["AuthorizationFailure"] = "AuthorizationFailure"; + /** ConditionHeadersNotSupported */ + KnownStorageErrorCode["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + /** ConditionNotMet */ + KnownStorageErrorCode["ConditionNotMet"] = "ConditionNotMet"; + /** EmptyMetadataKey */ + KnownStorageErrorCode["EmptyMetadataKey"] = "EmptyMetadataKey"; + /** InsufficientAccountPermissions */ + KnownStorageErrorCode["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + /** InternalError */ + KnownStorageErrorCode["InternalError"] = "InternalError"; + /** InvalidAuthenticationInfo */ + KnownStorageErrorCode["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + /** InvalidHeaderValue */ + KnownStorageErrorCode["InvalidHeaderValue"] = "InvalidHeaderValue"; + /** InvalidHttpVerb */ + KnownStorageErrorCode["InvalidHttpVerb"] = "InvalidHttpVerb"; + /** InvalidInput */ + KnownStorageErrorCode["InvalidInput"] = "InvalidInput"; + /** InvalidMd5 */ + KnownStorageErrorCode["InvalidMd5"] = "InvalidMd5"; + /** InvalidMetadata */ + KnownStorageErrorCode["InvalidMetadata"] = "InvalidMetadata"; + /** InvalidQueryParameterValue */ + KnownStorageErrorCode["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + /** InvalidRange */ + KnownStorageErrorCode["InvalidRange"] = "InvalidRange"; + /** InvalidResourceName */ + KnownStorageErrorCode["InvalidResourceName"] = "InvalidResourceName"; + /** InvalidUri */ + KnownStorageErrorCode["InvalidUri"] = "InvalidUri"; + /** InvalidXmlDocument */ + KnownStorageErrorCode["InvalidXmlDocument"] = "InvalidXmlDocument"; + /** InvalidXmlNodeValue */ + KnownStorageErrorCode["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + /** Md5Mismatch */ + KnownStorageErrorCode["Md5Mismatch"] = "Md5Mismatch"; + /** MetadataTooLarge */ + KnownStorageErrorCode["MetadataTooLarge"] = "MetadataTooLarge"; + /** MissingContentLengthHeader */ + KnownStorageErrorCode["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + /** MissingRequiredQueryParameter */ + KnownStorageErrorCode["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + /** MissingRequiredHeader */ + KnownStorageErrorCode["MissingRequiredHeader"] = "MissingRequiredHeader"; + /** MissingRequiredXmlNode */ + KnownStorageErrorCode["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + /** MultipleConditionHeadersNotSupported */ + KnownStorageErrorCode["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + /** OperationTimedOut */ + KnownStorageErrorCode["OperationTimedOut"] = "OperationTimedOut"; + /** OutOfRangeInput */ + KnownStorageErrorCode["OutOfRangeInput"] = "OutOfRangeInput"; + /** OutOfRangeQueryParameterValue */ + KnownStorageErrorCode["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + /** RequestBodyTooLarge */ + KnownStorageErrorCode["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + /** ResourceTypeMismatch */ + KnownStorageErrorCode["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + /** RequestUrlFailedToParse */ + KnownStorageErrorCode["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + /** ResourceAlreadyExists */ + KnownStorageErrorCode["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + /** ResourceNotFound */ + KnownStorageErrorCode["ResourceNotFound"] = "ResourceNotFound"; + /** ServerBusy */ + KnownStorageErrorCode["ServerBusy"] = "ServerBusy"; + /** UnsupportedHeader */ + KnownStorageErrorCode["UnsupportedHeader"] = "UnsupportedHeader"; + /** UnsupportedXmlNode */ + KnownStorageErrorCode["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + /** UnsupportedQueryParameter */ + KnownStorageErrorCode["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + /** UnsupportedHttpVerb */ + KnownStorageErrorCode["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + /** AppendPositionConditionNotMet */ + KnownStorageErrorCode["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + /** BlobAlreadyExists */ + KnownStorageErrorCode["BlobAlreadyExists"] = "BlobAlreadyExists"; + /** BlobImmutableDueToPolicy */ + KnownStorageErrorCode["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + /** BlobNotFound */ + KnownStorageErrorCode["BlobNotFound"] = "BlobNotFound"; + /** BlobOverwritten */ + KnownStorageErrorCode["BlobOverwritten"] = "BlobOverwritten"; + /** BlobTierInadequateForContentLength */ + KnownStorageErrorCode["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + /** BlobUsesCustomerSpecifiedEncryption */ + KnownStorageErrorCode["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + /** BlockCountExceedsLimit */ + KnownStorageErrorCode["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + /** BlockListTooLong */ + KnownStorageErrorCode["BlockListTooLong"] = "BlockListTooLong"; + /** CannotChangeToLowerTier */ + KnownStorageErrorCode["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + /** CannotVerifyCopySource */ + KnownStorageErrorCode["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + /** ContainerAlreadyExists */ + KnownStorageErrorCode["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + /** ContainerBeingDeleted */ + KnownStorageErrorCode["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + /** ContainerDisabled */ + KnownStorageErrorCode["ContainerDisabled"] = "ContainerDisabled"; + /** ContainerNotFound */ + KnownStorageErrorCode["ContainerNotFound"] = "ContainerNotFound"; + /** ContentLengthLargerThanTierLimit */ + KnownStorageErrorCode["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + /** CopyAcrossAccountsNotSupported */ + KnownStorageErrorCode["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + /** CopyIdMismatch */ + KnownStorageErrorCode["CopyIdMismatch"] = "CopyIdMismatch"; + /** FeatureVersionMismatch */ + KnownStorageErrorCode["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + /** IncrementalCopyBlobMismatch */ + KnownStorageErrorCode["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + /** IncrementalCopyOfEarlierVersionSnapshotNotAllowed */ + KnownStorageErrorCode["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + /** IncrementalCopySourceMustBeSnapshot */ + KnownStorageErrorCode["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + /** InfiniteLeaseDurationRequired */ + KnownStorageErrorCode["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + /** InvalidBlobOrBlock */ + KnownStorageErrorCode["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + /** InvalidBlobTier */ + KnownStorageErrorCode["InvalidBlobTier"] = "InvalidBlobTier"; + /** InvalidBlobType */ + KnownStorageErrorCode["InvalidBlobType"] = "InvalidBlobType"; + /** InvalidBlockId */ + KnownStorageErrorCode["InvalidBlockId"] = "InvalidBlockId"; + /** InvalidBlockList */ + KnownStorageErrorCode["InvalidBlockList"] = "InvalidBlockList"; + /** InvalidOperation */ + KnownStorageErrorCode["InvalidOperation"] = "InvalidOperation"; + /** InvalidPageRange */ + KnownStorageErrorCode["InvalidPageRange"] = "InvalidPageRange"; + /** InvalidSourceBlobType */ + KnownStorageErrorCode["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + /** InvalidSourceBlobUrl */ + KnownStorageErrorCode["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + /** InvalidVersionForPageBlobOperation */ + KnownStorageErrorCode["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + /** LeaseAlreadyPresent */ + KnownStorageErrorCode["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + /** LeaseAlreadyBroken */ + KnownStorageErrorCode["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + /** LeaseIdMismatchWithBlobOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + /** LeaseIdMismatchWithContainerOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + /** LeaseIdMismatchWithLeaseOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + /** LeaseIdMissing */ + KnownStorageErrorCode["LeaseIdMissing"] = "LeaseIdMissing"; + /** LeaseIsBreakingAndCannotBeAcquired */ + KnownStorageErrorCode["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + /** LeaseIsBreakingAndCannotBeChanged */ + KnownStorageErrorCode["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + /** LeaseIsBrokenAndCannotBeRenewed */ + KnownStorageErrorCode["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + /** LeaseLost */ + KnownStorageErrorCode["LeaseLost"] = "LeaseLost"; + /** LeaseNotPresentWithBlobOperation */ + KnownStorageErrorCode["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + /** LeaseNotPresentWithContainerOperation */ + KnownStorageErrorCode["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + /** LeaseNotPresentWithLeaseOperation */ + KnownStorageErrorCode["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + /** MaxBlobSizeConditionNotMet */ + KnownStorageErrorCode["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + /** NoAuthenticationInformation */ + KnownStorageErrorCode["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + /** NoPendingCopyOperation */ + KnownStorageErrorCode["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + /** OperationNotAllowedOnIncrementalCopyBlob */ + KnownStorageErrorCode["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + /** PendingCopyOperation */ + KnownStorageErrorCode["PendingCopyOperation"] = "PendingCopyOperation"; + /** PreviousSnapshotCannotBeNewer */ + KnownStorageErrorCode["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + /** PreviousSnapshotNotFound */ + KnownStorageErrorCode["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + /** PreviousSnapshotOperationNotSupported */ + KnownStorageErrorCode["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + /** SequenceNumberConditionNotMet */ + KnownStorageErrorCode["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + /** SequenceNumberIncrementTooLarge */ + KnownStorageErrorCode["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + /** SnapshotCountExceeded */ + KnownStorageErrorCode["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + /** SnapshotOperationRateExceeded */ + KnownStorageErrorCode["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + /** SnapshotsPresent */ + KnownStorageErrorCode["SnapshotsPresent"] = "SnapshotsPresent"; + /** SourceConditionNotMet */ + KnownStorageErrorCode["SourceConditionNotMet"] = "SourceConditionNotMet"; + /** SystemInUse */ + KnownStorageErrorCode["SystemInUse"] = "SystemInUse"; + /** TargetConditionNotMet */ + KnownStorageErrorCode["TargetConditionNotMet"] = "TargetConditionNotMet"; + /** UnauthorizedBlobOverwrite */ + KnownStorageErrorCode["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + /** BlobBeingRehydrated */ + KnownStorageErrorCode["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + /** BlobArchived */ + KnownStorageErrorCode["BlobArchived"] = "BlobArchived"; + /** BlobNotArchived */ + KnownStorageErrorCode["BlobNotArchived"] = "BlobNotArchived"; + /** AuthorizationSourceIPMismatch */ + KnownStorageErrorCode["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + /** AuthorizationProtocolMismatch */ + KnownStorageErrorCode["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + /** AuthorizationPermissionMismatch */ + KnownStorageErrorCode["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + /** AuthorizationServiceMismatch */ + KnownStorageErrorCode["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + /** AuthorizationResourceTypeMismatch */ + KnownStorageErrorCode["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + /** BlobAccessTierNotSupportedForAccountType */ + KnownStorageErrorCode["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports.KnownStorageErrorCode = KnownStorageErrorCode = {})); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ServiceGetUserDelegationKeyHeaders = exports.ServiceListContainersSegmentExceptionHeaders = exports.ServiceListContainersSegmentHeaders = exports.ServiceGetStatisticsExceptionHeaders = exports.ServiceGetStatisticsHeaders = exports.ServiceGetPropertiesExceptionHeaders = exports.ServiceGetPropertiesHeaders = exports.ServiceSetPropertiesExceptionHeaders = exports.ServiceSetPropertiesHeaders = exports.ArrowField = exports.ArrowConfiguration = exports.JsonTextConfiguration = exports.DelimitedTextConfiguration = exports.QueryFormat = exports.QuerySerialization = exports.QueryRequest = exports.ClearRange = exports.PageRange = exports.PageList = exports.Block = exports.BlockList = exports.BlockLookupList = exports.BlobPrefix = exports.BlobHierarchyListSegment = exports.ListBlobsHierarchySegmentResponse = exports.BlobPropertiesInternal = exports.BlobName = exports.BlobItemInternal = exports.BlobFlatListSegment = exports.ListBlobsFlatSegmentResponse = exports.AccessPolicy = exports.SignedIdentifier = exports.BlobTag = exports.BlobTags = exports.FilterBlobItem = exports.FilterBlobSegment = exports.UserDelegationKey = exports.KeyInfo = exports.ContainerProperties = exports.ContainerItem = exports.ListContainersSegmentResponse = exports.GeoReplication = exports.BlobServiceStatistics = exports.StorageError = exports.StaticWebsite = exports.CorsRule = exports.Metrics = exports.RetentionPolicy = exports.Logging = exports.BlobServiceProperties = void 0; + exports.BlobUndeleteHeaders = exports.BlobDeleteExceptionHeaders = exports.BlobDeleteHeaders = exports.BlobGetPropertiesExceptionHeaders = exports.BlobGetPropertiesHeaders = exports.BlobDownloadExceptionHeaders = exports.BlobDownloadHeaders = exports.ContainerGetAccountInfoExceptionHeaders = exports.ContainerGetAccountInfoHeaders = exports.ContainerListBlobHierarchySegmentExceptionHeaders = exports.ContainerListBlobHierarchySegmentHeaders = exports.ContainerListBlobFlatSegmentExceptionHeaders = exports.ContainerListBlobFlatSegmentHeaders = exports.ContainerChangeLeaseExceptionHeaders = exports.ContainerChangeLeaseHeaders = exports.ContainerBreakLeaseExceptionHeaders = exports.ContainerBreakLeaseHeaders = exports.ContainerRenewLeaseExceptionHeaders = exports.ContainerRenewLeaseHeaders = exports.ContainerReleaseLeaseExceptionHeaders = exports.ContainerReleaseLeaseHeaders = exports.ContainerAcquireLeaseExceptionHeaders = exports.ContainerAcquireLeaseHeaders = exports.ContainerFilterBlobsExceptionHeaders = exports.ContainerFilterBlobsHeaders = exports.ContainerSubmitBatchExceptionHeaders = exports.ContainerSubmitBatchHeaders = exports.ContainerRenameExceptionHeaders = exports.ContainerRenameHeaders = exports.ContainerRestoreExceptionHeaders = exports.ContainerRestoreHeaders = exports.ContainerSetAccessPolicyExceptionHeaders = exports.ContainerSetAccessPolicyHeaders = exports.ContainerGetAccessPolicyExceptionHeaders = exports.ContainerGetAccessPolicyHeaders = exports.ContainerSetMetadataExceptionHeaders = exports.ContainerSetMetadataHeaders = exports.ContainerDeleteExceptionHeaders = exports.ContainerDeleteHeaders = exports.ContainerGetPropertiesExceptionHeaders = exports.ContainerGetPropertiesHeaders = exports.ContainerCreateExceptionHeaders = exports.ContainerCreateHeaders = exports.ServiceFilterBlobsExceptionHeaders = exports.ServiceFilterBlobsHeaders = exports.ServiceSubmitBatchExceptionHeaders = exports.ServiceSubmitBatchHeaders = exports.ServiceGetAccountInfoExceptionHeaders = exports.ServiceGetAccountInfoHeaders = exports.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports.PageBlobGetPageRangesHeaders = exports.PageBlobUploadPagesFromURLExceptionHeaders = exports.PageBlobUploadPagesFromURLHeaders = exports.PageBlobClearPagesExceptionHeaders = exports.PageBlobClearPagesHeaders = exports.PageBlobUploadPagesExceptionHeaders = exports.PageBlobUploadPagesHeaders = exports.PageBlobCreateExceptionHeaders = exports.PageBlobCreateHeaders = exports.BlobSetTagsExceptionHeaders = exports.BlobSetTagsHeaders = exports.BlobGetTagsExceptionHeaders = exports.BlobGetTagsHeaders = exports.BlobQueryExceptionHeaders = exports.BlobQueryHeaders = exports.BlobGetAccountInfoExceptionHeaders = exports.BlobGetAccountInfoHeaders = exports.BlobSetTierExceptionHeaders = exports.BlobSetTierHeaders = exports.BlobAbortCopyFromURLExceptionHeaders = exports.BlobAbortCopyFromURLHeaders = exports.BlobCopyFromURLExceptionHeaders = exports.BlobCopyFromURLHeaders = exports.BlobStartCopyFromURLExceptionHeaders = exports.BlobStartCopyFromURLHeaders = exports.BlobCreateSnapshotExceptionHeaders = exports.BlobCreateSnapshotHeaders = exports.BlobBreakLeaseExceptionHeaders = exports.BlobBreakLeaseHeaders = exports.BlobChangeLeaseExceptionHeaders = exports.BlobChangeLeaseHeaders = exports.BlobRenewLeaseExceptionHeaders = exports.BlobRenewLeaseHeaders = exports.BlobReleaseLeaseExceptionHeaders = exports.BlobReleaseLeaseHeaders = exports.BlobAcquireLeaseExceptionHeaders = exports.BlobAcquireLeaseHeaders = exports.BlobSetMetadataExceptionHeaders = exports.BlobSetMetadataHeaders = exports.BlobSetLegalHoldExceptionHeaders = exports.BlobSetLegalHoldHeaders = exports.BlobDeleteImmutabilityPolicyExceptionHeaders = exports.BlobDeleteImmutabilityPolicyHeaders = exports.BlobSetImmutabilityPolicyExceptionHeaders = exports.BlobSetImmutabilityPolicyHeaders = exports.BlobSetHttpHeadersExceptionHeaders = exports.BlobSetHttpHeadersHeaders = exports.BlobSetExpiryExceptionHeaders = exports.BlobSetExpiryHeaders = exports.BlobUndeleteExceptionHeaders = void 0; + exports.BlockBlobGetBlockListExceptionHeaders = exports.BlockBlobGetBlockListHeaders = exports.BlockBlobCommitBlockListExceptionHeaders = exports.BlockBlobCommitBlockListHeaders = exports.BlockBlobStageBlockFromURLExceptionHeaders = exports.BlockBlobStageBlockFromURLHeaders = exports.BlockBlobStageBlockExceptionHeaders = exports.BlockBlobStageBlockHeaders = exports.BlockBlobPutBlobFromUrlExceptionHeaders = exports.BlockBlobPutBlobFromUrlHeaders = exports.BlockBlobUploadExceptionHeaders = exports.BlockBlobUploadHeaders = exports.AppendBlobSealExceptionHeaders = exports.AppendBlobSealHeaders = exports.AppendBlobAppendBlockFromUrlExceptionHeaders = exports.AppendBlobAppendBlockFromUrlHeaders = exports.AppendBlobAppendBlockExceptionHeaders = exports.AppendBlobAppendBlockHeaders = exports.AppendBlobCreateExceptionHeaders = exports.AppendBlobCreateHeaders = exports.PageBlobCopyIncrementalExceptionHeaders = exports.PageBlobCopyIncrementalHeaders = exports.PageBlobUpdateSequenceNumberExceptionHeaders = exports.PageBlobUpdateSequenceNumberHeaders = exports.PageBlobResizeExceptionHeaders = exports.PageBlobResizeHeaders = exports.PageBlobGetPageRangesDiffExceptionHeaders = exports.PageBlobGetPageRangesDiffHeaders = exports.PageBlobGetPageRangesExceptionHeaders = void 0; + exports.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -16460,7 +16667,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const Logging = { + exports.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -16501,7 +16708,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const RetentionPolicy = { + exports.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -16522,7 +16729,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const Metrics = { + exports.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -16555,7 +16762,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const CorsRule = { + exports.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -16595,7 +16802,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const StaticWebsite = { + exports.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -16625,7 +16832,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const StorageError = { + exports.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -16636,6 +16843,21 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. xmlName: "Message", type: { name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { name: "Number" } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { name: "String" } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { name: "String" } + }, code: { serializedName: "Code", xmlName: "Code", @@ -16649,7 +16871,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobServiceStatistics = { + exports.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -16665,7 +16887,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const GeoReplication = { + exports.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -16693,7 +16915,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ListContainersSegmentResponse = { + exports.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -16744,7 +16966,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerItem = { + exports.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -16786,7 +17008,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerProperties = { + exports.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -16880,7 +17102,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const KeyInfo = { + exports.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -16901,7 +17123,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const UserDelegationKey = { + exports.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -16952,7 +17174,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const FilterBlobSegment = { + exports.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -16994,7 +17216,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const FilterBlobItem = { + exports.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -17024,7 +17246,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobTags = { + exports.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -17046,7 +17268,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobTag = { + exports.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -17068,7 +17290,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const SignedIdentifier = { + exports.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -17092,7 +17314,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const AccessPolicy = { + exports.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -17116,7 +17338,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ListBlobsFlatSegmentResponse = { + exports.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -17168,7 +17390,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobFlatListSegment = { + exports.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -17189,7 +17411,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobItemInternal = { + exports.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -17266,7 +17488,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobName = { + exports.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -17287,7 +17509,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobPropertiesInternal = { + exports.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -17565,7 +17787,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ListBlobsHierarchySegmentResponse = { + exports.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -17622,7 +17844,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobHierarchyListSegment = { + exports.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -17657,7 +17879,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobPrefix = { + exports.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -17672,7 +17894,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlockLookupList = { + exports.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -17709,7 +17931,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlockList = { + exports.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -17744,7 +17966,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const Block = { + exports.Block = { serializedName: "Block", type: { name: "Composite", @@ -17765,7 +17987,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageList = { + exports.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -17803,7 +18025,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageRange = { + exports.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -17825,7 +18047,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ClearRange = { + exports.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -17847,7 +18069,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const QueryRequest = { + exports.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -17885,7 +18107,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const QuerySerialization = { + exports.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -17900,7 +18122,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const QueryFormat = { + exports.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -17955,7 +18177,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const DelimitedTextConfiguration = { + exports.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -17990,7 +18212,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const JsonTextConfiguration = { + exports.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -18003,7 +18225,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ArrowConfiguration = { + exports.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -18025,7 +18247,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ArrowField = { + exports.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -18056,7 +18278,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceSetPropertiesHeaders = { + exports.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -18085,7 +18307,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceSetPropertiesExceptionHeaders = { + exports.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -18097,7 +18319,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ServiceGetPropertiesHeaders = { + exports.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -18126,7 +18348,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceGetPropertiesExceptionHeaders = { + exports.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -18138,7 +18360,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ServiceGetStatisticsHeaders = { + exports.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -18172,7 +18394,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceGetStatisticsExceptionHeaders = { + exports.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -18184,7 +18406,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ServiceListContainersSegmentHeaders = { + exports.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -18213,7 +18435,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceListContainersSegmentExceptionHeaders = { + exports.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -18225,7 +18447,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ServiceGetUserDelegationKeyHeaders = { + exports.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -18259,7 +18481,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceGetUserDelegationKeyExceptionHeaders = { + exports.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -18271,7 +18493,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ServiceGetAccountInfoHeaders = { + exports.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -18338,7 +18560,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceGetAccountInfoExceptionHeaders = { + exports.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -18350,7 +18572,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ServiceSubmitBatchHeaders = { + exports.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -18384,7 +18606,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceSubmitBatchExceptionHeaders = { + exports.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -18396,7 +18618,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ServiceFilterBlobsHeaders = { + exports.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -18430,7 +18652,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ServiceFilterBlobsExceptionHeaders = { + exports.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -18442,7 +18664,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerCreateHeaders = { + exports.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -18486,7 +18708,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerCreateExceptionHeaders = { + exports.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -18498,7 +18720,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerGetPropertiesHeaders = { + exports.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -18614,7 +18836,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerGetPropertiesExceptionHeaders = { + exports.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -18626,7 +18848,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerDeleteHeaders = { + exports.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -18660,7 +18882,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerDeleteExceptionHeaders = { + exports.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -18672,7 +18894,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerSetMetadataHeaders = { + exports.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -18716,7 +18938,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerSetMetadataExceptionHeaders = { + exports.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -18728,7 +18950,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerGetAccessPolicyHeaders = { + exports.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -18780,7 +19002,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerGetAccessPolicyExceptionHeaders = { + exports.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -18792,7 +19014,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerSetAccessPolicyHeaders = { + exports.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -18836,7 +19058,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerSetAccessPolicyExceptionHeaders = { + exports.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -18848,7 +19070,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerRestoreHeaders = { + exports.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -18882,7 +19104,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerRestoreExceptionHeaders = { + exports.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -18894,7 +19116,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerRenameHeaders = { + exports.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -18928,7 +19150,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerRenameExceptionHeaders = { + exports.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -18940,7 +19162,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerSubmitBatchHeaders = { + exports.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -18964,7 +19186,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerSubmitBatchExceptionHeaders = { + exports.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -18976,7 +19198,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerFilterBlobsHeaders = { + exports.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -19005,7 +19227,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerFilterBlobsExceptionHeaders = { + exports.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -19017,7 +19239,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerAcquireLeaseHeaders = { + exports.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -19061,7 +19283,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerAcquireLeaseExceptionHeaders = { + exports.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -19073,7 +19295,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerReleaseLeaseHeaders = { + exports.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -19112,7 +19334,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerReleaseLeaseExceptionHeaders = { + exports.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -19124,7 +19346,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerRenewLeaseHeaders = { + exports.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -19168,7 +19390,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerRenewLeaseExceptionHeaders = { + exports.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -19180,7 +19402,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerBreakLeaseHeaders = { + exports.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -19224,7 +19446,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerBreakLeaseExceptionHeaders = { + exports.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -19236,7 +19458,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerChangeLeaseHeaders = { + exports.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -19280,7 +19502,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerChangeLeaseExceptionHeaders = { + exports.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -19292,7 +19514,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerListBlobFlatSegmentHeaders = { + exports.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -19331,7 +19553,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerListBlobFlatSegmentExceptionHeaders = { + exports.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -19343,7 +19565,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerListBlobHierarchySegmentHeaders = { + exports.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -19382,7 +19604,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerListBlobHierarchySegmentExceptionHeaders = { + exports.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -19394,7 +19616,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const ContainerGetAccountInfoHeaders = { + exports.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -19456,7 +19678,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const ContainerGetAccountInfoExceptionHeaders = { + exports.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -19468,7 +19690,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobDownloadHeaders = { + exports.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -19747,7 +19969,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobDownloadExceptionHeaders = { + exports.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -19759,7 +19981,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobGetPropertiesHeaders = { + exports.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -20066,7 +20288,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobGetPropertiesExceptionHeaders = { + exports.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -20078,7 +20300,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobDeleteHeaders = { + exports.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -20112,7 +20334,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobDeleteExceptionHeaders = { + exports.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -20124,7 +20346,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobUndeleteHeaders = { + exports.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -20158,7 +20380,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobUndeleteExceptionHeaders = { + exports.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -20170,7 +20392,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobSetExpiryHeaders = { + exports.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -20209,7 +20431,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobSetExpiryExceptionHeaders = { + exports.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -20221,7 +20443,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobSetHttpHeadersHeaders = { + exports.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -20270,7 +20492,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobSetHttpHeadersExceptionHeaders = { + exports.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -20282,7 +20504,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobSetImmutabilityPolicyHeaders = { + exports.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -20328,7 +20550,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobSetImmutabilityPolicyExceptionHeaders = { + exports.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -20340,7 +20562,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobDeleteImmutabilityPolicyHeaders = { + exports.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -20369,7 +20591,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -20381,7 +20603,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobSetLegalHoldHeaders = { + exports.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -20415,7 +20637,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobSetLegalHoldExceptionHeaders = { + exports.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -20427,7 +20649,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobSetMetadataHeaders = { + exports.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -20491,7 +20713,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobSetMetadataExceptionHeaders = { + exports.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -20503,7 +20725,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobAcquireLeaseHeaders = { + exports.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -20547,7 +20769,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobAcquireLeaseExceptionHeaders = { + exports.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -20559,7 +20781,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobReleaseLeaseHeaders = { + exports.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -20598,7 +20820,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobReleaseLeaseExceptionHeaders = { + exports.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -20610,7 +20832,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobRenewLeaseHeaders = { + exports.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -20654,7 +20876,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobRenewLeaseExceptionHeaders = { + exports.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -20666,7 +20888,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobChangeLeaseHeaders = { + exports.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -20710,7 +20932,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobChangeLeaseExceptionHeaders = { + exports.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -20722,7 +20944,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobBreakLeaseHeaders = { + exports.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -20766,7 +20988,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobBreakLeaseExceptionHeaders = { + exports.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -20778,7 +21000,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobCreateSnapshotHeaders = { + exports.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -20837,7 +21059,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobCreateSnapshotExceptionHeaders = { + exports.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -20849,7 +21071,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobStartCopyFromURLHeaders = { + exports.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -20916,19 +21138,31 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobStartCopyFromURLExceptionHeaders = { + exports.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", className: "BlobStartCopyFromURLExceptionHeaders", - modelProperties: { errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } } + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { name: "String" } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { name: "Number" } + } + } } }; - const BlobCopyFromURLHeaders = { + exports.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -21003,19 +21237,31 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobCopyFromURLExceptionHeaders = { + exports.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", className: "BlobCopyFromURLExceptionHeaders", - modelProperties: { errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } } + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { name: "String" } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { name: "Number" } + } + } } }; - const BlobAbortCopyFromURLHeaders = { + exports.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -21049,7 +21295,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobAbortCopyFromURLExceptionHeaders = { + exports.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -21061,7 +21307,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobSetTierHeaders = { + exports.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -21090,7 +21336,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobSetTierExceptionHeaders = { + exports.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -21102,7 +21348,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobGetAccountInfoHeaders = { + exports.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -21164,7 +21410,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobGetAccountInfoExceptionHeaders = { + exports.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -21176,7 +21422,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobQueryHeaders = { + exports.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -21389,7 +21635,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobQueryExceptionHeaders = { + exports.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -21401,7 +21647,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobGetTagsHeaders = { + exports.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -21435,7 +21681,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobGetTagsExceptionHeaders = { + exports.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -21447,7 +21693,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlobSetTagsHeaders = { + exports.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -21481,7 +21727,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlobSetTagsExceptionHeaders = { + exports.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -21493,7 +21739,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const PageBlobCreateHeaders = { + exports.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -21562,7 +21808,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageBlobCreateExceptionHeaders = { + exports.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -21574,7 +21820,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const PageBlobUploadPagesHeaders = { + exports.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -21605,163 +21851,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. xmlName: "x-ms-blob-sequence-number", type: { name: "Number" } }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { name: "String" } - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { name: "String" } - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { name: "String" } - }, - date: { - serializedName: "date", - xmlName: "date", - type: { name: "DateTimeRfc1123" } - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { name: "Boolean" } - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { name: "String" } - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { name: "String" } - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } - } - } - }; - const PageBlobUploadPagesExceptionHeaders = { - serializedName: "PageBlob_uploadPagesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesExceptionHeaders", - modelProperties: { errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } } - } - }; - const PageBlobClearPagesHeaders = { - serializedName: "PageBlob_clearPagesHeaders", - type: { - name: "Composite", - className: "PageBlobClearPagesHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { name: "String" } - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { name: "DateTimeRfc1123" } - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { name: "ByteArray" } - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { name: "ByteArray" } - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { name: "Number" } - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { name: "String" } - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { name: "String" } - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { name: "String" } - }, - date: { - serializedName: "date", - xmlName: "date", - type: { name: "DateTimeRfc1123" } - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } - } - } - }; - const PageBlobClearPagesExceptionHeaders = { - serializedName: "PageBlob_clearPagesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobClearPagesExceptionHeaders", - modelProperties: { errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } } - } - }; - const PageBlobUploadPagesFromURLHeaders = { - serializedName: "PageBlob_uploadPagesFromURLHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesFromURLHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { name: "String" } - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { name: "DateTimeRfc1123" } - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { name: "ByteArray" } - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { name: "ByteArray" } - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { name: "Number" } - }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, requestId: { serializedName: "x-ms-request-id", xmlName: "x-ms-request-id", @@ -21800,11 +21894,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageBlobUploadPagesFromURLExceptionHeaders = { - serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", + exports.PageBlobUploadPagesExceptionHeaders = { + serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", - className: "PageBlobUploadPagesFromURLExceptionHeaders", + className: "PageBlobUploadPagesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", @@ -21812,7 +21906,171 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const PageBlobGetPageRangesHeaders = { + exports.PageBlobClearPagesHeaders = { + serializedName: "PageBlob_clearPagesHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + exports.PageBlobClearPagesExceptionHeaders = { + serializedName: "PageBlob_clearPagesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + exports.PageBlobUploadPagesFromURLHeaders = { + serializedName: "PageBlob_uploadPagesFromURLHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + exports.PageBlobUploadPagesFromURLExceptionHeaders = { + serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { name: "String" } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { name: "Number" } + } + } + } + }; + exports.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -21861,7 +22119,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageBlobGetPageRangesExceptionHeaders = { + exports.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -21873,7 +22131,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const PageBlobGetPageRangesDiffHeaders = { + exports.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -21922,7 +22180,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageBlobGetPageRangesDiffExceptionHeaders = { + exports.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -21934,7 +22192,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const PageBlobResizeHeaders = { + exports.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -21983,7 +22241,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageBlobResizeExceptionHeaders = { + exports.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -21995,7 +22253,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const PageBlobUpdateSequenceNumberHeaders = { + exports.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -22044,7 +22302,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageBlobUpdateSequenceNumberExceptionHeaders = { + exports.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -22056,7 +22314,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const PageBlobCopyIncrementalHeaders = { + exports.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -22118,7 +22376,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const PageBlobCopyIncrementalExceptionHeaders = { + exports.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -22130,7 +22388,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const AppendBlobCreateHeaders = { + exports.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -22199,7 +22457,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const AppendBlobCreateExceptionHeaders = { + exports.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -22211,7 +22469,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const AppendBlobAppendBlockHeaders = { + exports.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -22290,7 +22548,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const AppendBlobAppendBlockExceptionHeaders = { + exports.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -22302,7 +22560,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const AppendBlobAppendBlockFromUrlHeaders = { + exports.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -22376,19 +22634,31 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", className: "AppendBlobAppendBlockFromUrlExceptionHeaders", - modelProperties: { errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } } + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { name: "String" } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { name: "Number" } + } + } } }; - const AppendBlobSealHeaders = { + exports.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -22432,7 +22702,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const AppendBlobSealExceptionHeaders = { + exports.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -22444,7 +22714,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlockBlobUploadHeaders = { + exports.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -22513,7 +22783,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlockBlobUploadExceptionHeaders = { + exports.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -22525,7 +22795,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlockBlobPutBlobFromUrlHeaders = { + exports.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -22594,19 +22864,31 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlockBlobPutBlobFromUrlExceptionHeaders = { + exports.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", className: "BlockBlobPutBlobFromUrlExceptionHeaders", - modelProperties: { errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } } + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { name: "String" } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { name: "Number" } + } + } } }; - const BlockBlobStageBlockHeaders = { + exports.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -22665,7 +22947,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlockBlobStageBlockExceptionHeaders = { + exports.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -22677,7 +22959,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlockBlobStageBlockFromURLHeaders = { + exports.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -22736,19 +23018,31 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlockBlobStageBlockFromURLExceptionHeaders = { + exports.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", className: "BlockBlobStageBlockFromURLExceptionHeaders", - modelProperties: { errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { name: "String" } - } } + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { name: "String" } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { name: "Number" } + } + } } }; - const BlockBlobCommitBlockListHeaders = { + exports.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -22822,7 +23116,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlockBlobCommitBlockListExceptionHeaders = { + exports.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -22834,7 +23128,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - const BlockBlobGetBlockListHeaders = { + exports.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -22888,7 +23182,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const BlockBlobGetBlockListExceptionHeaders = { + exports.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -22900,189 +23194,17 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - const contentType = { +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.action3 = exports.action2 = exports.leaseId1 = exports.action1 = exports.proposedLeaseId = exports.duration = exports.action = exports.comp10 = exports.sourceLeaseId = exports.sourceContainerName = exports.comp9 = exports.deletedContainerVersion = exports.deletedContainerName = exports.comp8 = exports.containerAcl = exports.comp7 = exports.comp6 = exports.ifUnmodifiedSince = exports.ifModifiedSince = exports.leaseId = exports.preventEncryptionScopeOverride = exports.defaultEncryptionScope = exports.access = exports.metadata = exports.restype2 = exports.where = exports.comp5 = exports.multipartContentType = exports.contentLength = exports.comp4 = exports.body = exports.restype1 = exports.comp3 = exports.keyInfo = exports.include = exports.maxPageSize = exports.marker = exports.prefix = exports.comp2 = exports.comp1 = exports.accept1 = exports.requestId = exports.version = exports.timeoutInSeconds = exports.comp = exports.restype = exports.url = exports.accept = exports.blobServiceProperties = exports.contentType = void 0; + exports.copySourceTags = exports.copySourceAuthorization = exports.sourceContentMD5 = exports.xMsRequiresSync = exports.legalHold1 = exports.sealBlob = exports.blobTagsString = exports.copySource = exports.sourceIfTags = exports.sourceIfNoneMatch = exports.sourceIfMatch = exports.sourceIfUnmodifiedSince = exports.sourceIfModifiedSince = exports.rehydratePriority = exports.tier = exports.comp14 = exports.encryptionScope = exports.legalHold = exports.comp13 = exports.immutabilityPolicyMode = exports.immutabilityPolicyExpiry = exports.comp12 = exports.blobContentDisposition = exports.blobContentLanguage = exports.blobContentEncoding = exports.blobContentMD5 = exports.blobContentType = exports.blobCacheControl = exports.expiresOn = exports.expiryOptions = exports.comp11 = exports.blobDeleteType = exports.deleteSnapshots = exports.ifTags = exports.ifNoneMatch = exports.ifMatch = exports.encryptionAlgorithm = exports.encryptionKeySha256 = exports.encryptionKey = exports.rangeGetContentCRC64 = exports.rangeGetContentMD5 = exports.range = exports.versionId = exports.snapshot = exports.delimiter = exports.startFrom = exports.include1 = exports.proposedLeaseId1 = exports.action4 = exports.breakPeriod = void 0; + exports.listType = exports.comp25 = exports.blocks = exports.blockId = exports.comp24 = exports.copySourceBlobProperties = exports.blobType2 = exports.comp23 = exports.sourceRange1 = exports.appendPosition = exports.maxSize = exports.comp22 = exports.blobType1 = exports.comp21 = exports.sequenceNumberAction = exports.prevSnapshotUrl = exports.prevsnapshot = exports.comp20 = exports.range1 = exports.sourceContentCrc64 = exports.sourceRange = exports.sourceUrl = exports.pageWrite1 = exports.ifSequenceNumberEqualTo = exports.ifSequenceNumberLessThan = exports.ifSequenceNumberLessThanOrEqualTo = exports.pageWrite = exports.comp19 = exports.accept2 = exports.body1 = exports.contentType1 = exports.blobSequenceNumber = exports.blobContentLength = exports.blobType = exports.transactionalContentCrc64 = exports.transactionalContentMD5 = exports.tags = exports.ifNoneMatch1 = exports.ifMatch1 = exports.ifUnmodifiedSince1 = exports.ifModifiedSince1 = exports.comp18 = exports.comp17 = exports.queryRequest = exports.tier1 = exports.comp16 = exports.copyId = exports.copyActionAbortConstant = exports.comp15 = exports.fileRequestIntent = void 0; + const mappers_js_1 = require_mappers(); + exports.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -23091,11 +23213,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobServiceProperties = { + exports.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - const accept = { + exports.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -23104,7 +23226,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const url = { + exports.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -23114,7 +23236,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. }, skipEncoding: true }; - const restype = { + exports.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -23123,7 +23245,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp = { + exports.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -23132,7 +23254,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const timeoutInSeconds = { + exports.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { InclusiveMinimum: 0 }, @@ -23141,16 +23263,16 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const version = { + exports.version = { parameterPath: "version", mapper: { - defaultValue: "2025-05-05", + defaultValue: "2026-02-06", isConstant: true, serializedName: "x-ms-version", type: { name: "String" } } }; - const requestId = { + exports.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -23158,7 +23280,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const accept1 = { + exports.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -23167,7 +23289,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp1 = { + exports.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -23176,7 +23298,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp2 = { + exports.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -23185,7 +23307,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const prefix = { + exports.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -23193,7 +23315,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const marker = { + exports.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -23201,7 +23323,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const maxPageSize = { + exports.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { InclusiveMinimum: 1 }, @@ -23210,7 +23332,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const include = { + exports.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -23230,11 +23352,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. }, collectionFormat: "CSV" }; - const keyInfo = { + exports.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - const comp3 = { + exports.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -23243,7 +23365,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const restype1 = { + exports.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -23252,7 +23374,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const body = { + exports.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -23261,7 +23383,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Stream" } } }; - const comp4 = { + exports.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -23270,7 +23392,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const contentLength = { + exports.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -23279,7 +23401,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const multipartContentType = { + exports.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -23288,7 +23410,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp5 = { + exports.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -23297,7 +23419,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const where = { + exports.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -23305,7 +23427,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const restype2 = { + exports.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -23314,7 +23436,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const metadata = { + exports.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -23326,7 +23448,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const access = { + exports.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -23337,7 +23459,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const defaultEncryptionScope = { + exports.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -23349,7 +23471,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const preventEncryptionScopeOverride = { + exports.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -23361,7 +23483,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Boolean" } } }; - const leaseId = { + exports.leaseId = { parameterPath: [ "options", "leaseAccessConditions", @@ -23373,7 +23495,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const ifModifiedSince = { + exports.ifModifiedSince = { parameterPath: [ "options", "modifiedAccessConditions", @@ -23385,7 +23507,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "DateTimeRfc1123" } } }; - const ifUnmodifiedSince = { + exports.ifUnmodifiedSince = { parameterPath: [ "options", "modifiedAccessConditions", @@ -23397,7 +23519,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "DateTimeRfc1123" } } }; - const comp6 = { + exports.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -23406,7 +23528,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp7 = { + exports.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -23415,7 +23537,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const containerAcl = { + exports.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -23431,7 +23553,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const comp8 = { + exports.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -23440,7 +23562,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const deletedContainerName = { + exports.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -23448,7 +23570,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const deletedContainerVersion = { + exports.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -23456,7 +23578,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp9 = { + exports.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -23465,7 +23587,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceContainerName = { + exports.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -23474,7 +23596,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceLeaseId = { + exports.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -23482,7 +23604,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp10 = { + exports.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -23491,7 +23613,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const action = { + exports.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -23500,7 +23622,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const duration = { + exports.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -23508,7 +23630,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const proposedLeaseId = { + exports.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -23516,7 +23638,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const action1 = { + exports.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -23525,7 +23647,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const leaseId1 = { + exports.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -23534,7 +23656,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const action2 = { + exports.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -23543,7 +23665,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const action3 = { + exports.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -23552,7 +23674,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const breakPeriod = { + exports.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -23560,7 +23682,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const action4 = { + exports.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -23569,7 +23691,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const proposedLeaseId1 = { + exports.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -23578,7 +23700,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const include1 = { + exports.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -23605,7 +23727,15 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. }, collectionFormat: "CSV" }; - const delimiter = { + exports.startFrom = { + parameterPath: ["options", "startFrom"], + mapper: { + serializedName: "startFrom", + xmlName: "startFrom", + type: { name: "String" } + } + }; + exports.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -23614,7 +23744,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const snapshot = { + exports.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -23622,7 +23752,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const versionId = { + exports.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -23630,7 +23760,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const range = { + exports.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -23638,7 +23768,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const rangeGetContentMD5 = { + exports.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -23646,7 +23776,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Boolean" } } }; - const rangeGetContentCRC64 = { + exports.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -23654,7 +23784,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Boolean" } } }; - const encryptionKey = { + exports.encryptionKey = { parameterPath: [ "options", "cpkInfo", @@ -23666,7 +23796,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const encryptionKeySha256 = { + exports.encryptionKeySha256 = { parameterPath: [ "options", "cpkInfo", @@ -23678,7 +23808,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const encryptionAlgorithm = { + exports.encryptionAlgorithm = { parameterPath: [ "options", "cpkInfo", @@ -23690,7 +23820,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const ifMatch = { + exports.ifMatch = { parameterPath: [ "options", "modifiedAccessConditions", @@ -23702,7 +23832,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const ifNoneMatch = { + exports.ifNoneMatch = { parameterPath: [ "options", "modifiedAccessConditions", @@ -23714,7 +23844,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const ifTags = { + exports.ifTags = { parameterPath: [ "options", "modifiedAccessConditions", @@ -23726,7 +23856,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const deleteSnapshots = { + exports.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -23737,7 +23867,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const blobDeleteType = { + exports.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -23745,7 +23875,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp11 = { + exports.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -23754,7 +23884,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const expiryOptions = { + exports.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -23763,7 +23893,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const expiresOn = { + exports.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -23771,7 +23901,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobCacheControl = { + exports.blobCacheControl = { parameterPath: [ "options", "blobHttpHeaders", @@ -23783,7 +23913,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobContentType = { + exports.blobContentType = { parameterPath: [ "options", "blobHttpHeaders", @@ -23795,7 +23925,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobContentMD5 = { + exports.blobContentMD5 = { parameterPath: [ "options", "blobHttpHeaders", @@ -23807,7 +23937,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "ByteArray" } } }; - const blobContentEncoding = { + exports.blobContentEncoding = { parameterPath: [ "options", "blobHttpHeaders", @@ -23819,7 +23949,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobContentLanguage = { + exports.blobContentLanguage = { parameterPath: [ "options", "blobHttpHeaders", @@ -23831,7 +23961,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobContentDisposition = { + exports.blobContentDisposition = { parameterPath: [ "options", "blobHttpHeaders", @@ -23843,7 +23973,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp12 = { + exports.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -23852,7 +23982,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const immutabilityPolicyExpiry = { + exports.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -23860,7 +23990,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "DateTimeRfc1123" } } }; - const immutabilityPolicyMode = { + exports.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -23875,7 +24005,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const comp13 = { + exports.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -23884,7 +24014,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const legalHold = { + exports.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -23893,7 +24023,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Boolean" } } }; - const encryptionScope = { + exports.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -23901,7 +24031,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp14 = { + exports.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -23910,7 +24040,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const tier = { + exports.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -23937,7 +24067,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const rehydratePriority = { + exports.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -23948,7 +24078,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const sourceIfModifiedSince = { + exports.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -23960,7 +24090,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "DateTimeRfc1123" } } }; - const sourceIfUnmodifiedSince = { + exports.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -23972,7 +24102,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "DateTimeRfc1123" } } }; - const sourceIfMatch = { + exports.sourceIfMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -23984,7 +24114,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceIfNoneMatch = { + exports.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -23996,7 +24126,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceIfTags = { + exports.sourceIfTags = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -24008,7 +24138,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const copySource = { + exports.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -24017,7 +24147,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobTagsString = { + exports.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -24025,7 +24155,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sealBlob = { + exports.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -24033,7 +24163,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Boolean" } } }; - const legalHold1 = { + exports.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -24041,7 +24171,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Boolean" } } }; - const xMsRequiresSync = { + exports.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -24050,7 +24180,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceContentMD5 = { + exports.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -24058,7 +24188,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "ByteArray" } } }; - const copySourceAuthorization = { + exports.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -24066,7 +24196,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const copySourceTags = { + exports.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -24077,7 +24207,15 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const comp15 = { + exports.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { name: "String" } + } + }; + exports.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -24086,7 +24224,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const copyActionAbortConstant = { + exports.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -24095,7 +24233,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const copyId = { + exports.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -24104,7 +24242,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp16 = { + exports.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -24113,7 +24251,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const tier1 = { + exports.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -24141,11 +24279,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const queryRequest = { + exports.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - const comp17 = { + exports.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -24154,7 +24292,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp18 = { + exports.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -24163,11 +24301,59 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const tags = { + exports.ifModifiedSince1 = { + parameterPath: [ + "options", + "blobModifiedAccessConditions", + "ifModifiedSince" + ], + mapper: { + serializedName: "x-ms-blob-if-modified-since", + xmlName: "x-ms-blob-if-modified-since", + type: { name: "DateTimeRfc1123" } + } + }; + exports.ifUnmodifiedSince1 = { + parameterPath: [ + "options", + "blobModifiedAccessConditions", + "ifUnmodifiedSince" + ], + mapper: { + serializedName: "x-ms-blob-if-unmodified-since", + xmlName: "x-ms-blob-if-unmodified-since", + type: { name: "DateTimeRfc1123" } + } + }; + exports.ifMatch1 = { + parameterPath: [ + "options", + "blobModifiedAccessConditions", + "ifMatch" + ], + mapper: { + serializedName: "x-ms-blob-if-match", + xmlName: "x-ms-blob-if-match", + type: { name: "String" } + } + }; + exports.ifNoneMatch1 = { + parameterPath: [ + "options", + "blobModifiedAccessConditions", + "ifNoneMatch" + ], + mapper: { + serializedName: "x-ms-blob-if-none-match", + xmlName: "x-ms-blob-if-none-match", + type: { name: "String" } + } + }; + exports.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - const transactionalContentMD5 = { + exports.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -24175,7 +24361,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "ByteArray" } } }; - const transactionalContentCrc64 = { + exports.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -24183,7 +24369,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "ByteArray" } } }; - const blobType = { + exports.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -24192,7 +24378,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobContentLength = { + exports.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -24201,7 +24387,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const blobSequenceNumber = { + exports.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -24210,7 +24396,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const contentType1 = { + exports.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -24219,7 +24405,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const body1 = { + exports.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -24228,7 +24414,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Stream" } } }; - const accept2 = { + exports.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -24237,7 +24423,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp19 = { + exports.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -24246,7 +24432,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const pageWrite = { + exports.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -24255,7 +24441,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const ifSequenceNumberLessThanOrEqualTo = { + exports.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -24267,7 +24453,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const ifSequenceNumberLessThan = { + exports.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -24279,7 +24465,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const ifSequenceNumberEqualTo = { + exports.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -24291,7 +24477,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const pageWrite1 = { + exports.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -24300,7 +24486,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceUrl = { + exports.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -24309,7 +24495,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceRange = { + exports.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -24318,7 +24504,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sourceContentCrc64 = { + exports.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -24326,7 +24512,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "ByteArray" } } }; - const range1 = { + exports.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -24335,7 +24521,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp20 = { + exports.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -24344,7 +24530,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const prevsnapshot = { + exports.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -24352,7 +24538,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const prevSnapshotUrl = { + exports.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -24360,7 +24546,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const sequenceNumberAction = { + exports.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -24376,7 +24562,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; - const comp21 = { + exports.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -24385,7 +24571,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobType1 = { + exports.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -24394,7 +24580,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp22 = { + exports.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -24403,7 +24589,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const maxSize = { + exports.maxSize = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -24415,7 +24601,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const appendPosition = { + exports.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -24427,7 +24613,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Number" } } }; - const sourceRange1 = { + exports.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -24435,7 +24621,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const comp23 = { + exports.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -24444,7 +24630,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blobType2 = { + exports.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -24453,7 +24639,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const copySourceBlobProperties = { + exports.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -24461,7 +24647,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Boolean" } } }; - const comp24 = { + exports.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -24470,7 +24656,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blockId = { + exports.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -24479,11 +24665,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const blocks = { + exports.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - const comp25 = { + exports.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -24492,7 +24678,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "String" } } }; - const listType = { + exports.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -24509,8 +24695,20 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. } } }; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ServiceImpl = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const coreClient = tslib_1.__importStar(require_commonjs$7()); + const Mappers = tslib_1.__importStar(require_mappers()); + const Parameters = tslib_1.__importStar(require_parameters()); /** Class containing Service operations. */ var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -24524,9 +24722,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties$1, options) { + setProperties(blobServiceProperties, options) { return this.client.sendOperationRequest({ - blobServiceProperties: blobServiceProperties$1, + blobServiceProperties, options }, setPropertiesOperationSpec); } @@ -24536,7 +24734,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -24560,9 +24758,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo$1, options) { + getUserDelegationKey(keyInfo, options) { return this.client.sendOperationRequest({ - keyInfo: keyInfo$1, + keyInfo, options }, getUserDelegationKeyOperationSpec); } @@ -24571,7 +24769,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -24581,13 +24779,13 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength$1, multipartContentType$1, body$1, options) { + submitBatch(contentLength, multipartContentType, body, options) { return this.client.sendOperationRequest({ - contentLength: contentLength$1, - multipartContentType: multipartContentType$1, - body: body$1, + contentLength, + multipartContentType, + body, options - }, submitBatchOperationSpec$1); + }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -24596,182 +24794,179 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - const xmlSerializer$5 = coreClient__namespace.createSerializer( - Mappers, - /* isXml */ - true -); + exports.ServiceImpl = ServiceImpl; + const xmlSerializer = coreClient.createSerializer(Mappers, true); const setPropertiesOperationSpec = { path: "/", httpMethod: "PUT", responses: { - 202: { headersMapper: ServiceSetPropertiesHeaders }, + 202: { headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - const getPropertiesOperationSpec$2 = { + const getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; const getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; const listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; const getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - const getAccountInfoOperationSpec$2 = { + const getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { - 200: { headersMapper: ServiceGetAccountInfoHeaders }, + 200: { headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - const submitBatchOperationSpec$1 = { + const submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -24780,59 +24975,71 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - const filterBlobsOperationSpec$1 = { + const filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ContainerImpl = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const coreClient = tslib_1.__importStar(require_commonjs$7()); + const Mappers = tslib_1.__importStar(require_mappers()); + const Parameters = tslib_1.__importStar(require_parameters()); /** Class containing Container operations. */ var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -24846,7 +25053,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -24854,7 +25061,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -24862,14 +25069,14 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -24899,9 +25106,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName$1, options) { + rename(sourceContainerName, options) { return this.client.sendOperationRequest({ - sourceContainerName: sourceContainerName$1, + sourceContainerName, options }, renameOperationSpec); } @@ -24913,11 +25120,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength$1, multipartContentType$1, body$1, options) { + submitBatch(contentLength, multipartContentType, body, options) { return this.client.sendOperationRequest({ - contentLength: contentLength$1, - multipartContentType: multipartContentType$1, - body: body$1, + contentLength, + multipartContentType, + body, options }, submitBatchOperationSpec); } @@ -24935,7 +25142,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -24943,11 +25150,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId$1, options) { + releaseLease(leaseId, options) { return this.client.sendOperationRequest({ - leaseId: leaseId$1, + leaseId, options - }, releaseLeaseOperationSpec$1); + }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -24955,11 +25162,11 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId$1, options) { + renewLease(leaseId, options) { return this.client.sendOperationRequest({ - leaseId: leaseId$1, + leaseId, options - }, renewLeaseOperationSpec$1); + }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -24967,7 +25174,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -24978,12 +25185,12 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId$1, proposedLeaseId$1, options) { + changeLease(leaseId, proposedLeaseId, options) { return this.client.sendOperationRequest({ - leaseId: leaseId$1, - proposedLeaseId: proposedLeaseId$1, + leaseId, + proposedLeaseId, options - }, changeLeaseOperationSpec$1); + }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -25000,9 +25207,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter$1, options) { + listBlobHierarchySegment(delimiter, options) { return this.client.sendOperationRequest({ - delimiter: delimiter$1, + delimiter, options }, listBlobHierarchySegmentOperationSpec); } @@ -25011,108 +25218,105 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - const xmlSerializer$4 = coreClient__namespace.createSerializer( - Mappers, - /* isXml */ - true -); - const createOperationSpec$2 = { + exports.ContainerImpl = ContainerImpl; + const xmlSerializer = coreClient.createSerializer(Mappers, true); + const createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 201: { headersMapper: ContainerCreateHeaders }, + 201: { headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const getPropertiesOperationSpec$1 = { + const getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { - 200: { headersMapper: ContainerGetPropertiesHeaders }, + 200: { headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const deleteOperationSpec$1 = { + const deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { - 202: { headersMapper: ContainerDeleteHeaders }, + 202: { headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const setMetadataOperationSpec$1 = { + const setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 200: { headersMapper: ContainerSetMetadataHeaders }, + 200: { headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -25132,111 +25336,111 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 200: { headersMapper: ContainerSetAccessPolicyHeaders }, + 200: { headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 201: { headersMapper: ContainerRestoreHeaders }, + 201: { headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 200: { headersMapper: ContainerRenameHeaders }, + 200: { headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const submitBatchOperationSpec = { path: "/{containerName}", @@ -25247,293 +25451,307 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const acquireLeaseOperationSpec$1 = { + const acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 201: { headersMapper: ContainerAcquireLeaseHeaders }, + 201: { headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const releaseLeaseOperationSpec$1 = { + const releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 200: { headersMapper: ContainerReleaseLeaseHeaders }, + 200: { headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const renewLeaseOperationSpec$1 = { + const renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 200: { headersMapper: ContainerRenewLeaseHeaders }, + 200: { headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const breakLeaseOperationSpec$1 = { + const breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 202: { headersMapper: ContainerBreakLeaseHeaders }, + 202: { headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const changeLeaseOperationSpec$1 = { + const changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { - 200: { headersMapper: ContainerChangeLeaseHeaders }, + 200: { headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.startFrom ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; const listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.startFrom, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - const getAccountInfoOperationSpec$1 = { + const getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { - 200: { headersMapper: ContainerGetAccountInfoHeaders }, + 200: { headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobImpl = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const coreClient = tslib_1.__importStar(require_commonjs$7()); + const Mappers = tslib_1.__importStar(require_mappers()); + const Parameters = tslib_1.__importStar(require_parameters()); /** Class containing Blob operations. */ var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -25587,9 +25805,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions$1, options) { + setExpiry(expiryOptions, options) { return this.client.sendOperationRequest({ - expiryOptions: expiryOptions$1, + expiryOptions, options }, setExpiryOperationSpec); } @@ -25619,9 +25837,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold$1, options) { + setLegalHold(legalHold, options) { return this.client.sendOperationRequest({ - legalHold: legalHold$1, + legalHold, options }, setLegalHoldOperationSpec); } @@ -25647,9 +25865,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId$1, options) { + releaseLease(leaseId, options) { return this.client.sendOperationRequest({ - leaseId: leaseId$1, + leaseId, options }, releaseLeaseOperationSpec); } @@ -25659,9 +25877,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId$1, options) { + renewLease(leaseId, options) { return this.client.sendOperationRequest({ - leaseId: leaseId$1, + leaseId, options }, renewLeaseOperationSpec); } @@ -25674,10 +25892,10 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId$1, proposedLeaseId$1, options) { + changeLease(leaseId, proposedLeaseId, options) { return this.client.sendOperationRequest({ - leaseId: leaseId$1, - proposedLeaseId: proposedLeaseId$1, + leaseId, + proposedLeaseId, options }, changeLeaseOperationSpec); } @@ -25704,9 +25922,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource$1, options) { + startCopyFromURL(copySource, options) { return this.client.sendOperationRequest({ - copySource: copySource$1, + copySource, options }, startCopyFromURLOperationSpec); } @@ -25719,9 +25937,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * access signature. * @param options The options parameters. */ - copyFromURL(copySource$1, options) { + copyFromURL(copySource, options) { return this.client.sendOperationRequest({ - copySource: copySource$1, + copySource, options }, copyFromURLOperationSpec); } @@ -25732,9 +25950,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId$1, options) { + abortCopyFromURL(copyId, options) { return this.client.sendOperationRequest({ - copyId: copyId$1, + copyId, options }, abortCopyFromURLOperationSpec); } @@ -25747,9 +25965,9 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier$1, options) { + setTier(tier, options) { return this.client.sendOperationRequest({ - tier: tier$1, + tier, options }, setTierOperationSpec); } @@ -25783,11 +26001,8 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - const xmlSerializer$3 = coreClient__namespace.createSerializer( - Mappers, - /* isXml */ - true -); + exports.BlobImpl = BlobImpl; + const xmlSerializer = coreClient.createSerializer(Mappers, true); const downloadOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", @@ -25797,3963 +26012,4121 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { - 200: { headersMapper: BlobGetPropertiesHeaders }, + 200: { headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { - 202: { headersMapper: BlobDeleteHeaders }, + 202: { headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobUndeleteHeaders }, + 200: { headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobSetExpiryHeaders }, + 200: { headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobSetHttpHeadersHeaders }, + 200: { headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobSetImmutabilityPolicyHeaders }, + 200: { headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp12 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { - 200: { headersMapper: BlobDeleteImmutabilityPolicyHeaders }, + 200: { headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp12 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobSetLegalHoldHeaders }, + 200: { headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp13 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobSetMetadataHeaders }, + 200: { headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 201: { headersMapper: BlobAcquireLeaseHeaders }, + 201: { headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobReleaseLeaseHeaders }, + 200: { headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobRenewLeaseHeaders }, + 200: { headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: BlobChangeLeaseHeaders }, + 200: { headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 202: { headersMapper: BlobBreakLeaseHeaders }, + 202: { headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 201: { headersMapper: BlobCreateSnapshotHeaders }, + 201: { headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 202: { headersMapper: BlobStartCopyFromURLHeaders }, + 202: { headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 202: { headersMapper: BlobCopyFromURLHeaders }, + 202: { headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; const abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 204: { headersMapper: BlobAbortCopyFromURLHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders - } - }, - queryParameters: [ - timeoutInSeconds, - comp15, - copyId - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant - ], - isXML: true, - serializer: xmlSerializer$3 - }; - const setTierOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { headersMapper: BlobSetTierHeaders }, - 202: { headersMapper: BlobSetTierHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders - } - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 - ], - isXML: true, - serializer: xmlSerializer$3 - }; - const getAccountInfoOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { headersMapper: BlobGetAccountInfoHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders - } - }, - queryParameters: [ - comp, - timeoutInSeconds, - restype1 - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1 - ], - isXML: true, - serializer: xmlSerializer$3 - }; - const queryOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse" - }, - headersMapper: BlobQueryHeaders - }, - 206: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse" - }, - headersMapper: BlobQueryHeaders - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders - } - }, - requestBody: queryRequest, - queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$3 - }; - const getTagsOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders - } - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags - ], - isXML: true, - serializer: xmlSerializer$3 - }; - const setTagsOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 204: { headersMapper: BlobSetTagsHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders - } - }, - requestBody: tags, - queryParameters: [ - timeoutInSeconds, - versionId, - comp18 - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$3 - }; - /** Class containing PageBlob operations. */ - var PageBlobImpl = class { - /** - * Initialize a new instance of the class PageBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Create operation creates a new page blob. - * @param contentLength The length of the request. - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The - * page blob size must be aligned to a 512-byte boundary. - * @param options The options parameters. - */ - create(contentLength$1, blobContentLength$1, options) { - return this.client.sendOperationRequest({ - contentLength: contentLength$1, - blobContentLength: blobContentLength$1, - options - }, createOperationSpec$1); - } - /** - * The Upload Pages operation writes a range of pages to a page blob - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - uploadPages(contentLength$1, body$1, options) { - return this.client.sendOperationRequest({ - contentLength: contentLength$1, - body: body$1, - options - }, uploadPagesOperationSpec); - } - /** - * The Clear Pages operation clears a set of pages from a page blob - * @param contentLength The length of the request. - * @param options The options parameters. - */ - clearPages(contentLength$1, options) { - return this.client.sendOperationRequest({ - contentLength: contentLength$1, - options - }, clearPagesOperationSpec); - } - /** - * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a - * URL - * @param sourceUrl Specify a URL to the copy source. - * @param sourceRange Bytes of source data in the specified range. The length of this range should - * match the ContentLength header and x-ms-range/Range destination range header. - * @param contentLength The length of the request. - * @param range The range of bytes to which the source range would be written. The range should be 512 - * aligned and range-end is required. - * @param options The options parameters. - */ - uploadPagesFromURL(sourceUrl$1, sourceRange$1, contentLength$1, range$2, options) { - return this.client.sendOperationRequest({ - sourceUrl: sourceUrl$1, - sourceRange: sourceRange$1, - contentLength: contentLength$1, - range: range$2, - options - }, uploadPagesFromURLOperationSpec); - } - /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a - * page blob - * @param options The options parameters. - */ - getPageRanges(options) { - return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); - } - /** - * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were - * changed between target blob and previous snapshot. - * @param options The options parameters. - */ - getPageRangesDiff(options) { - return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); - } - /** - * Resize the Blob - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The - * page blob size must be aligned to a 512-byte boundary. - * @param options The options parameters. - */ - resize(blobContentLength$1, options) { - return this.client.sendOperationRequest({ - blobContentLength: blobContentLength$1, - options - }, resizeOperationSpec); - } - /** - * Update the sequence number of the blob - * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. - * This property applies to page blobs only. This property indicates how the service should modify the - * blob's sequence number - * @param options The options parameters. - */ - updateSequenceNumber(sequenceNumberAction$1, options) { - return this.client.sendOperationRequest({ - sequenceNumberAction: sequenceNumberAction$1, - options - }, updateSequenceNumberOperationSpec); - } - /** - * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. - * The snapshot is copied such that only the differential changes between the previously copied - * snapshot are transferred to the destination. The copied snapshots are complete copies of the - * original snapshot and can be read or copied from as usual. This API is supported since REST version - * 2016-05-31. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - copyIncremental(copySource$1, options) { - return this.client.sendOperationRequest({ - copySource: copySource$1, - options - }, copyIncrementalOperationSpec); - } - }; - const xmlSerializer$2 = coreClient__namespace.createSerializer( - Mappers, - /* isXml */ - true -); - const createOperationSpec$1 = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { headersMapper: PageBlobCreateHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders - } - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber - ], - isXML: true, - serializer: xmlSerializer$2 - }; - const uploadPagesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { headersMapper: PageBlobUploadPagesHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders - } - }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer$2 - }; - const clearPagesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { headersMapper: PageBlobClearPagesHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders - } - }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 - ], - isXML: true, - serializer: xmlSerializer$2 - }; - const uploadPagesFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { headersMapper: PageBlobUploadPagesFromURLHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders - } - }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 - ], - isXML: true, - serializer: xmlSerializer$2 - }; - const getPageRangesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders - } - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags - ], - isXML: true, - serializer: xmlSerializer$2 - }; - const getPageRangesDiffOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders - } - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl - ], - isXML: true, - serializer: xmlSerializer$2 - }; - const resizeOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { headersMapper: PageBlobResizeHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders - } - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength - ], - isXML: true, - serializer: xmlSerializer$2 - }; - const updateSequenceNumberOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { headersMapper: PageBlobUpdateSequenceNumberHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders - } - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction - ], - isXML: true, - serializer: xmlSerializer$2 - }; - const copyIncrementalOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { headersMapper: PageBlobCopyIncrementalHeaders }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders - } - }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource - ], - isXML: true, - serializer: xmlSerializer$2 - }; - /** Class containing AppendBlob operations. */ - var AppendBlobImpl = class { - /** - * Initialize a new instance of the class AppendBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Create Append Blob operation creates a new append blob. - * @param contentLength The length of the request. - * @param options The options parameters. - */ - create(contentLength$1, options) { - return this.client.sendOperationRequest({ - contentLength: contentLength$1, - options - }, createOperationSpec); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob. The - * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to - * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - appendBlock(contentLength$1, body$1, options) { - return this.client.sendOperationRequest({ - contentLength: contentLength$1, - body: body$1, - options - }, appendBlockOperationSpec); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob where - * the contents are read from a source url. The Append Block operation is permitted only if the blob - * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version - * 2015-02-21 version or later. - * @param sourceUrl Specify a URL to the copy source. - * @param contentLength The length of the request. - * @param options The options parameters. - */ - appendBlockFromUrl(sourceUrl$1, contentLength$1, options) { - return this.client.sendOperationRequest({ - sourceUrl: sourceUrl$1, - contentLength: contentLength$1, - options - }, appendBlockFromUrlOperationSpec); - } - /** - * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version - * 2019-12-12 version or later. - * @param options The options parameters. - */ - seal(options) { - return this.client.sendOperationRequest({ options }, sealOperationSpec); - } + 204: { headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders + } + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant + ], + isXML: true, + serializer: xmlSerializer }; - const xmlSerializer$1 = coreClient__namespace.createSerializer( - Mappers, - /* isXml */ - true -); - const createOperationSpec = { + const setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 201: { headersMapper: AppendBlobCreateHeaders }, + 200: { headersMapper: Mappers.BlobSetTierHeaders }, + 202: { headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; - const appendBlockOperationSpec = { + const getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", - httpMethod: "PUT", + httpMethod: "GET", responses: { - 201: { headersMapper: AppendBlobAppendBlockHeaders }, + 200: { headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [ + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1 + ], + isXML: true, + serializer: xmlSerializer + }; + const queryOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: Mappers.BlobQueryHeaders + }, + 206: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: Mappers.BlobQueryHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders + } + }, + requestBody: Parameters.queryRequest, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer$1 + mediaType: "xml", + serializer: xmlSerializer }; - const appendBlockFromUrlOperationSpec = { + const getTagsOperationSpec = { path: "/{containerName}/{blob}", - httpMethod: "PUT", + httpMethod: "GET", responses: { - 201: { headersMapper: AppendBlobAppendBlockFromUrlHeaders }, + 200: { + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders + }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.ifModifiedSince1, + Parameters.ifUnmodifiedSince1, + Parameters.ifMatch1, + Parameters.ifNoneMatch1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; - const sealOperationSpec = { + const setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 200: { headersMapper: AppendBlobSealHeaders }, + 204: { headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + requestBody: Parameters.tags, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.ifModifiedSince1, + Parameters.ifUnmodifiedSince1, + Parameters.ifMatch1, + Parameters.ifNoneMatch1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, - serializer: xmlSerializer$1 + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer }; - /** Class containing BlockBlob operations. */ - var BlockBlobImpl = class { +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PageBlobImpl = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const coreClient = tslib_1.__importStar(require_commonjs$7()); + const Mappers = tslib_1.__importStar(require_mappers()); + const Parameters = tslib_1.__importStar(require_parameters()); + /** Class containing PageBlob operations. */ + var PageBlobImpl = class { + client; /** - * Initialize a new instance of the class BlockBlob class. + * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** - * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing - * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put - * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a - * partial update of the content of a block blob, use the Put Block List operation. + * The Create operation creates a new page blob. * @param contentLength The length of the request. - * @param body Initial data + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - upload(contentLength$1, body$1, options) { + create(contentLength, blobContentLength, options) { return this.client.sendOperationRequest({ - contentLength: contentLength$1, - body: body$1, + contentLength, + blobContentLength, options - }, uploadOperationSpec); + }, createOperationSpec); } /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read - * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are - * not supported with Put Blob from URL; the content of an existing blob is overwritten with the - * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, - * use the Put Block from URL API in conjunction with Put Block List. + * The Upload Pages operation writes a range of pages to a page blob * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. + * @param body Initial data * @param options The options parameters. */ - putBlobFromUrl(contentLength$1, copySource$1, options) { + uploadPages(contentLength, body, options) { return this.client.sendOperationRequest({ - contentLength: contentLength$1, - copySource: copySource$1, + contentLength, + body, options - }, putBlobFromUrlOperationSpec); + }, uploadPagesOperationSpec); } /** - * The Stage Block operation creates a new block to be committed as part of a blob - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string - * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified - * for the blockid parameter must be the same size for each block. + * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. - * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId$1, contentLength$1, body$1, options) { + clearPages(contentLength, options) { return this.client.sendOperationRequest({ - blockId: blockId$1, - contentLength: contentLength$1, - body: body$1, + contentLength, options - }, stageBlockOperationSpec); + }, clearPagesOperationSpec); } /** - * The Stage Block operation creates a new block to be committed as part of a blob where the contents - * are read from a URL. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string - * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified - * for the blockid parameter must be the same size for each block. - * @param contentLength The length of the request. + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a + * URL * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should + * match the ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 + * aligned and range-end is required. * @param options The options parameters. */ - stageBlockFromURL(blockId$1, contentLength$1, sourceUrl$1, options) { + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { return this.client.sendOperationRequest({ - blockId: blockId$1, - contentLength: contentLength$1, - sourceUrl: sourceUrl$1, + sourceUrl, + sourceRange, + contentLength, + range, options - }, stageBlockFromURLOperationSpec); + }, uploadPagesFromURLOperationSpec); } /** - * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the - * blob. In order to be written as part of a blob, a block must have been successfully written to the - * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading - * only those blocks that have changed, then committing the new and existing blocks together. You can - * do this by specifying whether to commit a block from the committed block list or from the - * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list - * it may belong to. - * @param blocks Blob Blocks. + * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a + * page blob + * @param options The options parameters. + */ + getPageRanges(options) { + return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); + } + /** + * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot. + * @param options The options parameters. + */ + getPageRangesDiff(options) { + return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); + } + /** + * Resize the Blob + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - commitBlockList(blocks$1, options) { + resize(blobContentLength, options) { return this.client.sendOperationRequest({ - blocks: blocks$1, + blobContentLength, options - }, commitBlockListOperationSpec); + }, resizeOperationSpec); } /** - * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block - * blob - * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted - * blocks, or both lists together. + * Update the sequence number of the blob + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. + * This property applies to page blobs only. This property indicates how the service should modify the + * blob's sequence number * @param options The options parameters. */ - getBlockList(listType$1, options) { + updateSequenceNumber(sequenceNumberAction, options) { return this.client.sendOperationRequest({ - listType: listType$1, + sequenceNumberAction, options - }, getBlockListOperationSpec); + }, updateSequenceNumberOperationSpec); + } + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. + * The snapshot is copied such that only the differential changes between the previously copied + * snapshot are transferred to the destination. The copied snapshots are complete copies of the + * original snapshot and can be read or copied from as usual. This API is supported since REST version + * 2016-05-31. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ + copySource, + options + }, copyIncrementalOperationSpec); } }; - const xmlSerializer = coreClient__namespace.createSerializer( - Mappers, - /* isXml */ - true -); - const uploadOperationSpec = { + exports.PageBlobImpl = PageBlobImpl; + const xmlSerializer = coreClient.createSerializer(Mappers, true); + const createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 201: { headersMapper: BlockBlobUploadHeaders }, + 201: { headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", serializer: xmlSerializer }; - const putBlobFromUrlOperationSpec = { + const uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 201: { headersMapper: BlockBlobPutBlobFromUrlHeaders }, + 201: { headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", serializer: xmlSerializer }; - const stageBlockOperationSpec = { + const clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 201: { headersMapper: BlockBlobStageBlockHeaders }, + 201: { headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [ - timeoutInSeconds, - comp24, - blockId - ], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", serializer: xmlSerializer }; - const stageBlockFromURLOperationSpec = { + const uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { - 201: { headersMapper: BlockBlobStageBlockFromURLHeaders }, + 201: { headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [ - timeoutInSeconds, - comp24, - blockId - ], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, serializer: xmlSerializer }; - const commitBlockListOperationSpec = { + const getPageRangesOperationSpec = { path: "/{containerName}/{blob}", - httpMethod: "PUT", + httpMethod: "GET", responses: { - 201: { headersMapper: BlockBlobCommitBlockListHeaders }, + 200: { + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders + }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 + ], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", serializer: xmlSerializer }; - const getBlockListOperationSpec = { + const getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, serializer: xmlSerializer }; - let StorageClient$1 = class StorageClient$2 extends coreHttpCompat__namespace.ExtendedServiceClient { - /** - * Initializes a new instance of the StorageClient class. - * @param url The URL of the service account, container, or blob that is the target of the desired - * operation. - * @param options The parameter options - */ - constructor(url$1, options) { - var _a$2, _b$1; - if (url$1 === void 0) throw new Error("'url' cannot be null"); - if (!options) options = {}; - const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.27.0`; - const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { - userAgentOptions: { userAgentPrefix }, - endpoint: (_b$1 = (_a$2 = options.endpoint) !== null && _a$2 !== void 0 ? _a$2 : options.baseUri) !== null && _b$1 !== void 0 ? _b$1 : "{url}" - }); - super(optionsWithDefaults); - this.url = url$1; - this.version = options.version || "2025-05-05"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); - } - }; - /** - * @internal - */ - var StorageContextClient = class extends StorageClient$1 { - async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); - if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") operationSpecToSend.path = ""; - return super.sendOperationRequest(operationArguments, operationSpecToSend); - } + const resizeOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: Mappers.PageBlobResizeHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders + } + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength + ], + isXML: true, + serializer: xmlSerializer }; - /** - * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} - * and etc. - */ - var StorageClient = class { - /** - * Creates an instance of StorageClient. - * @param url - url to resource - * @param pipeline - request policy pipeline. - */ - constructor(url$1, pipeline) { - this.url = escapeURLPath(url$1); - this.accountName = getAccountNameFromUrl(url$1); - this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); - const storageClientContext = this.storageClientContext; - storageClientContext.requestContentType = void 0; - } + const updateSequenceNumberOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders + } + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction + ], + isXML: true, + serializer: xmlSerializer }; - /** - * Creates a span using the global tracer. - * @internal - */ - const tracingClient = coreTracing.createTracingClient({ - packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, - namespace: "Microsoft.Storage" - }); - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting - * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all - * the values are set, this should be serialized with toString and set as the permissions field on a - * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ - var BlobSASPermissions = class BlobSASPermissions { - constructor() { - /** - * Specifies Read access granted. - */ - this.read = false; - /** - * Specifies Add access granted. - */ - this.add = false; - /** - * Specifies Create access granted. - */ - this.create = false; - /** - * Specifies Write access granted. - */ - this.write = false; - /** - * Specifies Delete access granted. - */ - this.delete = false; - /** - * Specifies Delete version access granted. - */ - this.deleteVersion = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Specifies Move access granted. - */ - this.move = false; - /** - * Specifies Execute access granted. - */ - this.execute = false; - /** - * Specifies SetImmutabilityPolicy access granted. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - } - /** - * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an - * Error if it encounters a character that does not correspond to a valid permission. - * - * @param permissions - - */ - static parse(permissions) { - const blobSASPermissions = new BlobSASPermissions(); - for (const char of permissions) switch (char) { - case "r": - blobSASPermissions.read = true; - break; - case "a": - blobSASPermissions.add = true; - break; - case "c": - blobSASPermissions.create = true; - break; - case "w": - blobSASPermissions.write = true; - break; - case "d": - blobSASPermissions.delete = true; - break; - case "x": - blobSASPermissions.deleteVersion = true; - break; - case "t": - blobSASPermissions.tag = true; - break; - case "m": - blobSASPermissions.move = true; - break; - case "e": - blobSASPermissions.execute = true; - break; - case "i": - blobSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - blobSASPermissions.permanentDelete = true; - break; - default: throw new RangeError(`Invalid permission: ${char}`); + const copyIncrementalOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } - return blobSASPermissions; - } - /** - * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const blobSASPermissions = new BlobSASPermissions(); - if (permissionLike.read) blobSASPermissions.read = true; - if (permissionLike.add) blobSASPermissions.add = true; - if (permissionLike.create) blobSASPermissions.create = true; - if (permissionLike.write) blobSASPermissions.write = true; - if (permissionLike.delete) blobSASPermissions.delete = true; - if (permissionLike.deleteVersion) blobSASPermissions.deleteVersion = true; - if (permissionLike.tag) blobSASPermissions.tag = true; - if (permissionLike.move) blobSASPermissions.move = true; - if (permissionLike.execute) blobSASPermissions.execute = true; - if (permissionLike.setImmutabilityPolicy) blobSASPermissions.setImmutabilityPolicy = true; - if (permissionLike.permanentDelete) blobSASPermissions.permanentDelete = true; - return blobSASPermissions; - } + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource + ], + isXML: true, + serializer: xmlSerializer + }; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AppendBlobImpl = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const coreClient = tslib_1.__importStar(require_commonjs$7()); + const Mappers = tslib_1.__importStar(require_mappers()); + const Parameters = tslib_1.__importStar(require_parameters()); + /** Class containing AppendBlob operations. */ + var AppendBlobImpl = class { + client; /** - * Converts the given permissions to a string. Using this method will guarantee the permissions are in an - * order accepted by the service. - * - * @returns A string which represents the BlobSASPermissions + * Initialize a new instance of the class AppendBlob class. + * @param client Reference to the service client */ - toString() { - const permissions = []; - if (this.read) permissions.push("r"); - if (this.add) permissions.push("a"); - if (this.create) permissions.push("c"); - if (this.write) permissions.push("w"); - if (this.delete) permissions.push("d"); - if (this.deleteVersion) permissions.push("x"); - if (this.tag) permissions.push("t"); - if (this.move) permissions.push("m"); - if (this.execute) permissions.push("e"); - if (this.setImmutabilityPolicy) permissions.push("i"); - if (this.permanentDelete) permissions.push("y"); - return permissions.join(""); - } - }; - /** - * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. - * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. - * Once all the values are set, this should be serialized with toString and set as the permissions field on a - * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ - var ContainerSASPermissions = class ContainerSASPermissions { - constructor() { - /** - * Specifies Read access granted. - */ - this.read = false; - /** - * Specifies Add access granted. - */ - this.add = false; - /** - * Specifies Create access granted. - */ - this.create = false; - /** - * Specifies Write access granted. - */ - this.write = false; - /** - * Specifies Delete access granted. - */ - this.delete = false; - /** - * Specifies Delete version access granted. - */ - this.deleteVersion = false; - /** - * Specifies List access granted. - */ - this.list = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Specifies Move access granted. - */ - this.move = false; - /** - * Specifies Execute access granted. - */ - this.execute = false; - /** - * Specifies SetImmutabilityPolicy access granted. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - /** - * Specifies that Filter Blobs by Tags is permitted. - */ - this.filterByTags = false; + constructor(client) { + this.client = client; } /** - * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an - * Error if it encounters a character that does not correspond to a valid permission. - * - * @param permissions - + * The Create Append Blob operation creates a new append blob. + * @param contentLength The length of the request. + * @param options The options parameters. */ - static parse(permissions) { - const containerSASPermissions = new ContainerSASPermissions(); - for (const char of permissions) switch (char) { - case "r": - containerSASPermissions.read = true; - break; - case "a": - containerSASPermissions.add = true; - break; - case "c": - containerSASPermissions.create = true; - break; - case "w": - containerSASPermissions.write = true; - break; - case "d": - containerSASPermissions.delete = true; - break; - case "l": - containerSASPermissions.list = true; - break; - case "t": - containerSASPermissions.tag = true; - break; - case "x": - containerSASPermissions.deleteVersion = true; - break; - case "m": - containerSASPermissions.move = true; - break; - case "e": - containerSASPermissions.execute = true; - break; - case "i": - containerSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - containerSASPermissions.permanentDelete = true; - break; - case "f": - containerSASPermissions.filterByTags = true; - break; - default: throw new RangeError(`Invalid permission ${char}`); - } - return containerSASPermissions; + create(contentLength, options) { + return this.client.sendOperationRequest({ + contentLength, + options + }, createOperationSpec); } /** - * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - + * The Append Block operation commits a new block of data to the end of an existing append blob. The + * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to + * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. */ - static from(permissionLike) { - const containerSASPermissions = new ContainerSASPermissions(); - if (permissionLike.read) containerSASPermissions.read = true; - if (permissionLike.add) containerSASPermissions.add = true; - if (permissionLike.create) containerSASPermissions.create = true; - if (permissionLike.write) containerSASPermissions.write = true; - if (permissionLike.delete) containerSASPermissions.delete = true; - if (permissionLike.list) containerSASPermissions.list = true; - if (permissionLike.deleteVersion) containerSASPermissions.deleteVersion = true; - if (permissionLike.tag) containerSASPermissions.tag = true; - if (permissionLike.move) containerSASPermissions.move = true; - if (permissionLike.execute) containerSASPermissions.execute = true; - if (permissionLike.setImmutabilityPolicy) containerSASPermissions.setImmutabilityPolicy = true; - if (permissionLike.permanentDelete) containerSASPermissions.permanentDelete = true; - if (permissionLike.filterByTags) containerSASPermissions.filterByTags = true; - return containerSASPermissions; + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ + contentLength, + body, + options + }, appendBlockOperationSpec); } /** - * Converts the given permissions to a string. Using this method will guarantee the permissions are in an - * order accepted by the service. - * - * The order of the characters should be as specified here to ensure correctness. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * + * The Append Block operation commits a new block of data to the end of an existing append blob where + * the contents are read from a source url. The Append Block operation is permitted only if the blob + * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version + * 2015-02-21 version or later. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param options The options parameters. */ - toString() { - const permissions = []; - if (this.read) permissions.push("r"); - if (this.add) permissions.push("a"); - if (this.create) permissions.push("c"); - if (this.write) permissions.push("w"); - if (this.delete) permissions.push("d"); - if (this.deleteVersion) permissions.push("x"); - if (this.list) permissions.push("l"); - if (this.tag) permissions.push("t"); - if (this.move) permissions.push("m"); - if (this.execute) permissions.push("e"); - if (this.setImmutabilityPolicy) permissions.push("i"); - if (this.permanentDelete) permissions.push("y"); - if (this.filterByTags) permissions.push("f"); - return permissions.join(""); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ + sourceUrl, + contentLength, + options + }, appendBlockFromUrlOperationSpec); + } + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version + * 2019-12-12 version or later. + * @param options The options parameters. + */ + seal(options) { + return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * UserDelegationKeyCredential is only used for generation of user delegation SAS. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas - */ - var UserDelegationKeyCredential = class { + exports.AppendBlobImpl = AppendBlobImpl; + const xmlSerializer = coreClient.createSerializer(Mappers, true); + const createOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.AppendBlobCreateHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders + } + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 + ], + isXML: true, + serializer: xmlSerializer + }; + const appendBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.AppendBlobAppendBlockHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders + } + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer + }; + const appendBlockFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders + } + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 + ], + isXML: true, + serializer: xmlSerializer + }; + const sealOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: Mappers.AppendBlobSealHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders + } + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition + ], + isXML: true, + serializer: xmlSerializer + }; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlockBlobImpl = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const coreClient = tslib_1.__importStar(require_commonjs$7()); + const Mappers = tslib_1.__importStar(require_mappers()); + const Parameters = tslib_1.__importStar(require_parameters()); + /** Class containing BlockBlob operations. */ + var BlockBlobImpl = class { + client; /** - * Creates an instance of UserDelegationKeyCredential. - * @param accountName - - * @param userDelegationKey - + * Initialize a new instance of the class BlockBlob class. + * @param client Reference to the service client */ - constructor(accountName, userDelegationKey) { - this.accountName = accountName; - this.userDelegationKey = userDelegationKey; - this.key = Buffer.from(userDelegationKey.value, "base64"); + constructor(client) { + this.client = client; } /** - * Generates a hash signature for an HTTP request or for a SAS. - * - * @param stringToSign - + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing + * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put + * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a + * partial update of the content of a block blob, use the Put Block List operation. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. */ - computeHMACSHA256(stringToSign) { - return crypto$1.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ + contentLength, + body, + options + }, uploadOperationSpec); } - }; - /** - * Generate SasIPRange format string. For example: - * - * "8.8.8.8" or "1.1.1.1-255.255.255.255" - * - * @param ipRange - - */ - function ipRangeToString(ipRange) { - return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; - } - /** - * Protocols for generated SAS. - */ - exports.SASProtocol = void 0; - (function(SASProtocol) { /** - * Protocol that allows HTTPS only + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read + * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are + * not supported with Put Blob from URL; the content of an existing blob is overwritten with the + * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, + * use the Put Block from URL API in conjunction with Put Block List. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. */ - SASProtocol["Https"] = "https"; + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ + contentLength, + copySource, + options + }, putBlobFromUrlOperationSpec); + } /** - * Protocol that allows both HTTPS and HTTP + * The Stage Block operation creates a new block to be committed as part of a blob + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. */ - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports.SASProtocol || (exports.SASProtocol = {})); - /** - * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} - * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should - * be taken here in case there are existing query parameters, which might affect the appropriate means of appending - * these query parameters). - * - * NOTE: Instances of this class are immutable. - */ - var SASQueryParameters = class { + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ + blockId, + contentLength, + body, + options + }, stageBlockOperationSpec); + } /** - * Optional. IP range allowed for this SAS. - * - * @readonly + * The Stage Block operation creates a new block to be committed as part of a blob where the contents + * are read from a URL. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param options The options parameters. */ - get ipRange() { - if (this.ipRangeInner) return { - end: this.ipRangeInner.end, - start: this.ipRangeInner.start - }; - return void 0; + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ + blockId, + contentLength, + sourceUrl, + options + }, stageBlockFromURLOperationSpec); } - constructor(version$1, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn$1, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType$1, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope$1) { - this.version = version$1; - this.signature = signature; - if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { - this.permissions = permissionsOrOptions.permissions; - this.services = permissionsOrOptions.services; - this.resourceTypes = permissionsOrOptions.resourceTypes; - this.protocol = permissionsOrOptions.protocol; - this.startsOn = permissionsOrOptions.startsOn; - this.expiresOn = permissionsOrOptions.expiresOn; - this.ipRangeInner = permissionsOrOptions.ipRange; - this.identifier = permissionsOrOptions.identifier; - this.encryptionScope = permissionsOrOptions.encryptionScope; - this.resource = permissionsOrOptions.resource; - this.cacheControl = permissionsOrOptions.cacheControl; - this.contentDisposition = permissionsOrOptions.contentDisposition; - this.contentEncoding = permissionsOrOptions.contentEncoding; - this.contentLanguage = permissionsOrOptions.contentLanguage; - this.contentType = permissionsOrOptions.contentType; - if (permissionsOrOptions.userDelegationKey) { - this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; - this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; - this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; - this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; - this.signedService = permissionsOrOptions.userDelegationKey.signedService; - this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; - this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; - this.correlationId = permissionsOrOptions.correlationId; - } - } else { - this.services = services; - this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn$1; - this.permissions = permissionsOrOptions; - this.protocol = protocol; - this.startsOn = startsOn; - this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope$1; - this.identifier = identifier; - this.resource = resource; - this.cacheControl = cacheControl; - this.contentDisposition = contentDisposition; - this.contentEncoding = contentEncoding; - this.contentLanguage = contentLanguage; - this.contentType = contentType$1; - if (userDelegationKey) { - this.signedOid = userDelegationKey.signedObjectId; - this.signedTenantId = userDelegationKey.signedTenantId; - this.signedStartsOn = userDelegationKey.signedStartsOn; - this.signedExpiresOn = userDelegationKey.signedExpiresOn; - this.signedService = userDelegationKey.signedService; - this.signedVersion = userDelegationKey.signedVersion; - this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; - this.correlationId = correlationId; - } - } + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the + * blob. In order to be written as part of a blob, a block must have been successfully written to the + * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading + * only those blocks that have changed, then committing the new and existing blocks together. You can + * do this by specifying whether to commit a block from the committed block list or from the + * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list + * it may belong to. + * @param blocks Blob Blocks. + * @param options The options parameters. + */ + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ + blocks, + options + }, commitBlockListOperationSpec); } /** - * Encodes all SAS query parameters into a string that can be appended to a URL. - * + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block + * blob + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted + * blocks, or both lists together. + * @param options The options parameters. */ - toString() { - const params = [ - "sv", - "ss", - "srt", - "spr", - "st", - "se", - "sip", - "si", - "ses", - "skoid", - "sktid", - "skt", - "ske", - "sks", - "skv", - "sr", - "sp", - "sig", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "saoid", - "scid" - ]; - const queries = []; - for (const param of params) switch (param) { - case "sv": - this.tryAppendQueryParameter(queries, param, this.version); - break; - case "ss": - this.tryAppendQueryParameter(queries, param, this.services); - break; - case "srt": - this.tryAppendQueryParameter(queries, param, this.resourceTypes); - break; - case "spr": - this.tryAppendQueryParameter(queries, param, this.protocol); - break; - case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); - break; - case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); - break; - case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); - break; - case "si": - this.tryAppendQueryParameter(queries, param, this.identifier); - break; - case "ses": - this.tryAppendQueryParameter(queries, param, this.encryptionScope); - break; - case "skoid": - this.tryAppendQueryParameter(queries, param, this.signedOid); - break; - case "sktid": - this.tryAppendQueryParameter(queries, param, this.signedTenantId); - break; - case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); - break; - case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); - break; - case "sks": - this.tryAppendQueryParameter(queries, param, this.signedService); - break; - case "skv": - this.tryAppendQueryParameter(queries, param, this.signedVersion); - break; - case "sr": - this.tryAppendQueryParameter(queries, param, this.resource); - break; - case "sp": - this.tryAppendQueryParameter(queries, param, this.permissions); - break; - case "sig": - this.tryAppendQueryParameter(queries, param, this.signature); - break; - case "rscc": - this.tryAppendQueryParameter(queries, param, this.cacheControl); - break; - case "rscd": - this.tryAppendQueryParameter(queries, param, this.contentDisposition); - break; - case "rsce": - this.tryAppendQueryParameter(queries, param, this.contentEncoding); - break; - case "rscl": - this.tryAppendQueryParameter(queries, param, this.contentLanguage); - break; - case "rsct": - this.tryAppendQueryParameter(queries, param, this.contentType); - break; - case "saoid": - this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); - break; - case "scid": - this.tryAppendQueryParameter(queries, param, this.correlationId); - break; + getBlockList(listType, options) { + return this.client.sendOperationRequest({ + listType, + options + }, getBlockListOperationSpec); + } + }; + exports.BlockBlobImpl = BlockBlobImpl; + const xmlSerializer = coreClient.createSerializer(Mappers, true); + const uploadOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.BlockBlobUploadHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } - return queries.join("&"); + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer + }; + const putBlobFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders + } + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties + ], + isXML: true, + serializer: xmlSerializer + }; + const stageBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.BlockBlobStageBlockHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders + } + }, + requestBody: Parameters.body1, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer + }; + const stageBlockFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders + } + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 + ], + isXML: true, + serializer: xmlSerializer + }; + const commitBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders + } + }, + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer + }; + const getBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders + } + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags + ], + isXML: true, + serializer: xmlSerializer + }; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service$1(), exports); + tslib_1.__exportStar(require_container$1(), exports); + tslib_1.__exportStar(require_blob$1(), exports); + tslib_1.__exportStar(require_pageBlob$1(), exports); + tslib_1.__exportStar(require_appendBlob$1(), exports); + tslib_1.__exportStar(require_blockBlob$1(), exports); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageClient = void 0; + const coreHttpCompat = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)).__importStar(require_commonjs$6()); + const index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; + /** + * Initializes a new instance of the StorageClient class. + * @param url The URL of the service account, container, or blob that is the target of the desired + * operation. + * @param options The parameter options + */ + constructor(url, options) { + if (url === void 0) throw new Error("'url' cannot be null"); + if (!options) options = {}; + const defaults = { requestContentType: "application/json; charset=utf-8" }; + const packageDetails = `azsdk-js-azure-storage-blob/12.30.0`; + const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { userAgentPrefix }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; + super(optionsWithDefaults); + this.url = url; + this.version = options.version || "2026-02-06"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); + } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; + }; + exports.StorageClient = StorageClient; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports); + tslib_1.__exportStar(require_container(), exports); + tslib_1.__exportStar(require_blob(), exports); + tslib_1.__exportStar(require_pageBlob(), exports); + tslib_1.__exportStar(require_appendBlob(), exports); + tslib_1.__exportStar(require_blockBlob(), exports); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageClient = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models$1(), exports); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports, "StorageClient", { + enumerable: true, + get: function() { + return storageClient_js_1.StorageClient; } - /** - * A private helper method used to filter and append query key/value pairs into an array. - * - * @param queries - - * @param key - - * @param value - - */ - tryAppendQueryParameter(queries, key, value) { - if (!value) return; - key = encodeURIComponent(key); - value = encodeURIComponent(value); - if (key.length > 0 && value.length > 0) queries.push(`${key}=${value}`); + }); + tslib_1.__exportStar(require_operationsInterfaces(), exports); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageContextClient = void 0; + const index_js_1 = require_src(); + /** + * @internal + */ + var StorageContextClient = class extends index_js_1.StorageClient { + async sendOperationRequest(operationArguments, operationSpec) { + const operationSpecToSend = { ...operationSpec }; + if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") operationSpecToSend.path = ""; + return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; - function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; + exports.StorageContextClient = StorageContextClient; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.escapeURLPath = escapeURLPath; + exports.getValueInConnString = getValueInConnString; + exports.extractConnectionStringParts = extractConnectionStringParts; + exports.appendToURLPath = appendToURLPath; + exports.setURLParameter = setURLParameter; + exports.getURLParameter = getURLParameter; + exports.setURLHost = setURLHost; + exports.getURLPath = getURLPath; + exports.getURLScheme = getURLScheme; + exports.getURLPathAndQuery = getURLPathAndQuery; + exports.getURLQueries = getURLQueries; + exports.appendToURLQuery = appendToURLQuery; + exports.truncatedISO8061Date = truncatedISO8061Date; + exports.base64encode = base64encode; + exports.base64decode = base64decode; + exports.generateBlockID = generateBlockID; + exports.delay = delay; + exports.padStart = padStart; + exports.sanitizeURL = sanitizeURL; + exports.sanitizeHeaders = sanitizeHeaders; + exports.iEqual = iEqual; + exports.getAccountNameFromUrl = getAccountNameFromUrl; + exports.isIpEndpointStyle = isIpEndpointStyle; + exports.toBlobTagsString = toBlobTagsString; + exports.toBlobTags = toBlobTags; + exports.toTags = toTags; + exports.toQuerySerialization = toQuerySerialization; + exports.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports.attachCredential = attachCredential; + exports.httpAuthorizationToString = httpAuthorizationToString; + exports.BlobNameToString = BlobNameToString; + exports.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports.EscapePath = EscapePath; + exports.assertResponse = assertResponse; + const core_rest_pipeline_1 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); + const constants_js_1 = require_constants$1(); + /** + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @param url - + */ + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path || "/"; + path = escape(path); + urlParsed.pathname = path; + return urlParsed.toString(); } - function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version$1 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; - let userDelegationKeyCredential; - if (sharedKeyCredential === void 0 && accountName !== void 0) userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); - if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); - if (version$1 >= "2020-12-06") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); - else return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); - if (version$1 >= "2018-11-09") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); - else if (version$1 >= "2020-02-10") return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); - else return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); - if (version$1 >= "2015-04-05") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); - else throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); - throw new RangeError("'version' must be >= '2015-04-05'."); + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) if (element.trim().startsWith("DevelopmentStorageProxyUri=")) proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) if (element.trim().startsWith(argument)) return element.trim().match(argument + "=(.*)")[1]; + return ""; } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. + * Extracts the parts of an Azure Storage account connection string. * - * Creates an instance of SASQueryParameters. + * @param connectionString - Connection string. + * @returns String key value pairs of the storage account's url and credentials. + */ + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) throw new Error("Invalid EndpointSuffix in the provided Connection String"); + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) throw new Error("Invalid AccountName in the provided Connection String"); + else if (accountKey.length === 0) throw new Error("Invalid AccountKey in the provided Connection String"); + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) accountName = getAccountNameFromUrl(blobEndpoint); + if (!blobEndpoint) throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + else if (!accountSas) throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + if (accountSas.startsWith("?")) accountSas = accountSas.substring(1); + return { + kind: "SASConnString", + url: blobEndpoint, + accountName, + accountSas + }; + } + } + /** + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. + * @param text - + */ + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + /** + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. + * @param url - Source URL string + * @param name - String to be appended to URL + * @returns An updated URL string + */ + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path ? path.endsWith("/") ? `${path}${name}` : `${path}/${name}` : name; + urlParsed.pathname = path; + return urlParsed.toString(); + } + /** + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - + * @param url - Source URL string + * @param name - Parameter name + * @param value - Parameter value + * @returns An updated URL string */ - function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - let resource = "c"; - if (blobSASSignatureValues.blobName) resource = "b"; - let verifiedPermissions; - if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), - stringToSign - }; + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) searchPieces.push(pair); + } + if (encodedValue) searchPieces.push(`${encodedName}=${encodedValue}`); + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * Get URL parameter by name. * - * Creates an instance of SASQueryParameters. + * @param url - + * @param name - + */ + function getURLParameter(url, name) { + return new URL(url).searchParams.get(name) ?? void 0; + } + /** + * Set URL host. * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. + * @param url - Source URL string + * @param host - New host string + * @returns An updated URL string + */ + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + /** + * Get URL path from an URL string. * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. + * @param url - Source URL string + */ + function getURLPath(url) { + try { + return new URL(url).pathname; + } catch (e) { + return; + } + } + /** + * Get URL scheme from an URL string. * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - + * @param url - Source URL string */ - function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) resource = "bs"; - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return; } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), - stringToSign - }; } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * Get URL path and query from an URL string. * - * Creates an instance of SASQueryParameters. + * @param url - Source URL string + */ + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) throw new RangeError("Invalid url without valid path."); + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + return `${pathString}${queryString}`; + } + /** + * Get URL query key value pairs from an URL string. * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. + * @param url - + */ + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) return {}; + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + queries[key] = splitResults[1]; + } + return queries; + } + /** + * Append a string to URL query. * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. + * @param url - Source URL string. + * @param queryParts - String to be appended to the URL query. + * @returns An updated URL string. + */ + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) query += "&" + queryParts; + else query = queryParts; + urlParsed.search = query; + return urlParsed.toString(); + } + /** + * Rounds a date off to seconds. * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - + * @param date - + * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns Date string in ISO8061 format, with or without 7 milliseconds component */ - function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) resource = "bs"; - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), - stringToSign - }; + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * Base64 encode. * - * Creates an instance of SASQueryParameters. + * @param content - + */ + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + /** + * Base64 decode. * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. + * @param encodedString - + */ + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + /** + * Generate a 64 bytes base64 block ID string. * - * WARNING: identifier will be ignored, permissions and expiresOn are required. + * @param blockIndex - + */ + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - 6; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + return base64encode(blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0")); + } + /** + * Delay specified time interval. * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - + * @param timeInMs - + * @param aborter - + * @param abortError - */ - function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) resource = "bs"; - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } + async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) clearTimeout(timeout); + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) aborter.removeEventListener("abort", abortHandler); + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) aborter.addEventListener("abort", abortHandler); + }); + } + /** + * String.prototype.padStart() + * + * @param currentString - + * @param targetLength - + * @param padString - + */ + function padStart(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) return currentString.padStart(targetLength, padString); + padString = padString || " "; + if (currentString.length > targetLength) return currentString; + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) padString += padString.repeat(targetLength / padString.length); + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) headers.set(name, "*****"); + else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) headers.set(name, sanitizeURL(value)); + else headers.set(name, value); + return headers; + } + /** + * If two strings are equal when compared case insensitive. + * + * @param str1 - + * @param str2 - + */ + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + /** + * Extracts account name from the url + * @param url - url to extract the account name from + * @returns with the account name + */ + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") accountName = parsedUrl.hostname.split(".")[0]; + else if (isIpEndpointStyle(parsedUrl)) accountName = parsedUrl.pathname.split("/")[1]; + else accountName = ""; + return accountName; + } catch (error) { + throw new Error("Unable to extract accountName with provided information."); } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), - stringToSign - }; + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. - * - * WARNING: identifier will be ignored, permissions and expiresOn are required. + * Convert Tags to encoded string. * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - + * @param tags - */ - function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) resource = "bs"; - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } + function toBlobTagsString(tags) { + if (tags === void 0) return; + const tagPairs = []; + for (const key in tags) if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; + tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - void 0, - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), - stringToSign - }; + return tagPairs.join("&"); } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * Convert Tags type to BlobTags. * - * Creates an instance of SASQueryParameters. + * @param tags - + */ + function toBlobTags(tags) { + if (tags === void 0) return; + const res = { blobTagSet: [] }; + for (const key in tags) if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; + res.blobTagSet.push({ + key, + value + }); + } + return res; + } + /** + * Covert BlobTags to Tags type. * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. + * @param tags - + */ + function toTags(tags) { + if (tags === void 0) return; + const res = {}; + for (const blobTag of tags.blobTagSet) res[blobTag.key] = blobTag.value; + return res; + } + /** + * Convert BlobQueryTextConfiguration to QuerySerialization type. * - * WARNING: identifier will be ignored, permissions and expiresOn are required. + * @param textConfiguration - + */ + function toQuerySerialization(textConfiguration) { + if (textConfiguration === void 0) return; + switch (textConfiguration.kind) { + case "csv": return { format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator || ",", + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders || false + } + } }; + case "json": return { format: { + type: "json", + jsonTextConfiguration: { recordSeparator: textConfiguration.recordSeparator } + } }; + case "arrow": return { format: { + type: "arrow", + arrowConfiguration: { schema: textConfiguration.schema } + } }; + case "parquet": return { format: { type: "parquet" } }; + default: throw Error("Invalid BlobQueryTextConfiguration."); + } + } + function parseObjectReplicationRecord(objectReplicationRecord) { + if (!objectReplicationRecord) return; + if ("policy-id" in objectReplicationRecord) return; + const orProperties = []; + for (const key in objectReplicationRecord) { + const ids = key.split("_"); + if (ids[0].startsWith("or-")) ids[0] = ids[0].substring(3); + const rule = { + ruleId: ids[1], + replicationStatus: objectReplicationRecord[key] + }; + const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); + if (policyIndex > -1) orProperties[policyIndex].rules.push(rule); + else orProperties.push({ + policyId: ids[0], + rules: [rule] + }); + } + return orProperties; + } + /** + * Attach a TokenCredential to an object. * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - + * @param thing - + * @param credential - */ - function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) resource = "bs"; - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function BlobNameToString(name) { + if (name.encoded) return decodeURIComponent(name.content); + else return name.content; + } + function ConvertInternalResponseOfListBlobFlat(internalResponse) { + return { + ...internalResponse, + segment: { blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + return { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + }) } + }; + } + function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + return { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + return { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + }) } + }; + } + function* ExtractPageRangeInfoItems(getPageRangesSegment) { + let pageRange = []; + let clearRange = []; + if (getPageRangesSegment.pageRange) pageRange = getPageRangesSegment.pageRange; + if (getPageRangesSegment.clearRange) clearRange = getPageRangesSegment.clearRange; + let pageRangeIndex = 0; + let clearRangeIndex = 0; + while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false + }; + ++pageRangeIndex; + } else { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true + }; + ++clearRangeIndex; } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - void 0, - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), - stringToSign + for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false + }; + for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true }; } - function getCanonicalName(accountName, containerName, blobName) { - const elements = [`/blob/${accountName}/${containerName}`]; - if (blobName) elements.push(`/${blobName}`); - return elements.join(""); + /** + * Escape the blobName but keep path separator ('/'). + */ + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) split[i] = encodeURIComponent(split[i]); + return split.join("/"); } - function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version$1 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version$1 < "2018-11-09") throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); - if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); - if (blobSASSignatureValues.versionId && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); - if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) throw RangeError("Must provide 'blobName' when providing 'versionId'."); - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version$1 < "2020-08-04") throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version$1 < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); - if (version$1 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); - if (version$1 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); - if (version$1 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); - if (blobSASSignatureValues.encryptionScope && version$1 < "2020-12-06") throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); - blobSASSignatureValues.version = version$1; - return blobSASSignatureValues; + /** + * A typesafe helper for ensuring that a given response object has + * the original _response attached. + * @param response - A response object from calling a client operation + * @returns The same object, but with known _response property + */ + function assertResponse(response) { + if (`_response` in response) return response; + throw new TypeError(`Unexpected response object ${response}`); } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageClient = void 0; + const StorageContextClient_js_1 = require_StorageContextClient(); + const Pipeline_js_1 = require_Pipeline(); + const utils_common_js_1 = require_utils_common$1(); /** - * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. */ - var BlobLeaseClient = class { + var StorageClient = class { /** - * Gets the lease Id. + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. * - * @readonly + * @internal */ - get leaseId() { - return this._leaseId; + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; + /** + * Creates an instance of StorageClient. + * @param url - url to resource + * @param pipeline - request policy pipeline. + */ + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); + this.pipeline = pipeline; + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); + const storageClientContext = this.storageClientContext; + storageClientContext.requestContentType = void 0; } + }; + exports.StorageClient = StorageClient; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.tracingClient = void 0; + const core_tracing_1 = require_commonjs$10(); + const constants_js_1 = require_constants$1(); + /** + * Creates a span using the global tracer. + * @internal + */ + exports.tracingClient = (0, core_tracing_1.createTracingClient)({ + packageName: "@azure/storage-blob", + packageVersion: constants_js_1.SDK_VERSION, + namespace: "Microsoft.Storage" + }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobSASPermissions = void 0; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ + var BlobSASPermissions = class BlobSASPermissions { /** - * Gets the url. + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. * - * @readonly + * @param permissions - */ - get url() { - return this._url; + static parse(permissions) { + const blobSASPermissions = new BlobSASPermissions(); + for (const char of permissions) switch (char) { + case "r": + blobSASPermissions.read = true; + break; + case "a": + blobSASPermissions.add = true; + break; + case "c": + blobSASPermissions.create = true; + break; + case "w": + blobSASPermissions.write = true; + break; + case "d": + blobSASPermissions.delete = true; + break; + case "x": + blobSASPermissions.deleteVersion = true; + break; + case "t": + blobSASPermissions.tag = true; + break; + case "m": + blobSASPermissions.move = true; + break; + case "e": + blobSASPermissions.execute = true; + break; + case "i": + blobSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + blobSASPermissions.permanentDelete = true; + break; + default: throw new RangeError(`Invalid permission: ${char}`); + } + return blobSASPermissions; } /** - * Creates an instance of BlobLeaseClient. - * @param client - The client to make the lease operation requests. - * @param leaseId - Initial proposed lease id. + * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - */ - constructor(client, leaseId$1) { - const clientContext = client.storageClientContext; - this._url = client.url; - if (client.name === void 0) { - this._isContainer = true; - this._containerOrBlobOperation = clientContext.container; - } else { - this._isContainer = false; - this._containerOrBlobOperation = clientContext.blob; + static from(permissionLike) { + const blobSASPermissions = new BlobSASPermissions(); + if (permissionLike.read) blobSASPermissions.read = true; + if (permissionLike.add) blobSASPermissions.add = true; + if (permissionLike.create) blobSASPermissions.create = true; + if (permissionLike.write) blobSASPermissions.write = true; + if (permissionLike.delete) blobSASPermissions.delete = true; + if (permissionLike.deleteVersion) blobSASPermissions.deleteVersion = true; + if (permissionLike.tag) blobSASPermissions.tag = true; + if (permissionLike.move) blobSASPermissions.move = true; + if (permissionLike.execute) blobSASPermissions.execute = true; + if (permissionLike.setImmutabilityPolicy) blobSASPermissions.setImmutabilityPolicy = true; + if (permissionLike.permanentDelete) blobSASPermissions.permanentDelete = true; + return blobSASPermissions; + } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns A string which represents the BlobSASPermissions + */ + toString() { + const permissions = []; + if (this.read) permissions.push("r"); + if (this.add) permissions.push("a"); + if (this.create) permissions.push("c"); + if (this.write) permissions.push("w"); + if (this.delete) permissions.push("d"); + if (this.deleteVersion) permissions.push("x"); + if (this.tag) permissions.push("t"); + if (this.move) permissions.push("m"); + if (this.execute) permissions.push("e"); + if (this.setImmutabilityPolicy) permissions.push("i"); + if (this.permanentDelete) permissions.push("y"); + return permissions.join(""); + } + }; + exports.BlobSASPermissions = BlobSASPermissions; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ContainerSASPermissions = void 0; + /** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ + var ContainerSASPermissions = class ContainerSASPermissions { + /** + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @param permissions - + */ + static parse(permissions) { + const containerSASPermissions = new ContainerSASPermissions(); + for (const char of permissions) switch (char) { + case "r": + containerSASPermissions.read = true; + break; + case "a": + containerSASPermissions.add = true; + break; + case "c": + containerSASPermissions.create = true; + break; + case "w": + containerSASPermissions.write = true; + break; + case "d": + containerSASPermissions.delete = true; + break; + case "l": + containerSASPermissions.list = true; + break; + case "t": + containerSASPermissions.tag = true; + break; + case "x": + containerSASPermissions.deleteVersion = true; + break; + case "m": + containerSASPermissions.move = true; + break; + case "e": + containerSASPermissions.execute = true; + break; + case "i": + containerSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + containerSASPermissions.permanentDelete = true; + break; + case "f": + containerSASPermissions.filterByTags = true; + break; + default: throw new RangeError(`Invalid permission ${char}`); } - if (!leaseId$1) leaseId$1 = coreUtil.randomUUID(); - this._leaseId = leaseId$1; + return containerSASPermissions; } /** - * Establishes and manages a lock on a container for delete operations, or on a blob - * for write and delete operations. - * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob + * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. * - * @param duration - Must be between 15 to 60 seconds, or infinite (-1) - * @param options - option to configure lease management operations. - * @returns Response data for acquire lease operation. + * @param permissionLike - + */ + static from(permissionLike) { + const containerSASPermissions = new ContainerSASPermissions(); + if (permissionLike.read) containerSASPermissions.read = true; + if (permissionLike.add) containerSASPermissions.add = true; + if (permissionLike.create) containerSASPermissions.create = true; + if (permissionLike.write) containerSASPermissions.write = true; + if (permissionLike.delete) containerSASPermissions.delete = true; + if (permissionLike.list) containerSASPermissions.list = true; + if (permissionLike.deleteVersion) containerSASPermissions.deleteVersion = true; + if (permissionLike.tag) containerSASPermissions.tag = true; + if (permissionLike.move) containerSASPermissions.move = true; + if (permissionLike.execute) containerSASPermissions.execute = true; + if (permissionLike.setImmutabilityPolicy) containerSASPermissions.setImmutabilityPolicy = true; + if (permissionLike.permanentDelete) containerSASPermissions.permanentDelete = true; + if (permissionLike.filterByTags) containerSASPermissions.filterByTags = true; + return containerSASPermissions; + } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. */ - async acquireLease(duration$1, options = {}) { - var _a$2, _b$1, _c$1, _d$1, _e; - if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a$3; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ - abortSignal: options.abortSignal, - duration: duration$1, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), - proposedLeaseId: this._leaseId, - tracingOptions: updatedOptions.tracingOptions - })); - }); - } + write = false; /** - * To change the ID of the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param proposedLeaseId - the proposed new lease Id. - * @param options - option to configure lease management operations. - * @returns Response data for change lease operation. + * Specifies Delete access granted. */ - async changeLease(proposedLeaseId$1, options = {}) { - var _a$2, _b$1, _c$1, _d$1, _e; - if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a$3; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId$1, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - this._leaseId = proposedLeaseId$1; - return response; - }); - } + delete = false; /** - * To free the lease if it is no longer needed so that another client may - * immediately acquire a lease against the container or the blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param options - option to configure lease management operations. - * @returns Response data for release lease operation. + * Specifies Delete version access granted. */ - async releaseLease(options = {}) { - var _a$2, _b$1, _c$1, _d$1, _e; - if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a$3; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - }); - } + deleteVersion = false; /** - * To renew the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param options - Optional option to configure lease management operations. - * @returns Response data for renew lease operation. + * Specifies List access granted. */ - async renewLease(options = {}) { - var _a$2, _b$1, _c$1, _d$1, _e; - if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a$3; - return this._containerOrBlobOperation.renewLease(this._leaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - }); - }); - } + list = false; /** - * To end the lease but ensure that another client cannot acquire a new lease - * until the current lease period has expired. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param breakPeriod - Break period - * @param options - Optional options to configure lease management operations. - * @returns Response data for break lease operation. + * Specfies Tag access granted. */ - async breakLease(breakPeriod$1, options = {}) { - var _a$2, _b$1, _c$1, _d$1, _e; - if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a$3; - const operationOptions = { - abortSignal: options.abortSignal, - breakPeriod: breakPeriod$1, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); - }); - } - }; - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. - */ - var RetriableReadableStream = class extends stream$2.Readable { + tag = false; /** - * Creates an instance of RetriableReadableStream. - * - * @param source - The current ReadableStream returned from getter - * @param getter - A method calling downloading request returning - * a new ReadableStream from specified offset - * @param offset - Offset position in original data source to read - * @param count - How much data in original data source to read - * @param options - + * Specifies Move access granted. */ - constructor(source, getter, offset, count, options = {}) { - super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) this.onProgress({ loadedBytes: this.offset - this.start }); - if (!this.push(data)) this.source.pause(); - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) this.push(null); - else if (this.offset <= this.end) if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error) => { - this.destroy(error); - }); - } else this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - else this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - }; - this.getter = getter; - this.source = source; - this.start = offset; - this.offset = offset; - this.end = offset + count - 1; - this.maxRetryRequests = options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; - this.onProgress = options.onProgress; - this.options = options; - this.setSourceEventHandlers(); - } - _read() { - this.source.resume(); - } - setSourceEventHandlers() { - this.source.on("data", this.sourceDataHandler); - this.source.on("end", this.sourceErrorOrEndHandler); - this.source.on("error", this.sourceErrorOrEndHandler); - this.source.on("aborted", this.sourceAbortedHandler); - } - removeSourceEventHandlers() { - this.source.removeListener("data", this.sourceDataHandler); - this.source.removeListener("end", this.sourceErrorOrEndHandler); - this.source.removeListener("error", this.sourceErrorOrEndHandler); - this.source.removeListener("aborted", this.sourceAbortedHandler); - } - _destroy(error, callback) { - this.removeSourceEventHandlers(); - this.source.destroy(); - callback(error === null ? void 0 : error); - } - }; - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will - * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot - * trigger retries defined in pipeline retry policy.) - * - * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js - * Readable stream. - */ - var BlobDownloadResponse = class { + move = false; /** - * Indicates that the service supports - * requests for partial file content. - * - * @readonly + * Specifies Execute access granted. */ - get acceptRanges() { - return this.originalResponse.acceptRanges; - } + execute = false; /** - * Returns if it was previously specified - * for the file. - * - * @readonly + * Specifies SetImmutabilityPolicy access granted. */ - get cacheControl() { - return this.originalResponse.cacheControl; - } + setImmutabilityPolicy = false; /** - * Returns the value that was specified - * for the 'x-ms-content-disposition' header and specifies how to process the - * response. - * - * @readonly + * Specifies that Permanent Delete is permitted. */ - get contentDisposition() { - return this.originalResponse.contentDisposition; - } + permanentDelete = false; /** - * Returns the value that was specified - * for the Content-Encoding request header. - * - * @readonly + * Specifies that Filter Blobs by Tags is permitted. */ - get contentEncoding() { - return this.originalResponse.contentEncoding; - } + filterByTags = false; /** - * Returns the value that was specified - * for the Content-Language request header. + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * - * @readonly */ - get contentLanguage() { - return this.originalResponse.contentLanguage; + toString() { + const permissions = []; + if (this.read) permissions.push("r"); + if (this.add) permissions.push("a"); + if (this.create) permissions.push("c"); + if (this.write) permissions.push("w"); + if (this.delete) permissions.push("d"); + if (this.deleteVersion) permissions.push("x"); + if (this.list) permissions.push("l"); + if (this.tag) permissions.push("t"); + if (this.move) permissions.push("m"); + if (this.execute) permissions.push("e"); + if (this.setImmutabilityPolicy) permissions.push("i"); + if (this.permanentDelete) permissions.push("y"); + if (this.filterByTags) permissions.push("f"); + return permissions.join(""); } + }; + exports.ContainerSASPermissions = ContainerSASPermissions; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ipRangeToString = ipRangeToString; + /** + * Generate SasIPRange format string. For example: + * + * "8.8.8.8" or "1.1.1.1-255.255.255.255" + * + * @param ipRange - + */ + function ipRangeToString(ipRange) { + return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SASQueryParameters = exports.SASProtocol = void 0; + const SasIPRange_js_1 = require_SasIPRange(); + const utils_common_js_1 = require_utils_common$1(); + /** + * Protocols for generated SAS. + */ + var SASProtocol; + (function(SASProtocol) { /** - * The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs. - * - * @readonly + * Protocol that allows HTTPS only */ - get blobSequenceNumber() { - return this.originalResponse.blobSequenceNumber; - } + SASProtocol["Https"] = "https"; /** - * The blob's type. Possible values include: - * 'BlockBlob', 'PageBlob', 'AppendBlob'. - * - * @readonly + * Protocol that allows both HTTPS and HTTP */ - get blobType() { - return this.originalResponse.blobType; - } + SASProtocol["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports.SASProtocol = SASProtocol = {})); + /** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. + */ + var SASQueryParameters = class { /** - * The number of bytes present in the - * response body. - * - * @readonly + * The storage API version. */ - get contentLength() { - return this.originalResponse.contentLength; - } + version; /** - * If the file has an MD5 hash and the - * request is to read the full file, this response header is returned so that - * the client can check for message content integrity. If the request is to - * read a specified range and the 'x-ms-range-get-content-md5' is set to - * true, then the request returns an MD5 hash for the range, as long as the - * range size is less than or equal to 4 MB. If neither of these sets of - * conditions is true, then no value is returned for the 'Content-MD5' - * header. - * - * @readonly + * Optional. The allowed HTTP protocol(s). */ - get contentMD5() { - return this.originalResponse.contentMD5; - } + protocol; /** - * Indicates the range of bytes returned if - * the client requested a subset of the file by setting the Range request - * header. - * - * @readonly + * Optional. The start time for this SAS token. */ - get contentRange() { - return this.originalResponse.contentRange; - } + startsOn; /** - * The content type specified for the file. - * The default content type is 'application/octet-stream' - * - * @readonly + * Optional only when identifier is provided. The expiry time for this SAS token. */ - get contentType() { - return this.originalResponse.contentType; - } + expiresOn; /** - * Conclusion time of the last attempted - * Copy File operation where this file was the destination file. This value - * can specify the time of a completed, aborted, or failed copy attempt. - * - * @readonly + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. */ - get copyCompletedOn() { - return this.originalResponse.copyCompletedOn; - } + permissions; /** - * String identifier for the last attempted Copy - * File operation where this file was the destination file. - * - * @readonly + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. */ - get copyId() { - return this.originalResponse.copyId; - } + services; /** - * Contains the number of bytes copied and - * the total bytes in the source in the last attempted Copy File operation - * where this file was the destination file. Can show between 0 and - * Content-Length bytes copied. - * - * @readonly + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. */ - get copyProgress() { - return this.originalResponse.copyProgress; - } + resourceTypes; /** - * URL up to 2KB in length that specifies the - * source file used in the last attempted Copy File operation where this file - * was the destination file. + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). * - * @readonly + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy */ - get copySource() { - return this.originalResponse.copySource; - } + identifier; /** - * State of the copy operation - * identified by 'x-ms-copy-id'. Possible values include: 'pending', - * 'success', 'aborted', 'failed' - * - * @readonly + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user would is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. */ - get copyStatus() { - return this.originalResponse.copyStatus; - } + delegatedUserObjectId; /** - * Only appears when - * x-ms-copy-status is failed or pending. Describes cause of fatal or - * non-fatal copy operation failure. - * - * @readonly + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. */ - get copyStatusDescription() { - return this.originalResponse.copyStatusDescription; - } + encryptionScope; /** - * When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible - * values include: 'infinite', 'fixed'. - * - * @readonly + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only */ - get leaseDuration() { - return this.originalResponse.leaseDuration; - } + resource; /** - * Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. - * - * @readonly + * The signature for the SAS token. */ - get leaseState() { - return this.originalResponse.leaseState; - } + signature; /** - * The current lease status of the - * blob. Possible values include: 'locked', 'unlocked'. - * - * @readonly + * Value for cache-control header in Blob/File Service SAS. */ - get leaseStatus() { - return this.originalResponse.leaseStatus; - } + cacheControl; /** - * A UTC date/time value generated by the service that - * indicates the time at which the response was initiated. - * - * @readonly + * Value for content-disposition header in Blob/File Service SAS. */ - get date() { - return this.originalResponse.date; - } + contentDisposition; /** - * The number of committed blocks - * present in the blob. This header is returned only for append blobs. - * - * @readonly + * Value for content-encoding header in Blob/File Service SAS. */ - get blobCommittedBlockCount() { - return this.originalResponse.blobCommittedBlockCount; - } + contentEncoding; /** - * The ETag contains a value that you can use to - * perform operations conditionally, in quotes. - * - * @readonly + * Value for content-length header in Blob/File Service SAS. */ - get etag() { - return this.originalResponse.etag; - } + contentLanguage; /** - * The number of tags associated with the blob - * - * @readonly + * Value for content-type header in Blob/File Service SAS. */ - get tagCount() { - return this.originalResponse.tagCount; - } + contentType; /** - * The error code. - * - * @readonly + * Inner value of getter ipRange. */ - get errorCode() { - return this.originalResponse.errorCode; - } + ipRangeInner; /** - * The value of this header is set to - * true if the file data and application metadata are completely encrypted - * using the specified algorithm. Otherwise, the value is set to false (when - * the file is unencrypted, or if only parts of the file/application metadata - * are encrypted). - * - * @readonly + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. */ - get isServerEncrypted() { - return this.originalResponse.isServerEncrypted; - } + signedOid; /** - * If the blob has a MD5 hash, and if - * request contains range header (Range or x-ms-range), this response header - * is returned with the value of the whole blob's MD5 value. This value may - * or may not be equal to the value returned in Content-MD5 header, with the - * latter calculated from the requested range. - * - * @readonly + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. */ - get blobContentMD5() { - return this.originalResponse.blobContentMD5; - } + signedTenantId; /** - * Returns the date and time the file was last - * modified. Any operation that modifies the file or its properties updates - * the last modified time. - * - * @readonly + * The date-time the key is active. + * Property of user delegation key. */ - get lastModified() { - return this.originalResponse.lastModified; - } + signedStartsOn; /** - * Returns the UTC date and time generated by the service that indicates the time at which the blob was - * last read or written to. - * - * @readonly + * The date-time the key expires. + * Property of user delegation key. */ - get lastAccessed() { - return this.originalResponse.lastAccessed; - } + signedExpiresOn; /** - * Returns the date and time the blob was created. - * - * @readonly + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. */ - get createdOn() { - return this.originalResponse.createdOn; - } + signedService; /** - * A name-value pair - * to associate with a file storage object. - * - * @readonly + * The service version that created the user delegation key. + * Property of user delegation key. */ - get metadata() { - return this.originalResponse.metadata; - } + signedVersion; /** - * This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. - * - * @readonly + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. */ - get requestId() { - return this.originalResponse.requestId; - } + preauthorizedAgentObjectId; /** - * If a client request id header is sent in the request, this header will be present in the - * response with the same value. + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; + /** + * Optional. IP range allowed for this SAS. * * @readonly */ - get clientRequestId() { - return this.originalResponse.clientRequestId; + get ipRange() { + if (this.ipRangeInner) return { + end: this.ipRangeInner.end, + start: this.ipRangeInner.start + }; + } + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope, delegatedUserObjectId) { + this.version = version; + this.signature = signature; + if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { + this.permissions = permissionsOrOptions.permissions; + this.services = permissionsOrOptions.services; + this.resourceTypes = permissionsOrOptions.resourceTypes; + this.protocol = permissionsOrOptions.protocol; + this.startsOn = permissionsOrOptions.startsOn; + this.expiresOn = permissionsOrOptions.expiresOn; + this.ipRangeInner = permissionsOrOptions.ipRange; + this.identifier = permissionsOrOptions.identifier; + this.delegatedUserObjectId = permissionsOrOptions.delegatedUserObjectId; + this.encryptionScope = permissionsOrOptions.encryptionScope; + this.resource = permissionsOrOptions.resource; + this.cacheControl = permissionsOrOptions.cacheControl; + this.contentDisposition = permissionsOrOptions.contentDisposition; + this.contentEncoding = permissionsOrOptions.contentEncoding; + this.contentLanguage = permissionsOrOptions.contentLanguage; + this.contentType = permissionsOrOptions.contentType; + if (permissionsOrOptions.userDelegationKey) { + this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; + this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; + this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; + this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; + this.signedService = permissionsOrOptions.userDelegationKey.signedService; + this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; + this.correlationId = permissionsOrOptions.correlationId; + } + } else { + this.services = services; + this.resourceTypes = resourceTypes; + this.expiresOn = expiresOn; + this.permissions = permissionsOrOptions; + this.protocol = protocol; + this.startsOn = startsOn; + this.ipRangeInner = ipRange; + this.delegatedUserObjectId = delegatedUserObjectId; + this.encryptionScope = encryptionScope; + this.identifier = identifier; + this.resource = resource; + this.cacheControl = cacheControl; + this.contentDisposition = contentDisposition; + this.contentEncoding = contentEncoding; + this.contentLanguage = contentLanguage; + this.contentType = contentType; + if (userDelegationKey) { + this.signedOid = userDelegationKey.signedObjectId; + this.signedTenantId = userDelegationKey.signedTenantId; + this.signedStartsOn = userDelegationKey.signedStartsOn; + this.signedExpiresOn = userDelegationKey.signedExpiresOn; + this.signedService = userDelegationKey.signedService; + this.signedVersion = userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; + this.correlationId = correlationId; + } + } } /** - * Indicates the version of the Blob service used - * to execute the request. + * Encodes all SAS query parameters into a string that can be appended to a URL. * - * @readonly */ - get version() { - return this.originalResponse.version; + toString() { + const params = [ + "sv", + "ss", + "srt", + "spr", + "st", + "se", + "sip", + "si", + "ses", + "skoid", + "sktid", + "skt", + "ske", + "sks", + "skv", + "sr", + "sp", + "sig", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "saoid", + "scid", + "sduoid" + ]; + const queries = []; + for (const param of params) switch (param) { + case "sv": + this.tryAppendQueryParameter(queries, param, this.version); + break; + case "ss": + this.tryAppendQueryParameter(queries, param, this.services); + break; + case "srt": + this.tryAppendQueryParameter(queries, param, this.resourceTypes); + break; + case "spr": + this.tryAppendQueryParameter(queries, param, this.protocol); + break; + case "st": + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); + break; + case "se": + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); + break; + case "sip": + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); + break; + case "si": + this.tryAppendQueryParameter(queries, param, this.identifier); + break; + case "ses": + this.tryAppendQueryParameter(queries, param, this.encryptionScope); + break; + case "skoid": + this.tryAppendQueryParameter(queries, param, this.signedOid); + break; + case "sktid": + this.tryAppendQueryParameter(queries, param, this.signedTenantId); + break; + case "skt": + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); + break; + case "ske": + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); + break; + case "sks": + this.tryAppendQueryParameter(queries, param, this.signedService); + break; + case "skv": + this.tryAppendQueryParameter(queries, param, this.signedVersion); + break; + case "sr": + this.tryAppendQueryParameter(queries, param, this.resource); + break; + case "sp": + this.tryAppendQueryParameter(queries, param, this.permissions); + break; + case "sig": + this.tryAppendQueryParameter(queries, param, this.signature); + break; + case "rscc": + this.tryAppendQueryParameter(queries, param, this.cacheControl); + break; + case "rscd": + this.tryAppendQueryParameter(queries, param, this.contentDisposition); + break; + case "rsce": + this.tryAppendQueryParameter(queries, param, this.contentEncoding); + break; + case "rscl": + this.tryAppendQueryParameter(queries, param, this.contentLanguage); + break; + case "rsct": + this.tryAppendQueryParameter(queries, param, this.contentType); + break; + case "saoid": + this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); + break; + case "scid": + this.tryAppendQueryParameter(queries, param, this.correlationId); + break; + case "sduoid": + this.tryAppendQueryParameter(queries, param, this.delegatedUserObjectId); + break; + } + return queries.join("&"); } /** - * Indicates the versionId of the downloaded blob version. + * A private helper method used to filter and append query key/value pairs into an array. * - * @readonly + * @param queries - + * @param key - + * @param value - */ - get versionId() { - return this.originalResponse.versionId; + tryAppendQueryParameter(queries, key, value) { + if (!value) return; + key = encodeURIComponent(key); + value = encodeURIComponent(value); + if (key.length > 0 && value.length > 0) queries.push(`${key}=${value}`); } - /** - * Indicates whether version of this blob is a current version. - * - * @readonly - */ - get isCurrentVersion() { - return this.originalResponse.isCurrentVersion; + }; + exports.SASQueryParameters = SASQueryParameters; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + const BlobSASPermissions_js_1 = require_BlobSASPermissions(); + const ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + const storage_common_1 = require_commonjs$4(); + const SasIPRange_js_1 = require_SasIPRange(); + const SASQueryParameters_js_1 = require_SASQueryParameters(); + const constants_js_1 = require_constants$1(); + const utils_common_js_1 = require_utils_common$1(); + const storage_common_2 = require_commonjs$4(); + function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; + } + function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof storage_common_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + let userDelegationKeyCredential; + if (sharedKeyCredential === void 0 && accountName !== void 0) userDelegationKeyCredential = new storage_common_2.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); + if (version >= "2020-12-06") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); + else if (version >= "2025-07-05") return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + else return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2018-11-09") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); + else if (version >= "2020-02-10") return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); + else return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2015-04-05") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); + else throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); + throw new RangeError("'version' must be >= '2015-04-05'."); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ + function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + let resource = "c"; + if (blobSASSignatureValues.blobName) resource = "b"; + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ + function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } } - /** - * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned - * when the blob was encrypted with a customer-provided key. - * - * @readonly - */ - get encryptionKeySha256() { - return this.originalResponse.encryptionKeySha256; + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ + function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } } - /** - * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to - * true, then the request returns a crc64 for the range, as long as the range size is less than - * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is - * specified in the same request, it will fail with 400(Bad Request) - */ - get contentCrc64() { - return this.originalResponse.contentCrc64; + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ + function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } } - /** - * Object Replication Policy Id of the destination blob. - * - * @readonly - */ - get objectReplicationDestinationPolicyId() { - return this.originalResponse.objectReplicationDestinationPolicyId; + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ + function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } } - /** - * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. - * - * @readonly - */ - get objectReplicationSourceProperties() { - return this.originalResponse.objectReplicationSourceProperties; + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ + function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } } - /** - * If this blob has been sealed. - * - * @readonly - */ - get isSealed() { - return this.originalResponse.isSealed; + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + blobSASSignatureValues.correlationId, + void 0, + blobSASSignatureValues.delegatedUserObjectId, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.delegatedUserObjectId), + stringToSign + }; + } + function getCanonicalName(accountName, containerName, blobName) { + const elements = [`/blob/${accountName}/${containerName}`]; + if (blobName) elements.push(`/${blobName}`); + return elements.join(""); + } + function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); + if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); + if (blobSASSignatureValues.versionId && version < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); + if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) throw RangeError("Must provide 'blobName' when providing 'versionId'."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); + blobSASSignatureValues.version = version; + return blobSASSignatureValues; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobLeaseClient = void 0; + const core_util_1 = require_commonjs$11(); + const constants_js_1 = require_constants$1(); + const tracing_js_1 = require_tracing(); + const utils_common_js_1 = require_utils_common$1(); + /** + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. + */ + var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** - * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. + * Gets the lease Id. * * @readonly */ - get immutabilityPolicyExpiresOn() { - return this.originalResponse.immutabilityPolicyExpiresOn; + get leaseId() { + return this._leaseId; } /** - * Indicates immutability policy mode. + * Gets the url. * * @readonly */ - get immutabilityPolicyMode() { - return this.originalResponse.immutabilityPolicyMode; + get url() { + return this._url; } /** - * Indicates if a legal hold is present on the blob. - * - * @readonly + * Creates an instance of BlobLeaseClient. + * @param client - The client to make the lease operation requests. + * @param leaseId - Initial proposed lease id. */ - get legalHold() { - return this.originalResponse.legalHold; + constructor(client, leaseId) { + const clientContext = client.storageClientContext; + this._url = client.url; + if (client.name === void 0) { + this._isContainer = true; + this._containerOrBlobOperation = clientContext.container; + } else { + this._isContainer = false; + this._containerOrBlobOperation = clientContext.blob; + } + if (!leaseId) leaseId = (0, core_util_1.randomUUID)(); + this._leaseId = leaseId; } /** - * The response body as a browser Blob. - * Always undefined in node.js. + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * - * @readonly + * @param duration - Must be between 15 to 60 seconds, or infinite (-1) + * @param options - option to configure lease management operations. + * @returns Response data for acquire lease operation. */ - get contentAsBlob() { - return this.originalResponse.blobBody; + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ + abortSignal: options.abortSignal, + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + proposedLeaseId: this._leaseId, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * The response body as a node.js Readable stream. - * Always undefined in the browser. - * - * It will automatically retry when internal read stream unexpected ends. + * To change the ID of the lease. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * - * @readonly - */ - get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; - } - /** - * The HTTP response. + * @param proposedLeaseId - the proposed new lease Id. + * @param options - option to configure lease management operations. + * @returns Response data for change lease operation. */ - get _response() { - return this.originalResponse._response; + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions + })); + this._leaseId = proposedLeaseId; + return response; + }); } /** - * Creates an instance of BlobDownloadResponse. + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * - * @param originalResponse - - * @param getter - - * @param offset - - * @param count - - * @param options - + * @param options - option to configure lease management operations. + * @returns Response data for release lease operation. */ - constructor(originalResponse$1, getter, offset, count, options = {}) { - this.originalResponse = originalResponse$1; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + async releaseLease(options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions + })); + }); } - }; - const AVRO_SYNC_MARKER_SIZE = 16; - const AVRO_INIT_BYTES = new Uint8Array([ - 79, - 98, - 106, - 1 - ]); - const AVRO_CODEC_KEY = "avro.codec"; - const AVRO_SCHEMA_KEY = "avro.schema"; - var AvroParser = class AvroParser { /** - * Reads a fixed number of bytes from the stream. + * To renew the lease. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * - * @param stream - - * @param length - - * @param options - + * @param options - Optional option to configure lease management operations. + * @returns Response data for renew lease operation. */ - static async readFixedBytes(stream$3, length, options = {}) { - const bytes = await stream$3.read(length, { abortSignal: options.abortSignal }); - if (bytes.length !== length) throw new Error("Hit stream end."); - return bytes; + async renewLease(options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { + return this._containerOrBlobOperation.renewLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions + }); + }); } /** - * Reads a single byte from the stream. + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * - * @param stream - - * @param options - - */ - static async readByte(stream$3, options = {}) { - const buf = await AvroParser.readFixedBytes(stream$3, 1, options); - return buf[0]; - } - static async readZigZagLong(stream$3, options = {}) { - let zigZagEncoded = 0; - let significanceInBit = 0; - let byte, haveMoreByte, significanceInFloat; - do { - byte = await AvroParser.readByte(stream$3, options); - haveMoreByte = byte & 128; - zigZagEncoded |= (byte & 127) << significanceInBit; - significanceInBit += 7; - } while (haveMoreByte && significanceInBit < 28); - if (haveMoreByte) { - zigZagEncoded = zigZagEncoded; - significanceInFloat = 268435456; - do { - byte = await AvroParser.readByte(stream$3, options); - zigZagEncoded += (byte & 127) * significanceInFloat; - significanceInFloat *= 128; - } while (byte & 128); - const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; - if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) throw new Error("Integer overflow."); - return res; - } - return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); - } - static async readLong(stream$3, options = {}) { - return AvroParser.readZigZagLong(stream$3, options); - } - static async readInt(stream$3, options = {}) { - return AvroParser.readZigZagLong(stream$3, options); - } - static async readNull() { - return null; - } - static async readBoolean(stream$3, options = {}) { - const b = await AvroParser.readByte(stream$3, options); - if (b === 1) return true; - else if (b === 0) return false; - else throw new Error("Byte was not a boolean."); - } - static async readFloat(stream$3, options = {}) { - const u8arr = await AvroParser.readFixedBytes(stream$3, 4, options); - const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); - return view.getFloat32(0, true); - } - static async readDouble(stream$3, options = {}) { - const u8arr = await AvroParser.readFixedBytes(stream$3, 8, options); - const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); - return view.getFloat64(0, true); - } - static async readBytes(stream$3, options = {}) { - const size = await AvroParser.readLong(stream$3, options); - if (size < 0) throw new Error("Bytes size was negative."); - return stream$3.read(size, { abortSignal: options.abortSignal }); - } - static async readString(stream$3, options = {}) { - const u8arr = await AvroParser.readBytes(stream$3, options); - const utf8decoder = new TextDecoder(); - return utf8decoder.decode(u8arr); - } - static async readMapPair(stream$3, readItemMethod, options = {}) { - const key = await AvroParser.readString(stream$3, options); - const value = await readItemMethod(stream$3, options); - return { - key, - value - }; - } - static async readMap(stream$3, readItemMethod, options = {}) { - const readPairMethod = (s$1, opts = {}) => { - return AvroParser.readMapPair(s$1, readItemMethod, opts); - }; - const pairs = await AvroParser.readArray(stream$3, readPairMethod, options); - const dict = {}; - for (const pair of pairs) dict[pair.key] = pair.value; - return dict; - } - static async readArray(stream$3, readItemMethod, options = {}) { - const items = []; - for (let count = await AvroParser.readLong(stream$3, options); count !== 0; count = await AvroParser.readLong(stream$3, options)) { - if (count < 0) { - await AvroParser.readLong(stream$3, options); - count = -count; - } - while (count--) { - const item = await readItemMethod(stream$3, options); - items.push(item); - } - } - return items; - } - }; - var AvroComplex; - (function(AvroComplex$1) { - AvroComplex$1["RECORD"] = "record"; - AvroComplex$1["ENUM"] = "enum"; - AvroComplex$1["ARRAY"] = "array"; - AvroComplex$1["MAP"] = "map"; - AvroComplex$1["UNION"] = "union"; - AvroComplex$1["FIXED"] = "fixed"; - })(AvroComplex || (AvroComplex = {})); - var AvroPrimitive; - (function(AvroPrimitive$1) { - AvroPrimitive$1["NULL"] = "null"; - AvroPrimitive$1["BOOLEAN"] = "boolean"; - AvroPrimitive$1["INT"] = "int"; - AvroPrimitive$1["LONG"] = "long"; - AvroPrimitive$1["FLOAT"] = "float"; - AvroPrimitive$1["DOUBLE"] = "double"; - AvroPrimitive$1["BYTES"] = "bytes"; - AvroPrimitive$1["STRING"] = "string"; - })(AvroPrimitive || (AvroPrimitive = {})); - var AvroType = class AvroType { - /** - * Determines the AvroType from the Avro Schema. + * @param breakPeriod - Break period + * @param options - Optional options to configure lease management operations. + * @returns Response data for break lease operation. */ - static fromSchema(schema) { - if (typeof schema === "string") return AvroType.fromStringSchema(schema); - else if (Array.isArray(schema)) return AvroType.fromArraySchema(schema); - else return AvroType.fromObjectSchema(schema); - } - static fromStringSchema(schema) { - switch (schema) { - case AvroPrimitive.NULL: - case AvroPrimitive.BOOLEAN: - case AvroPrimitive.INT: - case AvroPrimitive.LONG: - case AvroPrimitive.FLOAT: - case AvroPrimitive.DOUBLE: - case AvroPrimitive.BYTES: - case AvroPrimitive.STRING: return new AvroPrimitiveType(schema); - default: throw new Error(`Unexpected Avro type ${schema}`); - } - } - static fromArraySchema(schema) { - return new AvroUnionType(schema.map(AvroType.fromSchema)); - } - static fromObjectSchema(schema) { - const type = schema.type; - try { - return AvroType.fromStringSchema(type); - } catch (_a$2) {} - switch (type) { - case AvroComplex.RECORD: - if (schema.aliases) throw new Error(`aliases currently is not supported, schema: ${schema}`); - if (!schema.name) throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); - const fields = {}; - if (!schema.fields) throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); - for (const field of schema.fields) fields[field.name] = AvroType.fromSchema(field.type); - return new AvroRecordType(fields, schema.name); - case AvroComplex.ENUM: - if (schema.aliases) throw new Error(`aliases currently is not supported, schema: ${schema}`); - if (!schema.symbols) throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); - return new AvroEnumType(schema.symbols); - case AvroComplex.MAP: - if (!schema.values) throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); - return new AvroMapType(AvroType.fromSchema(schema.values)); - case AvroComplex.ARRAY: - case AvroComplex.FIXED: - default: throw new Error(`Unexpected Avro type ${type} in ${schema}`); - } - } - }; - var AvroPrimitiveType = class extends AvroType { - constructor(primitive) { - super(); - this._primitive = primitive; - } - read(stream$3, options = {}) { - switch (this._primitive) { - case AvroPrimitive.NULL: return AvroParser.readNull(); - case AvroPrimitive.BOOLEAN: return AvroParser.readBoolean(stream$3, options); - case AvroPrimitive.INT: return AvroParser.readInt(stream$3, options); - case AvroPrimitive.LONG: return AvroParser.readLong(stream$3, options); - case AvroPrimitive.FLOAT: return AvroParser.readFloat(stream$3, options); - case AvroPrimitive.DOUBLE: return AvroParser.readDouble(stream$3, options); - case AvroPrimitive.BYTES: return AvroParser.readBytes(stream$3, options); - case AvroPrimitive.STRING: return AvroParser.readString(stream$3, options); - default: throw new Error("Unknown Avro Primitive"); - } - } - }; - var AvroEnumType = class extends AvroType { - constructor(symbols) { - super(); - this._symbols = symbols; - } - async read(stream$3, options = {}) { - const value = await AvroParser.readInt(stream$3, options); - return this._symbols[value]; - } - }; - var AvroUnionType = class extends AvroType { - constructor(types) { - super(); - this._types = types; - } - async read(stream$3, options = {}) { - const typeIndex = await AvroParser.readInt(stream$3, options); - return this._types[typeIndex].read(stream$3, options); - } - }; - var AvroMapType = class extends AvroType { - constructor(itemType) { - super(); - this._itemType = itemType; - } - read(stream$3, options = {}) { - const readItemMethod = (s$1, opts) => { - return this._itemType.read(s$1, opts); - }; - return AvroParser.readMap(stream$3, readItemMethod, options); - } - }; - var AvroRecordType = class extends AvroType { - constructor(fields, name) { - super(); - this._fields = fields; - this._name = name; - } - async read(stream$3, options = {}) { - const record = {}; - record["$schema"] = this._name; - for (const key in this._fields) if (Object.prototype.hasOwnProperty.call(this._fields, key)) record[key] = await this._fields[key].read(stream$3, options); - return record; - } - }; - function arraysEqual(a, b) { - if (a === b) return true; - if (a == null || b == null) return false; - if (a.length !== b.length) return false; - for (let i = 0; i < a.length; ++i) if (a[i] !== b[i]) return false; - return true; - } - var AvroReader = class { - get blockOffset() { - return this._blockOffset; - } - get objectIndex() { - return this._objectIndex; - } - constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { - this._dataStream = dataStream; - this._headerStream = headerStream || dataStream; - this._initialized = false; - this._blockOffset = currentBlockOffset || 0; - this._objectIndex = indexWithinCurrentBlock || 0; - this._initialBlockOffset = currentBlockOffset || 0; - } - async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) throw new Error("Stream is not an Avro file."); - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; - if (!(codec === void 0 || codec === null || codec === "null")) throw new Error("Codecs are not supported"); - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema); - if (this._blockOffset === 0) this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - this._initialized = true; - if (this._objectIndex && this._objectIndex > 0) for (let i = 0; i < this._objectIndex; i++) { - await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); - this._itemsRemainingInBlock--; - } - } - hasNext() { - return !this._initialized || this._itemsRemainingInBlock > 0; - } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) yield tslib.__await(this.initialize(options)); - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { abortSignal: options.abortSignal })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker$1 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker$1)) throw new Error("Stream is not a valid Avro file."); - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } catch (_a$2) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } - yield yield tslib.__await(result); - } - }); - } - }; - var AvroReadable = class {}; - const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { - toUint8Array(data) { - if (typeof data === "string") return Buffer.from(data); - return data; - } - constructor(readable) { - super(); - this._readable = readable; - this._position = 0; - } - get position() { - return this._position; - } - async read(size, options = {}) { - var _a$2; - if ((_a$2 = options.abortSignal) === null || _a$2 === void 0 ? void 0 : _a$2.aborted) throw ABORT_ERROR; - if (size < 0) throw new Error(`size parameter should be positive: ${size}`); - if (size === 0) return new Uint8Array(); - if (!this._readable.readable) throw new Error("Stream no longer readable."); - const chunk = this._readable.read(size); - if (chunk) { - this._position += chunk.length; - return this.toUint8Array(chunk); - } else return new Promise((resolve, reject) => { - const cleanUp = () => { - this._readable.removeListener("readable", readableCallback); - this._readable.removeListener("error", rejectCallback); - this._readable.removeListener("end", rejectCallback); - this._readable.removeListener("close", rejectCallback); - if (options.abortSignal) options.abortSignal.removeEventListener("abort", abortHandler); - }; - const readableCallback = () => { - const callbackChunk = this._readable.read(size); - if (callbackChunk) { - this._position += callbackChunk.length; - cleanUp(); - resolve(this.toUint8Array(callbackChunk)); - } - }; - const rejectCallback = () => { - cleanUp(); - reject(); - }; - const abortHandler = () => { - cleanUp(); - reject(ABORT_ERROR); + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { + const operationOptions = { + abortSignal: options.abortSignal, + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions }; - this._readable.on("readable", readableCallback); - this._readable.once("error", rejectCallback); - this._readable.once("end", rejectCallback); - this._readable.once("close", rejectCallback); - if (options.abortSignal) options.abortSignal.addEventListener("abort", abortHandler); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; + exports.BlobLeaseClient = BlobLeaseClient; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RetriableReadableStream = void 0; + const abort_controller_1 = require_commonjs$12(); + const node_stream_1$1 = __require("node:stream"); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. + * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. */ - var BlobQuickQueryStream = class extends stream$2.Readable { + var RetriableReadableStream = class extends node_stream_1$1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** - * Creates an instance of BlobQuickQueryStream. + * Creates an instance of RetriableReadableStream. * * @param source - The current ReadableStream returned from getter + * @param getter - A method calling downloading request returning + * a new ReadableStream from specified offset + * @param offset - Offset position in original data source to read + * @param count - How much data in original data source to read * @param options - */ - constructor(source, options = {}) { - super(); - this.avroPaused = true; + constructor(source, getter, offset, count, options = {}) { + super({ highWaterMark: options.highWaterMark }); + this.getter = getter; this.source = source; + this.start = offset; + this.offset = offset; + this.end = offset + count - 1; + this.maxRetryRequests = options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; this.onProgress = options.onProgress; - this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); - this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); + this.options = options; + this.setSourceEventHandlers(); } _read() { - if (this.avroPaused) this.readInternal().catch((err) => { - this.emit("error", err); - }); + this.source.resume(); } - async readInternal() { - this.avroPaused = false; - let avroNext; - do { - avroNext = await this.avroIter.next(); - if (avroNext.done) break; - const obj = avroNext.value; - const schema = obj.$schema; - if (typeof schema !== "string") throw Error("Missing schema in avro record."); - switch (schema) { - case "com.microsoft.azure.storage.queryBlobContents.resultData": - { - const data = obj.data; - if (data instanceof Uint8Array === false) throw Error("Invalid data in avro result record."); - if (!this.push(Buffer.from(data))) this.avroPaused = true; - } - break; - case "com.microsoft.azure.storage.queryBlobContents.progress": - { - const bytesScanned = obj.bytesScanned; - if (typeof bytesScanned !== "number") throw Error("Invalid bytesScanned in avro progress record."); - if (this.onProgress) this.onProgress({ loadedBytes: bytesScanned }); - } - break; - case "com.microsoft.azure.storage.queryBlobContents.end": - if (this.onProgress) { - const totalBytes = obj.totalBytes; - if (typeof totalBytes !== "number") throw Error("Invalid totalBytes in avro end record."); - this.onProgress({ loadedBytes: totalBytes }); - } - this.push(null); - break; - case "com.microsoft.azure.storage.queryBlobContents.error": - if (this.onError) { - const fatal = obj.fatal; - if (typeof fatal !== "boolean") throw Error("Invalid fatal in avro error record."); - const name = obj.name; - if (typeof name !== "string") throw Error("Invalid name in avro error record."); - const description = obj.description; - if (typeof description !== "string") throw Error("Invalid description in avro error record."); - const position = obj.position; - if (typeof position !== "number") throw Error("Invalid position in avro error record."); - this.onError({ - position, - name, - isFatal: fatal, - description - }); - } - break; - default: throw Error(`Unknown schema ${schema} in avro progress record.`); - } - } while (!avroNext.done && !this.avroPaused); + setSourceEventHandlers() { + this.source.on("data", this.sourceDataHandler); + this.source.on("end", this.sourceErrorOrEndHandler); + this.source.on("error", this.sourceErrorOrEndHandler); + this.source.on("aborted", this.sourceAbortedHandler); + } + removeSourceEventHandlers() { + this.source.removeListener("data", this.sourceDataHandler); + this.source.removeListener("end", this.sourceErrorOrEndHandler); + this.source.removeListener("error", this.sourceErrorOrEndHandler); + this.source.removeListener("aborted", this.sourceAbortedHandler); + } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) this.onProgress({ loadedBytes: this.offset - this.start }); + if (!this.push(data)) this.source.pause(); + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) this.push(null); + else if (this.offset <= this.end) if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + }).catch((error) => { + this.destroy(error); + }); + } else this.destroy(/* @__PURE__ */ new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + else this.destroy(/* @__PURE__ */ new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + }; + _destroy(error, callback) { + this.removeSourceEventHandlers(); + this.source.destroy(); + callback(error === null ? void 0 : error); } }; + exports.RetriableReadableStream = RetriableReadableStream; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobDownloadResponse = void 0; + const core_util_1 = require_commonjs$11(); + const RetriableReadableStream_js_1 = require_RetriableReadableStream(); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will - * parse avor data returned by blob query. + * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will + * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot + * trigger retries defined in pipeline retry policy.) + * + * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js + * Readable stream. */ - var BlobQueryResponse = class { + var BlobDownloadResponse = class { /** * Indicates that the service supports * requests for partial file content. @@ -29869,7 +30242,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * @readonly */ get copyCompletedOn() { - return void 0; + return this.originalResponse.copyCompletedOn; } /** * String identifier for the last attempted Copy @@ -29977,6 +30350,14 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return this.originalResponse.etag; } /** + * The number of tags associated with the blob + * + * @readonly + */ + get tagCount() { + return this.originalResponse.tagCount; + } + /** * The error code. * * @readonly @@ -30015,8 +30396,25 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. * * @readonly */ - get lastModified() { - return this.originalResponse.lastModified; + get lastModified() { + return this.originalResponse.lastModified; + } + /** + * Returns the UTC date and time generated by the service that indicates the time at which the blob was + * last read or written to. + * + * @readonly + */ + get lastAccessed() { + return this.originalResponse.lastAccessed; + } + /** + * Returns the date and time the blob was created. + * + * @readonly + */ + get createdOn() { + return this.originalResponse.createdOn; } /** * A name-value pair @@ -30046,7 +30444,7 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return this.originalResponse.clientRequestId; } /** - * Indicates the version of the File service used + * Indicates the version of the Blob service used * to execute the request. * * @readonly @@ -30055,6 +30453,22 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return this.originalResponse.version; } /** + * Indicates the versionId of the downloaded blob version. + * + * @readonly + */ + get versionId() { + return this.originalResponse.versionId; + } + /** + * Indicates whether version of this blob is a current version. + * + * @readonly + */ + get isCurrentVersion() { + return this.originalResponse.isCurrentVersion; + } + /** * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned * when the blob was encrypted with a customer-provided key. * @@ -30073,5359 +30487,4960 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return this.originalResponse.contentCrc64; } /** - * The response body as a browser Blob. - * Always undefined in node.js. + * Object Replication Policy Id of the destination blob. * * @readonly */ - get blobBody() { - return void 0; + get objectReplicationDestinationPolicyId() { + return this.originalResponse.objectReplicationDestinationPolicyId; } /** - * The response body as a node.js Readable stream. - * Always undefined in the browser. - * - * It will parse avor data returned by blob query. + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. * * @readonly */ - get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; - } - /** - * The HTTP response. - */ - get _response() { - return this.originalResponse._response; - } - /** - * Creates an instance of BlobQueryResponse. - * - * @param originalResponse - - * @param options - - */ - constructor(originalResponse$1, options = {}) { - this.originalResponse = originalResponse$1; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); - } - }; - /** - * Represents the access tier on a blob. - * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} - */ - exports.BlockBlobTier = void 0; - (function(BlockBlobTier) { - /** - * Optimized for storing data that is accessed frequently. - */ - BlockBlobTier["Hot"] = "Hot"; - /** - * Optimized for storing data that is infrequently accessed and stored for at least 30 days. - */ - BlockBlobTier["Cool"] = "Cool"; - /** - * Optimized for storing data that is rarely accessed. - */ - BlockBlobTier["Cold"] = "Cold"; - /** - * Optimized for storing data that is rarely accessed and stored for at least 180 days - * with flexible latency requirements (on the order of hours). - */ - BlockBlobTier["Archive"] = "Archive"; - })(exports.BlockBlobTier || (exports.BlockBlobTier = {})); - /** - * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. - * Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} - * for detailed information on the corresponding IOPS and throughput per PageBlobTier. - */ - exports.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - /** - * P4 Tier. - */ - PremiumPageBlobTier["P4"] = "P4"; - /** - * P6 Tier. - */ - PremiumPageBlobTier["P6"] = "P6"; - /** - * P10 Tier. - */ - PremiumPageBlobTier["P10"] = "P10"; - /** - * P15 Tier. - */ - PremiumPageBlobTier["P15"] = "P15"; - /** - * P20 Tier. - */ - PremiumPageBlobTier["P20"] = "P20"; - /** - * P30 Tier. - */ - PremiumPageBlobTier["P30"] = "P30"; - /** - * P40 Tier. - */ - PremiumPageBlobTier["P40"] = "P40"; - /** - * P50 Tier. - */ - PremiumPageBlobTier["P50"] = "P50"; - /** - * P60 Tier. - */ - PremiumPageBlobTier["P60"] = "P60"; - /** - * P70 Tier. - */ - PremiumPageBlobTier["P70"] = "P70"; - /** - * P80 Tier. - */ - PremiumPageBlobTier["P80"] = "P80"; - })(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {})); - function toAccessTier(tier$1) { - if (tier$1 === void 0) return void 0; - return tier$1; - } - function ensureCpkIfSpecified(cpk, isHttps) { - if (cpk && !isHttps) throw new RangeError("Customer-provided encryption key must be used over HTTPS."); - if (cpk && !cpk.encryptionAlgorithm) cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; - } - /** - * Defines the known cloud audiences for Storage. - */ - exports.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - /** - * The OAuth scope to use to retrieve an AAD token for Azure Storage. - */ - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - /** - * The OAuth scope to use to retrieve an AAD token for Azure Disk. - */ - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports.StorageBlobAudience || (exports.StorageBlobAudience = {})); - /** - * - * To get OAuth audience for a storage account for blob service. - */ - function getBlobServiceAccountAudience(storageAccountName) { - return `https://${storageAccountName}.blob.core.windows.net/.default`; - } - /** - * Function that converts PageRange and ClearRange to a common Range object. - * PageRange and ClearRange have start and end while Range offset and count - * this function normalizes to Range. - * @param response - Model PageBlob Range response - */ - function rangeResponseFromModel(response) { - const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start - })); - const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start - })); - return Object.assign(Object.assign({}, response), { - pageRange, - clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) - }); - } - /** - * This is the poller returned by {@link BlobClient.beginCopyFromURL}. - * This can not be instantiated directly outside of this package. - * - * @hidden - */ - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { - constructor(options) { - const { blobClient, copySource: copySource$1, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; - let state$1; - if (resumeFrom) state$1 = JSON.parse(resumeFrom).state; - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state$1), { - blobClient, - copySource: copySource$1, - startCopyFromURLOptions - })); - super(operation); - if (typeof onProgress === "function") this.onProgress(onProgress); - this.intervalInMs = intervalInMs; - } - delay() { - return coreUtil.delay(this.intervalInMs); - } - }; - /** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ - const cancel = async function cancel$1(options = {}) { - const state$1 = this.state; - const { copyId: copyId$1 } = state$1; - if (state$1.isCompleted) return makeBlobBeginCopyFromURLPollOperation(state$1); - if (!copyId$1) { - state$1.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state$1); - } - await state$1.blobClient.abortCopyFromURL(copyId$1, { abortSignal: options.abortSignal }); - state$1.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state$1); - }; - /** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ - const update = async function update$1(options = {}) { - const state$1 = this.state; - const { blobClient, copySource: copySource$1, startCopyFromURLOptions } = state$1; - if (!state$1.isStarted) { - state$1.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource$1, startCopyFromURLOptions); - state$1.copyId = result.copyId; - if (result.copyStatus === "success") { - state$1.result = result; - state$1.isCompleted = true; - } - } else if (!state$1.isCompleted) try { - const result = await state$1.blobClient.getProperties({ abortSignal: options.abortSignal }); - const { copyStatus, copyProgress } = result; - const prevCopyProgress = state$1.copyProgress; - if (copyProgress) state$1.copyProgress = copyProgress; - if (copyStatus === "pending" && copyProgress !== prevCopyProgress && typeof options.fireProgress === "function") options.fireProgress(state$1); - else if (copyStatus === "success") { - state$1.result = result; - state$1.isCompleted = true; - } else if (copyStatus === "failed") { - state$1.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); - state$1.isCompleted = true; - } - } catch (err) { - state$1.error = err; - state$1.isCompleted = true; - } - return makeBlobBeginCopyFromURLPollOperation(state$1); - }; - /** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ - const toString = function toString$1() { - return JSON.stringify({ state: this.state }, (key, value) => { - if (key === "blobClient") return void 0; - return value; - }); - }; - /** - * Creates a poll operation given the provided state. - * @hidden - */ - function makeBlobBeginCopyFromURLPollOperation(state$1) { - return { - state: Object.assign({}, state$1), - cancel, - toString, - update - }; - } - /** - * Generate a range string. For example: - * - * "bytes=255-" or "bytes=0-511" - * - * @param iRange - - */ - function rangeToString(iRange) { - if (iRange.offset < 0) throw new RangeError(`Range.offset cannot be smaller than 0.`); - if (iRange.count && iRange.count <= 0) throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); - return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; - } - /** - * States for Batch. - */ - var BatchStates; - (function(BatchStates$1) { - BatchStates$1[BatchStates$1["Good"] = 0] = "Good"; - BatchStates$1[BatchStates$1["Error"] = 1] = "Error"; - })(BatchStates || (BatchStates = {})); - /** - * Batch provides basic parallel execution with concurrency limits. - * Will stop execute left operations when one of the executed operation throws an error. - * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. - */ - var Batch = class { - /** - * Creates an instance of Batch. - * @param concurrency - - */ - constructor(concurrency = 5) { - /** - * Number of active operations under execution. - */ - this.actives = 0; - /** - * Number of completed operations under execution. - */ - this.completed = 0; - /** - * Offset of next operation to be executed. - */ - this.offset = 0; - /** - * Operation array to be executed. - */ - this.operations = []; - /** - * States of Batch. When an error happens, state will turn into error. - * Batch will stop execute left operations. - */ - this.state = BatchStates.Good; - if (concurrency < 1) throw new RangeError("concurrency must be larger than 0"); - this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); - } - /** - * Add a operation into queue. - * - * @param operation - - */ - addOperation(operation) { - this.operations.push(async () => { - try { - this.actives++; - await operation(); - this.actives--; - this.completed++; - this.parallelExecute(); - } catch (error) { - this.emitter.emit("error", error); - } - }); - } - /** - * Start execute operations in the queue. - * - */ - async do() { - if (this.operations.length === 0) return Promise.resolve(); - this.parallelExecute(); - return new Promise((resolve, reject) => { - this.emitter.on("finish", resolve); - this.emitter.on("error", (error) => { - this.state = BatchStates.Error; - reject(error); - }); - }); - } - /** - * Get next operation to be executed. Return null when reaching ends. - * - */ - nextOperation() { - if (this.offset < this.operations.length) return this.operations[this.offset++]; - return null; - } - /** - * Start execute operations. One one the most important difference between - * this method with do() is that do() wraps as an sync method. - * - */ - parallelExecute() { - if (this.state === BatchStates.Error) return; - if (this.completed >= this.operations.length) { - this.emitter.emit("finish"); - return; - } - while (this.actives < this.concurrency) { - const operation = this.nextOperation(); - if (operation) operation(); - else return; - } - } - }; - /** - * This class generates a readable stream from the data in an array of buffers. - */ - var BuffersStream = class extends stream$2.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) buffersLength += buf.byteLength; - if (buffersLength < this.byteLength) throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) this.push(null); - if (!size) size = this.readableHighWaterMark; - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else this.byteOffsetInCurrentBuffer = end; - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) this.push(Buffer.concat(outBuffers)); - else if (outBuffers.length === 1) this.push(outBuffers[0]); - } - }; - const maxBufferLength = buffer$1.constants.MAX_LENGTH; - /** - * This class provides a buffer container which conceptually has no hard size limit. - * It accepts a capacity, an array of input buffers and the total length of input data. - * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers - * into the internal "buffer" serially with respect to the total length. - * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream - * assembled from all the data in the internal "buffer". - */ - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - /** - * Internal buffers used to keep the data. - * Each buffer has a length of the maxBufferLength except last one. - */ - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) len = maxBufferLength; - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) this.fill(buffers, totalLength); - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) buffers[0] = buffers[0].slice(sourceOffset); + get objectReplicationSourceProperties() { + return this.originalResponse.objectReplicationSourceProperties; } /** - * Get the readable stream assembled from all the data in the internal buffers. + * If this blob has been sealed. * + * @readonly */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); + get isSealed() { + return this.originalResponse.isSealed; } - }; - /** - * This class accepts a Node.js Readable stream as input, and keeps reading data - * from the stream into the internal buffer structure, until it reaches maxBuffers. - * Every available buffer will try to trigger outgoingHandler. - * - * The internal buffer structure includes an incoming buffer array, and a outgoing - * buffer array. The incoming buffer array includes the "empty" buffers can be filled - * with new incoming data. The outgoing array includes the filled buffers to be - * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. - * - * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING - * - * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers - * - * PERFORMANCE IMPROVEMENT TIPS: - * 1. Input stream highWaterMark is better to set a same value with bufferSize - * parameter, which will avoid Buffer.concat() operations. - * 2. concurrency should set a smaller value than maxBuffers, which is helpful to - * reduce the possibility when a outgoing handler waits for the stream data. - * in this situation, outgoing handlers are blocked. - * Outgoing queue shouldn't be empty. - */ - var BufferScheduler = class { /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - /** - * An internal event emitter. - */ - this.emitter = new events.EventEmitter(); - /** - * An internal offset marker to track data offset in bytes of next outgoingHandler. - */ - this.offset = 0; - /** - * An internal marker to track whether stream is end. - */ - this.isStreamEnd = false; - /** - * An internal marker to track whether stream or outgoingHandler returns error. - */ - this.isError = false; - /** - * How many handlers are executing. - */ - this.executingOutgoingHandlers = 0; - /** - * How many buffers have been allocated. - */ - this.numBuffers = 0; - /** - * Because this class doesn't know how much data every time stream pops, which - * is defined by highWaterMarker of the stream. So BufferScheduler will cache - * data received from the stream, when data in unresolvedDataArray exceeds the - * blockSize defined, it will try to concat a blockSize of buffer, fill into available - * buffers from incoming and push to outgoing array. - */ - this.unresolvedDataArray = []; - /** - * How much data consisted in unresolvedDataArray. - */ - this.unresolvedLength = 0; - /** - * The array includes all the available buffers can be used to fill data from stream. - */ - this.incoming = []; - /** - * The array (queue) includes all the buffers filled from stream data. - */ - this.outgoing = []; - if (bufferSize <= 0) throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - if (maxBuffers <= 0) throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - if (concurrency <= 0) throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; + * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. + * + * @readonly + */ + get immutabilityPolicyExpiresOn() { + return this.originalResponse.immutabilityPolicyExpiresOn; } /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. + * Indicates immutability policy mode. * + * @readonly */ - async do() { - return new Promise((resolve, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) this.readable.pause(); - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer$2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer$2.getReadableStream(), buffer$2.size, this.offset).then(resolve).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) return; - else resolve(); - }); - }); + get immutabilityPolicyMode() { + return this.originalResponse.immutabilityPolicyMode; } /** - * Insert a new data into unresolved array. + * Indicates if a legal hold is present on the blob. * - * @param data - + * @readonly */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; + get legalHold() { + return this.originalResponse.legalHold; } /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. + * The response body as a browser Blob. + * Always undefined in node.js. * + * @readonly */ - shiftBufferFromUnresolvedDataArray(buffer$2) { - if (!buffer$2) buffer$2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - else buffer$2.fill(this.unresolvedDataArray, this.unresolvedLength); - this.unresolvedLength -= buffer$2.size; - return buffer$2; + get contentAsBlob() { + return this.originalResponse.blobBody; } /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. + * The response body as a node.js Readable stream. + * Always undefined in the browser. * - * Return false when available buffers in incoming are not enough, else true. + * It will automatically retry when internal read stream unexpected ends. * - * @returns Return false when buffers in incoming are not enough, else true. + * @readonly */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer$2; - if (this.incoming.length > 0) { - buffer$2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer$2); - } else if (this.numBuffers < this.maxBuffers) { - buffer$2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else return false; - this.outgoing.push(buffer$2); - this.triggerOutgoingHandlers(); - } - return true; + get readableStreamBody() { + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. + * The HTTP response. */ - async triggerOutgoingHandlers() { - let buffer$2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) return; - buffer$2 = this.outgoing.shift(); - if (buffer$2) this.triggerOutgoingHandler(buffer$2); - } while (buffer$2); + get _response() { + return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** - * Trigger a outgoing handler for a buffer shifted from outgoing. + * Creates an instance of BlobDownloadResponse. * - * @param buffer - + * @param originalResponse - + * @param getter - + * @param offset - + * @param count - + * @param options - */ - async triggerOutgoingHandler(buffer$2) { - const bufferLength = buffer$2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer$2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer$2); - this.emitter.emit("checkEnd"); + constructor(originalResponse, getter, offset, count, options = {}) { + this.originalResponse = originalResponse; + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } + }; + exports.BlobDownloadResponse = BlobDownloadResponse; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AVRO_SCHEMA_KEY = exports.AVRO_CODEC_KEY = exports.AVRO_INIT_BYTES = exports.AVRO_SYNC_MARKER_SIZE = void 0; + exports.AVRO_SYNC_MARKER_SIZE = 16; + exports.AVRO_INIT_BYTES = new Uint8Array([ + 79, + 98, + 106, + 1 + ]); + exports.AVRO_CODEC_KEY = "avro.codec"; + exports.AVRO_SCHEMA_KEY = "avro.schema"; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AvroType = exports.AvroParser = void 0; + var AvroParser = class AvroParser { /** - * Return buffer used by outgoing handler into incoming. + * Reads a fixed number of bytes from the stream. * - * @param buffer - + * @param stream - + * @param length - + * @param options - */ - reuseBuffer(buffer$2) { - this.incoming.push(buffer$2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) this.readable.resume(); + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); + if (bytes.length !== length) throw new Error("Hit stream end."); + return bytes; + } + /** + * Reads a single byte from the stream. + * + * @param stream - + * @param options - + */ + static async readByte(stream, options = {}) { + return (await AvroParser.readFixedBytes(stream, 1, options))[0]; + } + static async readZigZagLong(stream, options = {}) { + let zigZagEncoded = 0; + let significanceInBit = 0; + let byte, haveMoreByte, significanceInFloat; + do { + byte = await AvroParser.readByte(stream, options); + haveMoreByte = byte & 128; + zigZagEncoded |= (byte & 127) << significanceInBit; + significanceInBit += 7; + } while (haveMoreByte && significanceInBit < 28); + if (haveMoreByte) { + zigZagEncoded = zigZagEncoded; + significanceInFloat = 268435456; + do { + byte = await AvroParser.readByte(stream, options); + zigZagEncoded += (byte & 127) * significanceInFloat; + significanceInFloat *= 128; + } while (byte & 128); + const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; + if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) throw new Error("Integer overflow."); + return res; + } + return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); + } + static async readLong(stream, options = {}) { + return AvroParser.readZigZagLong(stream, options); + } + static async readInt(stream, options = {}) { + return AvroParser.readZigZagLong(stream, options); + } + static async readNull() { + return null; + } + static async readBoolean(stream, options = {}) { + const b = await AvroParser.readByte(stream, options); + if (b === 1) return true; + else if (b === 0) return false; + else throw new Error("Byte was not a boolean."); + } + static async readFloat(stream, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream, 4, options); + return new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength).getFloat32(0, true); + } + static async readDouble(stream, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream, 8, options); + return new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength).getFloat64(0, true); + } + static async readBytes(stream, options = {}) { + const size = await AvroParser.readLong(stream, options); + if (size < 0) throw new Error("Bytes size was negative."); + return stream.read(size, { abortSignal: options.abortSignal }); + } + static async readString(stream, options = {}) { + const u8arr = await AvroParser.readBytes(stream, options); + return new TextDecoder().decode(u8arr); + } + static async readMapPair(stream, readItemMethod, options = {}) { + return { + key: await AvroParser.readString(stream, options), + value: await readItemMethod(stream, options) + }; + } + static async readMap(stream, readItemMethod, options = {}) { + const readPairMethod = (s, opts = {}) => { + return AvroParser.readMapPair(s, readItemMethod, opts); + }; + const pairs = await AvroParser.readArray(stream, readPairMethod, options); + const dict = {}; + for (const pair of pairs) dict[pair.key] = pair.value; + return dict; + } + static async readArray(stream, readItemMethod, options = {}) { + const items = []; + for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) { + if (count < 0) { + await AvroParser.readLong(stream, options); + count = -count; + } + while (count--) { + const item = await readItemMethod(stream, options); + items.push(item); + } + } + return items; } }; - /** - * Reads a readable stream into buffer. Fill the buffer from offset to end. - * - * @param stream - A Node.js Readable stream - * @param buffer - Buffer to be filled, length must greater than or equal to offset - * @param offset - From which position in the buffer to be filled, inclusive - * @param end - To which position in the buffer to be filled, exclusive - * @param encoding - Encoding of the Readable stream - */ - async function streamToBuffer(stream$3, buffer$2, offset, end, encoding) { - let pos = 0; - const count = end - offset; - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream$3.on("readable", () => { - if (pos >= count) { - clearTimeout(timeout); - resolve(); - return; + exports.AvroParser = AvroParser; + var AvroComplex; + (function(AvroComplex) { + AvroComplex["RECORD"] = "record"; + AvroComplex["ENUM"] = "enum"; + AvroComplex["ARRAY"] = "array"; + AvroComplex["MAP"] = "map"; + AvroComplex["UNION"] = "union"; + AvroComplex["FIXED"] = "fixed"; + })(AvroComplex || (AvroComplex = {})); + var AvroPrimitive; + (function(AvroPrimitive) { + AvroPrimitive["NULL"] = "null"; + AvroPrimitive["BOOLEAN"] = "boolean"; + AvroPrimitive["INT"] = "int"; + AvroPrimitive["LONG"] = "long"; + AvroPrimitive["FLOAT"] = "float"; + AvroPrimitive["DOUBLE"] = "double"; + AvroPrimitive["BYTES"] = "bytes"; + AvroPrimitive["STRING"] = "string"; + })(AvroPrimitive || (AvroPrimitive = {})); + var AvroType = class AvroType { + /** + * Determines the AvroType from the Avro Schema. + */ + static fromSchema(schema) { + if (typeof schema === "string") return AvroType.fromStringSchema(schema); + else if (Array.isArray(schema)) return AvroType.fromArraySchema(schema); + else return AvroType.fromObjectSchema(schema); + } + static fromStringSchema(schema) { + switch (schema) { + case AvroPrimitive.NULL: + case AvroPrimitive.BOOLEAN: + case AvroPrimitive.INT: + case AvroPrimitive.LONG: + case AvroPrimitive.FLOAT: + case AvroPrimitive.DOUBLE: + case AvroPrimitive.BYTES: + case AvroPrimitive.STRING: return new AvroPrimitiveType(schema); + default: throw new Error(`Unexpected Avro type ${schema}`); + } + } + static fromArraySchema(schema) { + return new AvroUnionType(schema.map(AvroType.fromSchema)); + } + static fromObjectSchema(schema) { + const type = schema.type; + try { + return AvroType.fromStringSchema(type); + } catch {} + switch (type) { + case AvroComplex.RECORD: + if (schema.aliases) throw new Error(`aliases currently is not supported, schema: ${schema}`); + if (!schema.name) throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); + const fields = {}; + if (!schema.fields) throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); + for (const field of schema.fields) fields[field.name] = AvroType.fromSchema(field.type); + return new AvroRecordType(fields, schema.name); + case AvroComplex.ENUM: + if (schema.aliases) throw new Error(`aliases currently is not supported, schema: ${schema}`); + if (!schema.symbols) throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); + return new AvroEnumType(schema.symbols); + case AvroComplex.MAP: + if (!schema.values) throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); + return new AvroMapType(AvroType.fromSchema(schema.values)); + case AvroComplex.ARRAY: + case AvroComplex.FIXED: + default: throw new Error(`Unexpected Avro type ${type} in ${schema}`); + } + } + }; + exports.AvroType = AvroType; + var AvroPrimitiveType = class extends AvroType { + _primitive; + constructor(primitive) { + super(); + this._primitive = primitive; + } + read(stream, options = {}) { + switch (this._primitive) { + case AvroPrimitive.NULL: return AvroParser.readNull(); + case AvroPrimitive.BOOLEAN: return AvroParser.readBoolean(stream, options); + case AvroPrimitive.INT: return AvroParser.readInt(stream, options); + case AvroPrimitive.LONG: return AvroParser.readLong(stream, options); + case AvroPrimitive.FLOAT: return AvroParser.readFloat(stream, options); + case AvroPrimitive.DOUBLE: return AvroParser.readDouble(stream, options); + case AvroPrimitive.BYTES: return AvroParser.readBytes(stream, options); + case AvroPrimitive.STRING: return AvroParser.readString(stream, options); + default: throw new Error("Unknown Avro Primitive"); + } + } + }; + var AvroEnumType = class extends AvroType { + _symbols; + constructor(symbols) { + super(); + this._symbols = symbols; + } + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); + return this._symbols[value]; + } + }; + var AvroUnionType = class extends AvroType { + _types; + constructor(types) { + super(); + this._types = types; + } + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); + } + }; + var AvroMapType = class extends AvroType { + _itemType; + constructor(itemType) { + super(); + this._itemType = itemType; + } + read(stream, options = {}) { + const readItemMethod = (s, opts) => { + return this._itemType.read(s, opts); + }; + return AvroParser.readMap(stream, readItemMethod, options); + } + }; + var AvroRecordType = class extends AvroType { + _name; + _fields; + constructor(fields, name) { + super(); + this._fields = fields; + this._name = name; + } + async read(stream, options = {}) { + const record = {}; + record["$schema"] = this._name; + for (const key in this._fields) if (Object.prototype.hasOwnProperty.call(this._fields, key)) record[key] = await this._fields[key].read(stream, options); + return record; + } + }; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.arraysEqual = arraysEqual; + function arraysEqual(a, b) { + if (a === b) return true; + if (a == null || b == null) return false; + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; ++i) if (a[i] !== b[i]) return false; + return true; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AvroReader = void 0; + const AvroConstants_js_1 = require_AvroConstants(); + const AvroParser_js_1 = require_AvroParser(); + const utils_common_js_1 = require_utils_common(); + var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + _initialBlockOffset; + _blockOffset; + get blockOffset() { + return this._blockOffset; + } + _objectIndex; + get objectIndex() { + return this._objectIndex; + } + _initialized; + constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { + this._dataStream = dataStream; + this._headerStream = headerStream || dataStream; + this._initialized = false; + this._blockOffset = currentBlockOffset || 0; + this._objectIndex = indexWithinCurrentBlock || 0; + this._initialBlockOffset = currentBlockOffset || 0; + } + async initialize(options = {}) { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) throw new Error("Stream is not an Avro file."); + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; + if (!(codec === void 0 || codec === null || codec === "null")) throw new Error("Codecs are not supported"); + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); + const schema = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema); + if (this._blockOffset === 0) this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + this._initialized = true; + if (this._objectIndex && this._objectIndex > 0) for (let i = 0; i < this._objectIndex; i++) { + await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); + this._itemsRemainingInBlock--; + } + } + hasNext() { + return !this._initialized || this._itemsRemainingInBlock > 0; + } + async *parseObjects(options = {}) { + if (!this._initialized) await this.initialize(options); + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) throw new Error("Stream is not a valid Avro file."); + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - let chunk = stream$3.read(); - if (!chunk) return; - if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); - const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer$2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); - pos += chunkLength; - }); - stream$3.on("end", () => { - clearTimeout(timeout); - if (pos < count) reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); - resolve(); - }); - stream$3.on("error", (msg) => { - clearTimeout(timeout); - reject(msg); + yield result; + } + } + }; + exports.AvroReader = AvroReader; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AvroReadable = void 0; + var AvroReadable = class {}; + exports.AvroReadable = AvroReadable; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AvroReadableFromStream = void 0; + const AvroReadable_js_1 = require_AvroReadable(); + const abort_controller_1 = require_commonjs$12(); + const buffer_1 = __require("buffer"); + const ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; + toUint8Array(data) { + if (typeof data === "string") return buffer_1.Buffer.from(data); + return data; + } + constructor(readable) { + super(); + this._readable = readable; + this._position = 0; + } + get position() { + return this._position; + } + async read(size, options = {}) { + if (options.abortSignal?.aborted) throw ABORT_ERROR; + if (size < 0) throw new Error(`size parameter should be positive: ${size}`); + if (size === 0) return new Uint8Array(); + if (!this._readable.readable) throw new Error("Stream no longer readable."); + const chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + return this.toUint8Array(chunk); + } else return new Promise((resolve, reject) => { + const cleanUp = () => { + this._readable.removeListener("readable", readableCallback); + this._readable.removeListener("error", rejectCallback); + this._readable.removeListener("end", rejectCallback); + this._readable.removeListener("close", rejectCallback); + if (options.abortSignal) options.abortSignal.removeEventListener("abort", abortHandler); + }; + const readableCallback = () => { + const callbackChunk = this._readable.read(size); + if (callbackChunk) { + this._position += callbackChunk.length; + cleanUp(); + resolve(this.toUint8Array(callbackChunk)); + } + }; + const rejectCallback = () => { + cleanUp(); + reject(); + }; + const abortHandler = () => { + cleanUp(); + reject(ABORT_ERROR); + }; + this._readable.on("readable", readableCallback); + this._readable.once("error", rejectCallback); + this._readable.once("end", rejectCallback); + this._readable.once("close", rejectCallback); + if (options.abortSignal) options.abortSignal.addEventListener("abort", abortHandler); }); - }); - } + } + }; + exports.AvroReadableFromStream = AvroReadableFromStream; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AvroReadableFromStream = exports.AvroReadable = exports.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports, "AvroReader", { + enumerable: true, + get: function() { + return AvroReader_js_1.AvroReader; + } + }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports, "AvroReadable", { + enumerable: true, + get: function() { + return AvroReadable_js_1.AvroReadable; + } + }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports, "AvroReadableFromStream", { + enumerable: true, + get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } + }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobQuickQueryStream = void 0; + const node_stream_1 = __require("node:stream"); + const index_js_1 = require_internal_avro(); /** - * Reads a readable stream into buffer entirely. + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * @param stream - A Node.js Readable stream - * @param buffer - Buffer to be filled, length must greater than or equal to offset - * @param encoding - Encoding of the Readable stream - * @returns with the count of bytes read. - * @throws `RangeError` If buffer size is not big enough. + * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. */ - async function streamToBuffer2(stream$3, buffer$2, encoding) { - let pos = 0; - const bufferSize = buffer$2.length; - return new Promise((resolve, reject) => { - stream$3.on("readable", () => { - let chunk = stream$3.read(); - if (!chunk) return; - if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); - if (pos + chunk.length > bufferSize) { - reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); - return; + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; + /** + * Creates an instance of BlobQuickQueryStream. + * + * @param source - The current ReadableStream returned from getter + * @param options - + */ + constructor(source, options = {}) { + super(); + this.source = source; + this.onProgress = options.onProgress; + this.onError = options.onError; + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); + this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); + } + _read() { + if (this.avroPaused) this.readInternal().catch((err) => { + this.emit("error", err); + }); + } + async readInternal() { + this.avroPaused = false; + let avroNext; + do { + avroNext = await this.avroIter.next(); + if (avroNext.done) break; + const obj = avroNext.value; + const schema = obj.$schema; + if (typeof schema !== "string") throw Error("Missing schema in avro record."); + switch (schema) { + case "com.microsoft.azure.storage.queryBlobContents.resultData": + { + const data = obj.data; + if (data instanceof Uint8Array === false) throw Error("Invalid data in avro result record."); + if (!this.push(Buffer.from(data))) this.avroPaused = true; + } + break; + case "com.microsoft.azure.storage.queryBlobContents.progress": + { + const bytesScanned = obj.bytesScanned; + if (typeof bytesScanned !== "number") throw Error("Invalid bytesScanned in avro progress record."); + if (this.onProgress) this.onProgress({ loadedBytes: bytesScanned }); + } + break; + case "com.microsoft.azure.storage.queryBlobContents.end": + if (this.onProgress) { + const totalBytes = obj.totalBytes; + if (typeof totalBytes !== "number") throw Error("Invalid totalBytes in avro end record."); + this.onProgress({ loadedBytes: totalBytes }); + } + this.push(null); + break; + case "com.microsoft.azure.storage.queryBlobContents.error": + if (this.onError) { + const fatal = obj.fatal; + if (typeof fatal !== "boolean") throw Error("Invalid fatal in avro error record."); + const name = obj.name; + if (typeof name !== "string") throw Error("Invalid name in avro error record."); + const description = obj.description; + if (typeof description !== "string") throw Error("Invalid description in avro error record."); + const position = obj.position; + if (typeof position !== "number") throw Error("Invalid position in avro error record."); + this.onError({ + position, + name, + isFatal: fatal, + description + }); + } + break; + default: throw Error(`Unknown schema ${schema} in avro progress record.`); } - buffer$2.fill(chunk, pos, pos + chunk.length); - pos += chunk.length; - }); - stream$3.on("end", () => { - resolve(pos); - }); - stream$3.on("error", reject); - }); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. - * - * @param rs - The read stream. - * @param file - Destination file path. - */ - async function readStreamToLocalFile(rs, file) { - return new Promise((resolve, reject) => { - const ws = fs__namespace.createWriteStream(file); - rs.on("error", (err) => { - reject(err); - }); - ws.on("error", (err) => { - reject(err); - }); - ws.on("close", resolve); - rs.pipe(ws); - }); - } + } while (!avroNext.done && !this.avroPaused); + } + }; + exports.BlobQuickQueryStream = BlobQuickQueryStream; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobQueryResponse = void 0; + const core_util_1 = require_commonjs$11(); + const BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * Promisified version of fs.stat(). - */ - const fsStat = util__namespace.promisify(fs__namespace.stat); - const fsCreateReadStream = fs__namespace.createReadStream; - /** - * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, - * append blob, or page blob. + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will + * parse avro data returned by blob query. */ - var BlobClient = class BlobClient extends StorageClient { + var BlobQueryResponse = class { /** - * The name of the blob. + * Indicates that the service supports + * requests for partial file content. + * + * @readonly */ - get name() { - return this._name; + get acceptRanges() { + return this.originalResponse.acceptRanges; } /** - * The name of the storage container the blob is associated with. + * Returns if it was previously specified + * for the file. + * + * @readonly */ - get containerName() { - return this._containerName; - } - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { - options = options || {}; - let pipeline; - let url$1; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url$1 = urlOrConnectionString; - if (blobNameOrOptions && typeof blobNameOrOptions !== "string") options = blobNameOrOptions; - pipeline = newPipeline(new AnonymousCredential(), options); - } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - pipeline = newPipeline(sharedKeyCredential, options); - } else throw new Error("Account connection string is only supported in Node.js environment"); - else if (extractedCreds.kind === "SASConnString") { - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - super(url$1, pipeline); - ({blobName: this._name, containerName: this._containerName} = this.getBlobAndContainerNamesFromUrl()); - this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + get cacheControl() { + return this.originalResponse.cacheControl; } /** - * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. * - * @param snapshot - The snapshot timestamp. - * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp + * @readonly */ - withSnapshot(snapshot$1) { - return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); + get contentDisposition() { + return this.originalResponse.contentDisposition; } /** - * Creates a new BlobClient object pointing to a version of this blob. - * Provide "" will remove the versionId and return a Client to the base blob. + * Returns the value that was specified + * for the Content-Encoding request header. * - * @param versionId - The versionId. - * @returns A new BlobClient object pointing to the version of this blob. + * @readonly */ - withVersion(versionId$1) { - return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId$1.length === 0 ? void 0 : versionId$1), this.pipeline); + get contentEncoding() { + return this.originalResponse.contentEncoding; } /** - * Creates a AppendBlobClient object. + * Returns the value that was specified + * for the Content-Language request header. * + * @readonly */ - getAppendBlobClient() { - return new AppendBlobClient(this.url, this.pipeline); + get contentLanguage() { + return this.originalResponse.contentLanguage; } /** - * Creates a BlockBlobClient object. + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. * + * @readonly */ - getBlockBlobClient() { - return new BlockBlobClient(this.url, this.pipeline); + get blobSequenceNumber() { + return this.originalResponse.blobSequenceNumber; } /** - * Creates a PageBlobClient object. + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. * + * @readonly */ - getPageBlobClient() { - return new PageBlobClient(this.url, this.pipeline); + get blobType() { + return this.originalResponse.blobType; } /** - * Reads or downloads a blob from the system, including its metadata and properties. - * You can also call Get Blob to read a snapshot. - * - * * In Node.js, data returns in a Readable stream readableStreamBody - * * In browsers, data returns in a promise blobBody - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob - * - * @param offset - From which position of the blob to download, greater than or equal to 0 - * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined - * @param options - Optional options to Blob Download operation. - * - * - * Example usage (Node.js): - * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); - * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); - * } - * ``` - * - * Example usage (browser): + * The number of bytes present in the + * response body. * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded - * ); + * @readonly + */ + get contentLength() { + return this.originalResponse.contentLength; + } + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); - * } - * ``` + * @readonly */ - async download(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a$2; - const res = assertResponse(await this.blobContext.download({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - requestOptions: { onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress }, - range: offset === 0 && !count ? void 0 : rangeToString({ - offset, - count - }), - rangeGetContentMD5: options.rangeGetContentMD5, - rangeGetContentCRC64: options.rangeGetContentCrc64, - snapshot: options.snapshot, - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions - })); - const wrappedRes = Object.assign(Object.assign({}, res), { - _response: res._response, - objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, - objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) - }); - if (!coreUtil.isNode) return wrappedRes; - if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; - if (res.contentLength === void 0) throw new RangeError(`File download response doesn't contain valid content length header`); - if (!res.etag) throw new RangeError(`File download response doesn't contain valid etag header`); - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a$3; - const updatedDownloadOptions = { - leaseAccessConditions: options.conditions, - modifiedAccessConditions: { - ifMatch: options.conditions.ifMatch || res.etag, - ifModifiedSince: options.conditions.ifModifiedSince, - ifNoneMatch: options.conditions.ifNoneMatch, - ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions - }, - range: rangeToString({ - count: offset + res.contentLength - start, - offset: start - }), - rangeGetContentMD5: options.rangeGetContentMD5, - rangeGetContentCRC64: options.rangeGetContentCrc64, - snapshot: options.snapshot, - cpkInfo: options.customerProvidedKey - }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; - }, offset, res.contentLength, { - maxRetryRequests: options.maxRetryRequests, - onProgress: options.onProgress - }); - }); + get contentMD5() { + return this.originalResponse.contentMD5; } /** - * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. * - * NOTE: use this function with care since an existing blob might be deleted by other clients or - * applications. Vice versa new blobs might be added by other clients or applications after this - * function completes. + * @readonly + */ + get contentRange() { + return this.originalResponse.contentRange; + } + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' * - * @param options - options to Exists operation. + * @readonly */ - async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { - try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - await this.getProperties({ - abortSignal: options.abortSignal, - customerProvidedKey: options.customerProvidedKey, - conditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions - }); - return true; - } catch (e) { - if (e.statusCode === 404) return false; - else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) return true; - throw e; - } - }); + get contentType() { + return this.originalResponse.contentType; } /** - * Returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. * - * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if - * they originally contained uppercase characters. This differs from the metadata keys returned by - * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which - * will retain their original casing. + * @readonly + */ + get copyCompletedOn() {} + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. * - * @param options - Optional options to Get Properties operation. + * @readonly */ - async getProperties(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a$2; - const res = assertResponse(await this.blobContext.getProperties({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions - })); - return Object.assign(Object.assign({}, res), { - _response: res._response, - objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, - objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) - }); - }); + get copyId() { + return this.originalResponse.copyId; } /** - * Marks the specified blob or snapshot for deletion. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. * - * @param options - Optional options to Blob Delete operation. + * @readonly */ - async delete(options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.blobContext.delete({ - abortSignal: options.abortSignal, - deleteSnapshots: options.deleteSnapshots, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - }); + get copyProgress() { + return this.originalResponse.copyProgress; } /** - * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. * - * @param options - Optional options to Blob Delete operation. + * @readonly */ - async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a$2, _b$1; - try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } catch (e) { - if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "BlobNotFound") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); - throw e; - } - }); + get copySource() { + return this.originalResponse.copySource; } /** - * Restores the contents and metadata of soft deleted blob and any associated - * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 - * or later. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' * - * @param options - Optional options to Blob Undelete operation. + * @readonly */ - async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions - })); - }); + get copyStatus() { + return this.originalResponse.copyStatus; } /** - * Sets system properties on the blob. - * - * If no value provided, or no value provided for the specified blob HTTP headers, - * these blob HTTP headers without a value will be cleared. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. * - * @param blobHTTPHeaders - If no value provided, or no value provided for - * the specified blob HTTP headers, these blob HTTP - * headers without a value will be cleared. - * A common header to set is `blobContentType` - * enabling the browser to provide functionality - * based on file type. - * @param options - Optional options to Blob Set HTTP Headers operation. + * @readonly */ - async setHTTPHeaders(blobHTTPHeaders, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.blobContext.setHttpHeaders({ - abortSignal: options.abortSignal, - blobHttpHeaders: blobHTTPHeaders, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - }); + get copyStatusDescription() { + return this.originalResponse.copyStatusDescription; } /** - * Sets user-defined metadata for the specified blob as one or more name-value pairs. - * - * If no option provided, or no metadata defined in the parameter, the blob - * metadata will be removed. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. * - * @param metadata - Replace existing metadata with this value. - * If no value provided the existing metadata will be removed. - * @param options - Optional options to Set Metadata operation. + * @readonly */ - async setMetadata(metadata$1, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.blobContext.setMetadata({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata: metadata$1, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); - }); + get leaseDuration() { + return this.originalResponse.leaseDuration; } /** - * Sets tags on the underlying blob. - * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. - * Valid tag key and value characters include lower and upper case letters, digits (0-9), - * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. * - * @param tags - - * @param options - + * @readonly */ - async setTags(tags$1, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.blobContext.setTags({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags$1) - })); - }); + get leaseState() { + return this.originalResponse.leaseState; } /** - * Gets the tags associated with the underlying blob. + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. * - * @param options - + * @readonly */ - async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a$2; - const response = assertResponse(await this.blobContext.getTags({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - const wrappedResponse = Object.assign(Object.assign({}, response), { - _response: response._response, - tags: toTags({ blobTagSet: response.blobTagSet }) || {} - }); - return wrappedResponse; - }); + get leaseStatus() { + return this.originalResponse.leaseStatus; } /** - * Get a {@link BlobLeaseClient} that manages leases on the blob. + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. * - * @param proposeLeaseId - Initial proposed lease Id. - * @returns A new BlobLeaseClient object for managing leases on the blob. + * @readonly */ - getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + get date() { + return this.originalResponse.date; } /** - * Creates a read-only snapshot of a blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. * - * @param options - Optional options to the Blob Create Snapshot operation. + * @readonly */ - async createSnapshot(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.blobContext.createSnapshot({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); - }); + get blobCommittedBlockCount() { + return this.originalResponse.blobCommittedBlockCount; } /** - * Asynchronously copies a blob to a destination within the storage account. - * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. - * Note that the onProgress callback will not be invoked if the operation completes in the first - * request, and attempting to cancel a completed copy will result in an error being thrown. - * - * In version 2012-02-12 and later, the source for a Copy Blob operation can be - * a committed blob in any Azure storage account. - * Beginning with version 2015-02-21, the source for a Copy Blob operation can be - * an Azure file in any Azure storage account. - * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob - * operation to copy from another storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob - * - * Example using automatic polling: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` - * - * Example using manual polling: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); - * } - * const result = copyPoller.getResult(); - * ``` + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. * - * Example using progress updates: + * @readonly + */ + get etag() { + return this.originalResponse.etag; + } + /** + * The error code. * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * onProgress(state) { - * console.log(`Progress: ${state.copyProgress}`); - * } - * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * @readonly + */ + get errorCode() { + return this.originalResponse.errorCode; + } + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). * - * Example using a changing polling interval (default 15 seconds): + * @readonly + */ + get isServerEncrypted() { + return this.originalResponse.isServerEncrypted; + } + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress - * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * @readonly + */ + get blobContentMD5() { + return this.originalResponse.blobContentMD5; + } + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. * - * Example using copy cancellation: + * @readonly + */ + get lastModified() { + return this.originalResponse.lastModified; + } + /** + * A name-value pair + * to associate with a file storage object. * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * // cancel operation after starting it. - * try { - * await copyPoller.cancelOperation(); - * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); - * } - * } - * ``` + * @readonly + */ + get metadata() { + return this.originalResponse.metadata; + } + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. * - * @param copySource - url to the source Azure Blob/File. - * @param options - Optional options to the Blob Start Copy From URL operation. + * @readonly */ - async beginCopyFromURL(copySource$1, options = {}) { - const client = { - abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), - getProperties: (...args) => this.getProperties(...args), - startCopyFromURL: (...args) => this.startCopyFromURL(...args) - }; - const poller = new BlobBeginCopyFromUrlPoller({ - blobClient: client, - copySource: copySource$1, - intervalInMs: options.intervalInMs, - onProgress: options.onProgress, - resumeFrom: options.resumeFrom, - startCopyFromURLOptions: options - }); - await poller.poll(); - return poller; + get requestId() { + return this.originalResponse.requestId; } /** - * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero - * length and full metadata. Version 2012-02-12 and newer. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. * - * @param copyId - Id of the Copy From URL operation. - * @param options - Optional options to the Blob Abort Copy From URL operation. + * @readonly */ - async abortCopyFromURL(copyId$1, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId$1, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions - })); - }); + get clientRequestId() { + return this.originalResponse.clientRequestId; } /** - * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not - * return a response until the copy is complete. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * Indicates the version of the File service used + * to execute the request. * - * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication - * @param options - + * @readonly */ - async syncCopyFromURL(copySource$1, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1, _d$1, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource$1, { - abortSignal: options.abortSignal, - metadata: options.metadata, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, - sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, - sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince - }, - sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, - legalHold: options.legalHold, - encryptionScope: options.encryptionScope, - copySourceTags: options.copySourceTags, - tracingOptions: updatedOptions.tracingOptions - })); - }); + get version() { + return this.originalResponse.version; } /** - * Sets the tier on a blob. The operation is allowed on a page blob in a premium - * storage account and on a block blob in a blob storage account (locally redundant - * storage only). A premium page blob's tier determines the allowed size, IOPS, - * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive - * storage type. This operation does not update the blob's ETag. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. * - * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. - * @param options - Optional options to the Blob Set Tier operation. + * @readonly */ - async setAccessTier(tier$1, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier$1), { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - rehydratePriority: options.rehydratePriority, - tracingOptions: updatedOptions.tracingOptions - })); - }); + get encryptionKeySha256() { + return this.originalResponse.encryptionKeySha256; } - async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a$2; - let buffer$2; - let offset = 0; - let count = 0; - let options = param4; - if (param1 instanceof Buffer) { - buffer$2 = param1; - offset = param2 || 0; - count = typeof param3 === "number" ? param3 : 0; - } else { - offset = typeof param1 === "number" ? param1 : 0; - count = typeof param2 === "number" ? param2 : 0; - options = param3 || {}; - } - let blockSize = (_a$2 = options.blockSize) !== null && _a$2 !== void 0 ? _a$2 : 0; - if (blockSize < 0) throw new RangeError("blockSize option must be >= 0"); - if (blockSize === 0) blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; - if (offset < 0) throw new RangeError("offset option must be >= 0"); - if (count && count <= 0) throw new RangeError("count option must be greater than 0"); - if (!options.conditions) options.conditions = {}; - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { - if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - count = response.contentLength - offset; - if (count < 0) throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); - } - if (!buffer$2) try { - buffer$2 = Buffer.alloc(count); - } catch (error) { - throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`); - } - if (buffer$2.length < count) throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); - let transferProgress = 0; - const batch = new Batch(options.concurrency); - for (let off = offset; off < offset + count; off = off + blockSize) batch.addOperation(async () => { - let chunkEnd = offset + count; - if (off + blockSize < chunkEnd) chunkEnd = off + blockSize; - const response = await this.download(off, chunkEnd - off, { - abortSignal: options.abortSignal, - conditions: options.conditions, - maxRetryRequests: options.maxRetryRequestsPerBlock, - customerProvidedKey: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions - }); - const stream$3 = response.readableStreamBody; - await streamToBuffer(stream$3, buffer$2, off - offset, chunkEnd - offset); - transferProgress += chunkEnd - off; - if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); - }); - await batch.do(); - return buffer$2; - }); + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + get contentCrc64() { + return this.originalResponse.contentCrc64; } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. + * The response body as a browser Blob. + * Always undefined in node.js. * - * Downloads an Azure Blob to a local file. - * Fails if the the given file path already exits. - * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * @readonly + */ + get blobBody() {} + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. * - * @param filePath - - * @param offset - From which position of the block blob to download. - * @param count - How much data to be downloaded. Will download to the end when passing undefined. - * @param options - Options to Blob download options. - * @returns The response data for blob download operation, - * but with readableStreamBody set to undefined since its - * content is already read and written into a local file - * at the specified path. + * It will parse avor data returned by blob query. + * + * @readonly */ - async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - if (response.readableStreamBody) await readStreamToLocalFile(response.readableStreamBody, filePath); - response.blobDownloadStream = void 0; - return response; - }); + get readableStreamBody() { + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } - getBlobAndContainerNamesFromUrl() { - let containerName; - let blobName; - try { - const parsedUrl = new URL(this.url); - if (parsedUrl.host.split(".")[1] === "blob") { - const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); - containerName = pathComponents[1]; - blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { - const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); - containerName = pathComponents[2]; - blobName = pathComponents[4]; - } else { - const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); - containerName = pathComponents[1]; - blobName = pathComponents[3]; - } - containerName = decodeURIComponent(containerName); - blobName = decodeURIComponent(blobName); - blobName = blobName.replace(/\\/g, "/"); - if (!containerName) throw new Error("Provided containerName is invalid."); - return { - blobName, - containerName - }; - } catch (error) { - throw new Error("Unable to extract blobName and containerName with provided information."); - } + /** + * The HTTP response. + */ + get _response() { + return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** - * Asynchronously copies a blob to a destination within the storage account. - * In version 2012-02-12 and later, the source for a Copy Blob operation can be - * a committed blob in any Azure storage account. - * Beginning with version 2015-02-21, the source for a Copy Blob operation can be - * an Azure file in any Azure storage account. - * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob - * operation to copy from another storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob + * Creates an instance of BlobQueryResponse. * - * @param copySource - url to the source Azure Blob/File. - * @param options - Optional options to the Blob Start Copy From URL operation. + * @param originalResponse - + * @param options - */ - async startCopyFromURL(copySource$1, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1; - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource$1, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: options.sourceConditions.ifMatch, - sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, - sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, - sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, - sourceIfTags: options.sourceConditions.tagConditions - }, - immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, - immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, - legalHold: options.legalHold, - rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - sealBlob: options.sealBlob, - tracingOptions: updatedOptions.tracingOptions - })); + constructor(originalResponse, options = {}) { + this.originalResponse = originalResponse; + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + } + }; + exports.BlobQueryResponse = BlobQueryResponse; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTier = void 0; + exports.toAccessTier = toAccessTier; + exports.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + const constants_js_1 = require_constants$1(); + /** + * Represents the access tier on a blob. + * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} + */ + var BlockBlobTier; + (function(BlockBlobTier) { + /** + * Optimized for storing data that is accessed frequently. + */ + BlockBlobTier["Hot"] = "Hot"; + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + BlockBlobTier["Cool"] = "Cool"; + /** + * Optimized for storing data that is rarely accessed. + */ + BlockBlobTier["Cold"] = "Cold"; + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + BlockBlobTier["Archive"] = "Archive"; + })(BlockBlobTier || (exports.BlockBlobTier = BlockBlobTier = {})); + /** + * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. + * Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} + * for detailed information on the corresponding IOPS and throughput per PageBlobTier. + */ + var PremiumPageBlobTier; + (function(PremiumPageBlobTier) { + /** + * P4 Tier. + */ + PremiumPageBlobTier["P4"] = "P4"; + /** + * P6 Tier. + */ + PremiumPageBlobTier["P6"] = "P6"; + /** + * P10 Tier. + */ + PremiumPageBlobTier["P10"] = "P10"; + /** + * P15 Tier. + */ + PremiumPageBlobTier["P15"] = "P15"; + /** + * P20 Tier. + */ + PremiumPageBlobTier["P20"] = "P20"; + /** + * P30 Tier. + */ + PremiumPageBlobTier["P30"] = "P30"; + /** + * P40 Tier. + */ + PremiumPageBlobTier["P40"] = "P40"; + /** + * P50 Tier. + */ + PremiumPageBlobTier["P50"] = "P50"; + /** + * P60 Tier. + */ + PremiumPageBlobTier["P60"] = "P60"; + /** + * P70 Tier. + */ + PremiumPageBlobTier["P70"] = "P70"; + /** + * P80 Tier. + */ + PremiumPageBlobTier["P80"] = "P80"; + })(PremiumPageBlobTier || (exports.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) return; + return tier; + } + function ensureCpkIfSpecified(cpk, isHttps) { + if (cpk && !isHttps) throw new RangeError("Customer-provided encryption key must be used over HTTPS."); + if (cpk && !cpk.encryptionAlgorithm) cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; + } + /** + * Defines the known cloud audiences for Storage. + */ + var StorageBlobAudience; + (function(StorageBlobAudience) { + /** + * The OAuth scope to use to retrieve an AAD token for Azure Storage. + */ + StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + /** + * The OAuth scope to use to retrieve an AAD token for Azure Disk. + */ + StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports.StorageBlobAudience = StorageBlobAudience = {})); + /** + * + * To get OAuth audience for a storage account for blob service. + */ + function getBlobServiceAccountAudience(storageAccountName) { + return `https://${storageAccountName}.blob.core.windows.net/.default`; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.rangeResponseFromModel = rangeResponseFromModel; + /** + * Function that converts PageRange and ClearRange to a common Range object. + * PageRange and ClearRange have start and end while Range offset and count + * this function normalizes to Range. + * @param response - Model PageBlob Range response + */ + function rangeResponseFromModel(response) { + const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start + })); + const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start + })); + return { + ...response, + pageRange, + clearRange, + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logger = void 0; + const logger_1 = require_commonjs$13(); + /** + * The `@azure/logger` configuration for this package. + * @internal + */ + exports.logger = (0, logger_1.createClientLogger)("core-lro"); +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.terminalStates = exports.POLL_INTERVAL_IN_MS = void 0; + /** + * The default time interval to wait before sending the next polling request. + */ + exports.POLL_INTERVAL_IN_MS = 2e3; + /** + * The closed set of terminal states. + */ + exports.terminalStates = [ + "succeeded", + "canceled", + "failed" + ]; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation$2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.pollOperation = exports.initOperation = exports.deserializeState = void 0; + const logger_js_1 = require_logger(); + const constants_js_1 = require_constants(); + /** + * Deserializes the state + */ + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error) => { + if (isOperationError(error)) { + stateProxy.setError(state, error); + stateProxy.setFailed(state); + } + throw error; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") message = message + "."; + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": + stateProxy.setSucceeded(state); + break; + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": + stateProxy.setCanceled(state); + break; + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + /** + * Initiates the long-running operation. + */ + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + processOperationStatus({ + state, + status: getOperationStatus({ + response, + state, + operationLocation + }), + stateProxy, + response, + setErrorAsResult, + processResult + }); + return state; + } + exports.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status:\n\tPolling from: ${state.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) return { + response: await poll(resourceLocation).catch(setStateError({ + state, + stateProxy, + isOperationError + })), + status + }; + } + return { + response, + status + }; + } + /** Polls the long-running operation. */ + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(location, isUpdated); + } else withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 || updateState(state, response); + } + } + exports.pollOperation = pollOperation; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.pollHttpOperation = exports.isOperationError = exports.getResourceLocation = exports.getOperationStatus = exports.getOperationLocation = exports.initHttpOperation = exports.getStatusFromInitialResponse = exports.getErrorFromResponse = exports.parseRetryAfter = exports.inferLroMode = void 0; + const operation_js_1 = require_operation$2(); + const logger_js_1 = require_logger(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": return requestPath; + case "DELETE": return; + case "PATCH": return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + default: return getDefault(); } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasUrl(options) { - return new Promise((resolve) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - const sas = generateBlobSASQueryParameters(Object.assign({ - containerName: this._containerName, - blobName: this._name, - snapshotTime: this._snapshot, - versionId: this._versionId - }, options), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": return; + case "original-uri": return requestPath; + default: return location; + } } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - return generateBlobSASQueryParametersInternal(Object.assign({ - containerName: this._containerName, - blobName: this._name, - snapshotTime: this._snapshot, - versionId: this._versionId - }, options), this.credential).stringToSign; + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const pollingUrl = getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + else if (location !== void 0) return { + mode: "ResourceLocation", + operationLocation: location + }; + else if (normalizedRequestMethod === "PUT" && requestPath) return { + mode: "Body", + operationLocation: requestPath + }; + else return; + } + exports.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: return toOperationStatus(statusCode); + case "succeeded": return "succeeded"; + case "failed": return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": return "running"; + case "canceled": + case "cancelled": return "canceled"; + default: + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; } - /** - * - * Generates a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ - containerName: this._containerName, - blobName: this._name, - snapshotTime: this._snapshot, - versionId: this._versionId - }, options), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ + status, + statusCode: rawResponse.statusCode + }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ + status: (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState, + statusCode: rawResponse.statusCode + }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) return "running"; + else if (statusCode < 300) return "succeeded"; + else return "failed"; + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasStringToSign(options, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ - containerName: this._containerName, - blobName: this._name, - snapshotTime: this._snapshot, - versionId: this._versionId - }, options), userDelegationKey, this.accountName).stringToSign; + } + exports.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error = accessBodyProperty(response, "error"); + if (!error) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; } - /** - * Delete the immutablility policy on the blob. - * - * @param options - Optional options to delete immutability policy on the blob. - */ - async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); - }); + if (!error.code || !error.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; } - /** - * Set immutability policy on the blob. - * - * @param options - Optional options to set immutability policy on the blob. - */ - async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ - immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, - immutabilityPolicyMode: immutabilityPolicy.policyMode, - tracingOptions: updatedOptions.tracingOptions - })); - }); + return error; + } + exports.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) return retryAfterTime - timeNow; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + switch ((_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]) { + case void 0: return toOperationStatus(response.rawResponse.statusCode); + case "Body": return getOperationStatus(response, state); + default: return "running"; + } } - /** - * Set legal hold on the blob. - * - * @param options - Optional options to set legal hold on the blob. - */ - async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports.getStatusFromInitialResponse = getStatusFromInitialResponse; + /** + * Initiates the long-running operation. + */ + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ + response, + operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, + resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation + }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult + }); + } + exports.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + switch ((_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]) { + case "OperationLocation": return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) }); + case "ResourceLocation": return getLocationHeader(rawResponse); + default: return; } - /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information - * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. - */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions - })); - }); + } + exports.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": return getStatus(rawResponse); + case "ResourceLocation": return toOperationStatus(rawResponse.statusCode); + case "Body": return getProvisioningState(rawResponse); + default: throw new Error(`Internal error: Unexpected operation mode: ${mode}`); } - }; + } + exports.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") state.config.resourceLocation = loc; + return state.config.resourceLocation; + } + exports.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports.isOperationError = isOperationError; + /** Polls the long-running operation. */ + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports.pollHttpOperation = pollHttpOperation; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller$2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.buildCreatePoller = void 0; + const operation_js_1 = require_operation$2(); + const constants_js_1 = require_constants(); + const core_util_1 = require_commonjs$11(); + const createStateProxy = () => ({ + initState: (config) => ({ + status: "running", + config + }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error) => state.error = error, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); /** - * AppendBlobClient defines a set of operations applicable to append blobs. + * Returns a poller factory. */ - var AppendBlobClient = class AppendBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { - let pipeline; - let url$1; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url$1 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); - } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - pipeline = newPipeline(sharedKeyCredential, options); - } else throw new Error("Account connection string is only supported in Node.js environment"); - else if (extractedCreds.kind === "SASConnString") { - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - super(url$1, pipeline); - this.appendBlobContext = this.storageClientContext.appendBlob; - } - /** - * Creates a new AppendBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot$1) { - return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); - } - /** - * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param options - Options to the Append Block Create operation. - * - * - * Example usage: - * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); - * await appendBlobClient.create(); - * ``` - */ - async create(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1; - return assertResponse(await this.appendBlobContext.create(0, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, - immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, - legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions - })); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) withOperationLocationCallback(operationLocation); + else if (!called) withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful }); - } - /** - * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param options - - */ - async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a$2, _b$1; - try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } catch (e) { - if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "BlobAlreadyExists") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); - throw e; + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => [ + "succeeded", + "failed", + "canceled" + ].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ state }), + onProgress: (callback) => { + const s = Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) abortController.abort(); + else if (!abortSignal.aborted) inputAbortSignal === null || inputAbortSignal === void 0 || inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 || inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) return poller.getResult(); + else switch (state.status) { + case "succeeded": return poller.getResult(); + case "canceled": throw new Error(cancelErrMsg); + case "failed": throw state.error; + case "notStarted": + case "running": throw new Error(`Polling completed without succeeding or failing`); + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) return; + } else switch (state.status) { + case "succeeded": return; + case "canceled": throw new Error(cancelErrMsg); + case "failed": throw state.error; + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) switch (state.status) { + case "canceled": throw new Error(cancelErrMsg); + case "failed": throw state.error; + } } + }; + return poller; + }; + } + exports.buildCreatePoller = buildCreatePoller; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createHttpPoller = void 0; + const operation_js_1 = require_operation$1(); + const poller_js_1 = require_poller$2(); + /** + * Creates a poller that can be used to poll a long-running operation. + * @param lro - Description of the long-running operation + * @param options - options to configure the poller + * @returns an initialized poller + */ + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ + response, + operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, + resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation + }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports.createHttpPoller = createHttpPoller; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.GenericPollOperation = void 0; + const operation_js_1 = require_operation$1(); + const logger_js_1 = require_logger(); + const createStateProxy = () => ({ + initState: (config) => ({ + config, + isStarted: true + }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error) => state.error = error, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + /** empty body */ + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult }); + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 || _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; } /** - * Seals the append blob, making it read only. - * - * @param options - - */ - async seal(options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.appendBlobContext.seal({ - abortSignal: options.abortSignal, - appendPositionAccessConditions: options.conditions, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - }); - } - /** - * Commits a new block of data to the end of the existing append blob. - * @see https://learn.microsoft.com/rest/api/storageservices/append-block - * - * @param body - Data to be appended. - * @param contentLength - Length of the body in bytes. - * @param options - Options to the Append Block operation. - * - * - * Example usage: - * - * ```js - * const content = "Hello World!"; - * - * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); - * await newAppendBlobClient.create(); - * await newAppendBlobClient.appendBlock(content, content.length); - * - * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); - * await existingAppendBlobClient.appendBlock(content, content.length); - * ``` - */ - async appendBlock(body$1, contentLength$1, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength$1, body$1, { - abortSignal: options.abortSignal, - appendPositionAccessConditions: options.conditions, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - requestOptions: { onUploadProgress: options.onProgress }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); - }); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob - * where the contents are read from a source url. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/append-block-from-url - * - * @param sourceURL - - * The url to the blob that will be the source of the copy. A source blob in the same storage account can - * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob - * must either be public or must be authenticated via a shared access signature. If the source blob is - * public, no authentication is required to perform the operation. - * @param sourceOffset - Offset in source to be appended - * @param count - Number of bytes to be appended as a block - * @param options - + * Serializes the Poller operation. */ - async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1, _d$1, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { - abortSignal: options.abortSignal, - sourceRange: rangeToString({ - offset: sourceOffset, - count - }), - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - leaseAccessConditions: options.conditions, - appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, - sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, - sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince - }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); - }); + toString() { + return JSON.stringify({ state: this.state }); } }; + exports.GenericPollOperation = GenericPollOperation; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Poller = exports.PollerCancelledError = exports.PollerStoppedError = void 0; /** - * BlockBlobClient defines a set of operations applicable to block blobs. + * When a poller is manually stopped through the `stopPolling` method, + * the poller will be rejected with an instance of the PollerStoppedError. */ - var BlockBlobClient = class BlockBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { - let pipeline; - let url$1; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url$1 = urlOrConnectionString; - if (blobNameOrOptions && typeof blobNameOrOptions !== "string") options = blobNameOrOptions; - pipeline = newPipeline(new AnonymousCredential(), options); - } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - pipeline = newPipeline(sharedKeyCredential, options); - } else throw new Error("Account connection string is only supported in Node.js environment"); - else if (extractedCreds.kind === "SASConnString") { - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - super(url$1, pipeline); - this.blockBlobContext = this.storageClientContext.blockBlob; - this._blobContext = this.storageClientContext.blob; + var PollerStoppedError = class PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, PollerStoppedError.prototype); } - /** - * Creates a new BlockBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a URL to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot$1) { - return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); + }; + exports.PollerStoppedError = PollerStoppedError; + /** + * When the operation is cancelled, the poller will be rejected with an instance + * of the PollerCancelledError. + */ + var PollerCancelledError = class PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, PollerCancelledError.prototype); } + }; + exports.PollerCancelledError = PollerCancelledError; + /** + * A class that represents the definition of a program that polls through consecutive requests + * until it reaches a state of completion. + * + * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. + * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. + * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * + * ```ts + * const poller = new MyPoller(); + * + * // Polling just once: + * await poller.poll(); + * + * // We can try to cancel the request here, by calling: + * // + * // await poller.cancelOperation(); + * // + * + * // Getting the final result: + * const result = await poller.pollUntilDone(); + * ``` + * + * The Poller is defined by two types, a type representing the state of the poller, which + * must include a basic set of properties from `PollOperationState`, + * and a return type defined by `TResult`, which can be anything. + * + * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having + * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * + * ```ts + * class Client { + * public async makePoller: PollerLike { + * const poller = new MyPoller({}); + * // It might be preferred to return the poller after the first request is made, + * // so that some information can be obtained right away. + * await poller.poll(); + * return poller; + * } + * } + * + * const poller: PollerLike = myClient.makePoller(); + * ``` + * + * A poller can be created through its constructor, then it can be polled until it's completed. + * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. + * At any point in time, the intermediate forms of the result type can be requested without delay. + * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * + * ```ts + * const poller = myClient.makePoller(); + * const state: MyOperationState = poller.getOperationState(); + * + * // The intermediate result can be obtained at any time. + * const result: MyResult | undefined = poller.getResult(); + * + * // The final result can only be obtained after the poller finishes. + * const result: MyResult = await poller.pollUntilDone(); + * ``` + * + */ + var Poller = class { /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. * - * Quick query for a JSON or CSV formatted blob. + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. * - * Example usage (Node.js): + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * const operation = { + * state, + * update, + * cancel, + * toString + * } * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } * } * ``` * - * @param query - - * @param options - - */ - async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) throw new Error("This operation currently is only supported in Node.js."); - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a$2; - const response = assertResponse(await this._blobContext.query({ - abortSignal: options.abortSignal, - queryRequest: { - queryType: "SQL", - expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) - }, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions - })); - return new BlobQueryResponse(response, { - abortSignal: options.abortSignal, - onProgress: options.onProgress, - onError: options.onError - }); - }); - } - /** - * Creates a new block blob, or updates the content of an existing block blob. - * Updating an existing block blob overwrites any existing metadata on the blob. - * Partial updates are not supported; the content of the existing blob is - * overwritten with the new content. To perform a partial update of a block blob's, - * use {@link stageBlock} and {@link commitBlockList}. - * - * This is a non-parallel uploading method, please use {@link uploadFile}, - * {@link uploadStream} or {@link uploadBrowserData} for better performance - * with concurrency uploading. - * - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function - * which returns a new Readable stream whose offset is from data source beginning. - * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a - * string including non non-Base64/Hex-encoded characters. - * @param options - Options to the Block Blob Upload operation. - * @returns Response data for the Block Blob Upload operation. + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. * - * Example usage: + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: * - * ```js - * const content = "Hello world!"; - * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } * ``` - */ - async upload(body$1, contentLength$1, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1; - return assertResponse(await this.blockBlobContext.upload(contentLength$1, body$1, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - requestOptions: { onUploadProgress: options.onProgress }, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, - immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions - })); - }); - } - /** - * Creates a new Block Blob where the contents of the blob are read from a given URL. - * This API is supported beginning with the 2020-04-08 version. Partial updates - * are not supported with Put Blob from URL; the content of an existing blob is overwritten with - * the content of the new blob. To perform partial updates to a block blob’s contents using a - * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. - * - * @param sourceURL - Specifies the URL of the blob. The value - * may be a URL of up to 2 KB in length that specifies a blob. - * The value should be URL-encoded as it would appear - * in a request URI. The source blob must either be public - * or must be authenticated via a shared access signature. - * If the source blob is public, no authentication is required - * to perform the operation. Here are some examples of source object URLs: - * - https://myaccount.blob.core.windows.net/mycontainer/myblob - * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param options - Optional parameters. - */ - async syncUploadFromURL(sourceURL, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1, _d$1, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, - sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, - sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, - cpkInfo: options.customerProvidedKey, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - copySourceTags: options.copySourceTags, - tracingOptions: updatedOptions.tracingOptions - }))); - }); - } - /** - * Uploads the specified block to the block blob's "staging area" to be later - * committed by a call to commitBlockList. - * @see https://learn.microsoft.com/rest/api/storageservices/put-block - * - * @param blockId - A 64-byte value that is base64-encoded - * @param body - Data to upload to the staging area. - * @param contentLength - Number of bytes to upload. - * @param options - Options to the Block Blob Stage Block operation. - * @returns Response data for the Block Blob Stage Block operation. - */ - async stageBlock(blockId$1, body$1, contentLength$1, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId$1, contentLength$1, body$1, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - requestOptions: { onUploadProgress: options.onProgress }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); - }); - } - /** - * The Stage Block From URL operation creates a new block to be committed as part - * of a blob where the contents are read from a URL. - * This API is available starting in version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-from-url - * - * @param blockId - A 64-byte value that is base64-encoded - * @param sourceURL - Specifies the URL of the blob. The value - * may be a URL of up to 2 KB in length that specifies a blob. - * The value should be URL-encoded as it would appear - * in a request URI. The source blob must either be public - * or must be authenticated via a shared access signature. - * If the source blob is public, no authentication is required - * to perform the operation. Here are some examples of source object URLs: - * - https://myaccount.blob.core.windows.net/mycontainer/myblob - * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param offset - From which position of the blob to download, greater than or equal to 0 - * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined - * @param options - Options to the Block Blob Stage Block From URL operation. - * @returns Response data for the Block Blob Stage Block From URL operation. - */ - async stageBlockFromURL(blockId$1, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId$1, 0, sourceURL, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ - offset, - count - }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tracingOptions: updatedOptions.tracingOptions - })); - }); - } - /** - * Writes a blob by specifying the list of block IDs that make up the blob. - * In order to be written as part of a blob, a block must have been successfully written - * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to - * update a blob by uploading only those blocks that have changed, then committing the new and existing - * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list - * - * @param blocks - Array of 64-byte value that is base64-encoded - * @param options - Options to the Block Blob Commit Block List operation. - * @returns Response data for the Block Blob Commit Block List operation. - */ - async commitBlockList(blocks$1, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks$1 }, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, - immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions - })); - }); - } - /** - * Returns the list of blocks that have been uploaded as part of a block blob - * using the specified block list filter. - * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list - * - * @param listType - Specifies whether to return the list of committed blocks, - * the list of uncommitted blocks, or both lists together. - * @param options - Options to the Block Blob Get Block List operation. - * @returns Response data for the Block Blob Get Block List operation. - */ - async getBlockList(listType$1, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a$2; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType$1, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - if (!res.committedBlocks) res.committedBlocks = []; - if (!res.uncommittedBlocks) res.uncommittedBlocks = []; - return res; - }); - } - /** - * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. - * - * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is - * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} - * to commit the block list. - * - * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is - * `blobContentType`, enabling the browser to provide - * functionality based on file type. - * - * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView - * @param options - - */ - async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer$2; - if (data instanceof Buffer) buffer$2 = data; - else if (data instanceof ArrayBuffer) buffer$2 = Buffer.from(data); - else { - data = data; - buffer$2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); - } - return this.uploadSeekableInternal((offset, size) => buffer$2.slice(offset, offset + size), buffer$2.byteLength, updatedOptions); - } else { - const browserBlob = new Blob([data]); - return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); - } - }); - } - /** - * ONLY AVAILABLE IN BROWSERS. - * - * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. - * - * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call - * {@link commitBlockList} to commit the block list. - * - * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is - * `blobContentType`, enabling the browser to provide - * functionality based on file type. - * - * @deprecated Use {@link uploadData} instead. - * - * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView - * @param options - Options to upload browser data. - * @returns Response data for the Blob Upload operation. - */ - async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { - const browserBlob = new Blob([browserData]); - return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); - }); - } - /** - * - * Uploads data to block blob. Requires a bodyFactory as the data source, - * which need to return a {@link HttpRequestBody} object with the offset and size provided. * - * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is - * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} - * to commit the block list. - * - * @param bodyFactory - - * @param size - size of the data to upload. - * @param options - Options to Upload to Block Blob operation. - * @returns Response data for the Blob Upload operation. + * @param operation - Must contain the basic properties of `PollOperation`. */ - async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a$2, _b$1; - let blockSize = (_a$2 = options.blockSize) !== null && _a$2 !== void 0 ? _a$2 : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); - const maxSingleShotSize = (_b$1 = options.maxSingleShotSize) !== null && _b$1 !== void 0 ? _b$1 : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); - if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) throw new RangeError(`${size} is too larger to upload to a block blob.`); - if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; - } - } - if (!options.blobHTTPHeaders) options.blobHTTPHeaders = {}; - if (!options.conditions) options.conditions = {}; - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { - if (size <= maxSingleShotSize) return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); - const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); - const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); - let transferProgress = 0; - const batch = new Batch(options.concurrency); - for (let i = 0; i < numBlocks; i++) batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); - const start = blockSize * i; - const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength$1 = end - start; - blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength$1), contentLength$1, { - abortSignal: options.abortSignal, - conditions: options.conditions, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - }); - transferProgress += contentLength$1; - if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); - }); - await batch.do(); - return this.commitBlockList(blockList, updatedOptions); + constructor(operation) { + /** controls whether to throw an error if the operation failed or was canceled. */ + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; }); + this.promise.catch(() => {}); } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Uploads a local file in blocks to a block blob. + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) this.stopped = false; + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. * - * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. - * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList - * to commit the block list. + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. * - * @param filePath - Full path of local file - * @param options - Options to Upload to Block Blob operation. - * @returns Response data for the Blob Upload operation. + * @param options - Optional properties passed to the operation's update method. */ - async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; - return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { - autoClose: true, - end: count ? offset + count - 1 : Infinity, - start: offset - }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + async pollOnce(options = {}) { + if (!this.isDone()) this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) }); + this.processUpdatedState(); } /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Uploads a Node.js Readable stream into block blob. + * fireProgress calls the functions passed in via onProgress the method of the poller. * - * PERFORMANCE IMPROVEMENT TIPS: - * * Input stream highWaterMark is better to set a same value with bufferSize - * parameter, which will avoid Buffer.concat() operations. + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. * - * @param stream - Node.js Readable stream - * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB - * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, - * positive correlation with max uploading concurrency. Default value is 5 - * @param options - Options to Upload Stream to Block Blob operation. - * @returns Response data for the Blob Upload operation. + * @param state - The current operation state. */ - async uploadStream(stream$3, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { - if (!options.blobHTTPHeaders) options.blobHTTPHeaders = {}; - if (!options.conditions) options.conditions = {}; - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { - let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); - let transferProgress = 0; - const blockList = []; - const scheduler = new BufferScheduler( - stream$3, - bufferSize, - maxConcurrency, - async (body$1, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); - blockList.push(blockID); - blockNum++; - await this.stageBlock(blockID, body$1, length, { - customerProvidedKey: options.customerProvidedKey, - conditions: options.conditions, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - }); - transferProgress += length; - if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); - }, - // concurrency should set a smaller value than maxConcurrency, which is helpful to - // reduce the possibility when a outgoing handler waits for stream data, in - // this situation, outgoing handlers are blocked. - // Outgoing queue shouldn't be empty. - Math.ceil(maxConcurrency / 4 * 3) -); - await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); - }); + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) callback(state); } - }; - /** - * PageBlobClient defines a set of operations applicable to page blobs. - */ - var PageBlobClient = class PageBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { - let pipeline; - let url$1; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url$1 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); - } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - pipeline = newPipeline(sharedKeyCredential, options); - } else throw new Error("Account connection string is only supported in Node.js environment"); - else if (extractedCreds.kind === "SASConnString") { - url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - super(url$1, pipeline); - this.pageBlobContext = this.storageClientContext.pageBlob; + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); } /** - * Creates a new PageBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. * - * @param snapshot - The snapshot timestamp. - * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. */ - withSnapshot(snapshot$1) { - return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error = new PollerCancelledError("Operation was canceled"); + this.reject(error); + throw error; + } + } + if (this.isDone() && this.resolve) this.resolve(this.getResult()); } /** - * Creates a page blob of the specified length. Call uploadPages to upload data - * data to a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param size - size of the page blob. - * @param options - Options to the Page Blob Create operation. - * @returns Response data for the Page Blob Create operation. + * Returns a promise that will resolve once the underlying operation is completed. */ - async create(size, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1; - return assertResponse(await this.pageBlobContext.create(0, size, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - blobSequenceNumber: options.blobSequenceNumber, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, - immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions - })); - }); + async pollUntilDone(pollOptions = {}) { + if (this.stopped) this.startPolling(pollOptions).catch(this.reject); + this.processUpdatedState(); + return this.promise; } /** - * Creates a page blob of the specified length. Call uploadPages to upload data - * data to a page blob. If the blob with the same name already exists, the content - * of the existing blob will remain unchanged. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. * - * @param size - size of the page blob. - * @param options - + * It returns a method that can be used to stop receiving updates on the given callback function. */ - async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a$2, _b$1; - try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { - conditions, - tracingOptions: updatedOptions.tracingOptions - }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } catch (e) { - if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "BlobAlreadyExists") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); - throw e; - } - }); + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; } /** - * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://learn.microsoft.com/rest/api/storageservices/put-page - * - * @param body - Data to upload - * @param offset - Offset of destination page blob - * @param count - Content length of the body, also number of bytes to be uploaded - * @param options - Options to the Page Blob Upload Pages operation. - * @returns Response data for the Page Blob Upload Pages operation. + * Returns true if the poller has finished polling. */ - async uploadPages(body$1, offset, count, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.pageBlobContext.uploadPages(count, body$1, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ - offset, - count - }), - sequenceNumberAccessConditions: options.conditions, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); - }); + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); } /** - * The Upload Pages operation writes a range of pages to a page blob where the - * contents are read from a URL. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-page-from-url - * - * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication - * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob - * @param destOffset - Offset of destination page blob - * @param count - Number of bytes to be uploaded from source page blob - * @param options - + * Stops the poller from continuing to poll. */ - async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a$2, _b$1, _c$1, _d$1, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ - offset: sourceOffset, - count - }), 0, rangeToString({ - offset: destOffset, - count - }), { - abortSignal: options.abortSignal, - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - leaseAccessConditions: options.conditions, - sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, - sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, - sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince - }, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tracingOptions: updatedOptions.tracingOptions - })); - }); + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) this.reject(new PollerStoppedError("This poller is already stopped")); + } } /** - * Frees the specified pages from the page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-page - * - * @param offset - Starting byte position of the pages to clear. - * @param count - Number of bytes to clear. - * @param options - Options to the Page Blob Clear Pages operation. - * @returns Response data for the Page Blob Clear Pages operation. + * Returns true if the poller is stopped. */ - async clearPages(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.pageBlobContext.clearPages(0, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - range: rangeToString({ - offset, - count - }), - sequenceNumberAccessConditions: options.conditions, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); - }); + isStopped() { + return this.stopped; } /** - * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * Attempts to cancel the underlying operation. * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns Response data for the Page Blob Get Ranges operation. + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. */ - async getPageRanges(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a$2; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - range: rangeToString({ - offset, - count - }), - tracingOptions: updatedOptions.tracingOptions - })); - return rangeResponseFromModel(response); - }); + cancelOperation(options = {}) { + if (!this.cancelPromise) this.cancelPromise = this.cancelOnce(options); + else if (options.abortSignal) throw new Error("A cancel request is currently pending"); + return this.cancelPromise; } /** - * getPageRangesSegment returns a single segment of page ranges starting from the - * specified Marker. Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call getPageRangesSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * Returns the state of the operation. * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to PageBlob Get Page Ranges Segment operation. + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. */ - async listPageRangesSegment(offset = 0, count, marker$1, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.pageBlobContext.getPageRanges({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - range: rangeToString({ - offset, - count - }), - marker: marker$1, - maxPageSize: options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions - })); + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + return this.operation.state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports.Poller = Poller; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.LroEngine = void 0; + const operation_js_1 = require_operation(); + const constants_js_1 = require_constants(); + const poller_js_1 = require_poller(); + const operation_js_2 = require_operation$2(); + /** + * The LRO Engine, a class that performs polling. + */ + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); + } + }; + exports.LroEngine = LroEngine; +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine$1(); + Object.defineProperty(exports, "LroEngine", { + enumerable: true, + get: function() { + return lroEngine_js_1.LroEngine; + } + }); +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); +})); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs$3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createHttpPoller = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller$1(); + Object.defineProperty(exports, "createHttpPoller", { + enumerable: true, + get: function() { + return poller_js_1.createHttpPoller; + } + }); + /** + * This can be uncommented to expose the protocol-agnostic poller + */ + /** legacy */ + tslib_1.__exportStar(require_lroEngine(), exports); + tslib_1.__exportStar(require_poller(), exports); + tslib_1.__exportStar(require_pollOperation(), exports); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobBeginCopyFromUrlPoller = void 0; + const core_util_1 = require_commonjs$11(); + const core_lro_1 = require_commonjs$3(); + /** + * This is the poller returned by {@link BlobClient.beginCopyFromURL}. + * This can not be instantiated directly outside of this package. + * + * @hidden + */ + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; + constructor(options) { + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + let state; + if (resumeFrom) state = JSON.parse(resumeFrom).state; + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, + blobClient, + copySource, + startCopyFromURLOptions }); + super(operation); + if (typeof onProgress === "function") this.onProgress(onProgress); + this.intervalInMs = intervalInMs; + } + delay() { + return (0, core_util_1.delay)(this.intervalInMs); + } + }; + exports.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; + /** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ + const cancel = async function cancel(options = {}) { + const state = this.state; + const { copyId } = state; + if (state.isCompleted) return makeBlobBeginCopyFromURLPollOperation(state); + if (!copyId) { + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); + } + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); + }; + /** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ + const update = async function update(options = {}) { + const state = this.state; + const { blobClient, copySource, startCopyFromURLOptions } = state; + if (!state.isStarted) { + state.isStarted = true; + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); + state.copyId = result.copyId; + if (result.copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + } else if (!state.isCompleted) try { + const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal }); + const { copyStatus, copyProgress } = result; + const prevCopyProgress = state.copyProgress; + if (copyProgress) state.copyProgress = copyProgress; + if (copyStatus === "pending" && copyProgress !== prevCopyProgress && typeof options.fireProgress === "function") options.fireProgress(state); + else if (copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } else if (copyStatus === "failed") { + state.error = /* @__PURE__ */ new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); + state.isCompleted = true; + } + } catch (err) { + state.error = err; + state.isCompleted = true; } + return makeBlobBeginCopyFromURLPollOperation(state); + }; + /** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ + const toString = function toString() { + return JSON.stringify({ state: this.state }, (key, value) => { + if (key === "blobClient") return; + return value; + }); + }; + /** + * Creates a poll operation given the provided state. + * @hidden + */ + function makeBlobBeginCopyFromURLPollOperation(state) { + return { + state: { ...state }, + cancel, + toString, + update + }; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.rangeToString = rangeToString; + /** + * Generate a range string. For example: + * + * "bytes=255-" or "bytes=0-511" + * + * @param iRange - + */ + function rangeToString(iRange) { + if (iRange.offset < 0) throw new RangeError(`Range.offset cannot be smaller than 0.`); + if (iRange.count && iRange.count <= 0) throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); + return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Batch = void 0; + const events_1 = __require("events"); + /** + * States for Batch. + */ + var BatchStates; + (function(BatchStates) { + BatchStates[BatchStates["Good"] = 0] = "Good"; + BatchStates[BatchStates["Error"] = 1] = "Error"; + })(BatchStates || (BatchStates = {})); + /** + * Batch provides basic parallel execution with concurrency limits. + * Will stop execute left operations when one of the executed operation throws an error. + * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. + */ + var Batch = class { /** - * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param marker - A string value that identifies the portion of - * the get of page ranges to be returned with the next getting operation. The - * operation returns the ContinuationToken value within the response body if the - * getting operation did not return all page ranges remaining within the current page. - * The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of get - * items. The marker value is opaque to the client. - * @param options - Options to List Page Ranges operation. + * Concurrency. Must be lager than 0. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker$1, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker$1 || marker$1 === void 0) do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker$1, options)); - marker$1 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker$1); - }); - } + concurrency; /** - * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to List Page Ranges operation. + * Number of active operations under execution. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a$2, e_1, _b$1, _c$1; - let marker$1; - try { - for (var _d$1 = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const getPageRangesSegment = _c$1; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); - } + actives = 0; /** - * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * .byPage() returns an async iterable iterator to list of page ranges for a page blob. - * - * Example using `for await` syntax: - * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` - * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRanges()) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns An asyncIterableIterator that supports paging. + * Number of completed operations under execution. */ - listPageRanges(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - const iter = this.listPageRangeItems(offset, count, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - } - }; - } + completed = 0; /** - * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page blob - * @param count - Number of bytes to get ranges diff. - * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - * @returns Response data for the Page Blob Get Page Range Diff operation. + * Offset of next operation to be executed. */ - async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a$2; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - prevsnapshot: prevSnapshot, - range: rangeToString({ - offset, - count - }), - tracingOptions: updatedOptions.tracingOptions - })); - return rangeResponseFromModel(result); - }); - } + offset = 0; /** - * getPageRangesDiffSegment returns a single segment of page ranges starting from the - * specified Marker for difference between previous snapshot and the target page blob. - * Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call getPageRangesDiffSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * Operation array to be executed. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker$1, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a$2 = options === null || options === void 0 ? void 0 : options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ - offset, - count - }), - marker: marker$1, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions - })); - }); - } + operations = []; /** - * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} - * - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param marker - A string value that identifies the portion of - * the get of page ranges to be returned with the next getting operation. The - * operation returns the ContinuationToken value within the response body if the - * getting operation did not return all page ranges remaining within the current page. - * The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of get - * items. The marker value is opaque to the client. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker$1, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker$1 || marker$1 === void 0) do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker$1, options)); - marker$1 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker$1); - }); - } + state = BatchStates.Good; /** - * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * A private emitter used to pass events inside this class. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a$2, e_2, _b$1, _c$1; - let marker$1; - try { - for (var _d$1 = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const getPageRangesSegment = _c$1; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); - } + emitter; /** - * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * - * Example using `for await` syntax: - * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` - * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns An asyncIterableIterator that supports paging. + * Creates an instance of Batch. + * @param concurrency - */ - listPageRangesDiff(offset, count, prevSnapshot, options = {}) { - options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - } - }; + constructor(concurrency = 5) { + if (concurrency < 1) throw new RangeError("concurrency must be larger than 0"); + this.concurrency = concurrency; + this.emitter = new events_1.EventEmitter(); } /** - * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * Add a operation into queue. * - * @param offset - Starting byte position of the page blob - * @param count - Number of bytes to get ranges diff. - * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - * @returns Response data for the Page Blob Get Page Range Diff operation. + * @param operation - */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl$1, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a$2; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl$1, - range: rangeToString({ - offset, - count - }), - tracingOptions: updatedOptions.tracingOptions - })); - return rangeResponseFromModel(response); + addOperation(operation) { + this.operations.push(async () => { + try { + this.actives++; + await operation(); + this.actives--; + this.completed++; + this.parallelExecute(); + } catch (error) { + this.emitter.emit("error", error); + } }); } /** - * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * Start execute operations in the queue. * - * @param size - Target size - * @param options - Options to the Page Blob Resize operation. - * @returns Response data for the Page Blob Resize operation. */ - async resize(size, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.pageBlobContext.resize(size, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions - })); + async do() { + if (this.operations.length === 0) return Promise.resolve(); + this.parallelExecute(); + return new Promise((resolve, reject) => { + this.emitter.on("finish", resolve); + this.emitter.on("error", (error) => { + this.state = BatchStates.Error; + reject(error); + }); }); } /** - * Sets a page blob's sequence number. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * Get next operation to be executed. Return null when reaching ends. * - * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. - * @param sequenceNumber - Required if sequenceNumberAction is max or update - * @param options - Options to the Page Blob Update Sequence Number operation. - * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction$1, sequenceNumber, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction$1, { - abortSignal: options.abortSignal, - blobSequenceNumber: sequenceNumber, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - }); + nextOperation() { + if (this.offset < this.operations.length) return this.operations[this.offset++]; + return null; } /** - * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. - * The snapshot is copied such that only the differential changes between the previously - * copied snapshot are transferred to the destination. - * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://learn.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * Start execute operations. One one the most important difference between + * this method with do() is that do() wraps as an sync method. * - * @param copySource - Specifies the name of the source page blob snapshot. For example, - * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param options - Options to the Page Blob Copy Incremental operation. - * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource$1, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a$2; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource$1, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), - tracingOptions: updatedOptions.tracingOptions - })); - }); + parallelExecute() { + if (this.state === BatchStates.Error) return; + if (this.completed >= this.operations.length) { + this.emitter.emit("finish"); + return; + } + while (this.actives < this.concurrency) { + const operation = this.nextOperation(); + if (operation) operation(); + else return; + } } }; - async function getBodyAsText(batchResponse) { - let buffer$2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer$2); - buffer$2 = buffer$2.slice(0, responseLength); - return buffer$2.toString(); + exports.Batch = Batch; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.fsCreateReadStream = exports.fsStat = void 0; + exports.streamToBuffer = streamToBuffer; + exports.streamToBuffer2 = streamToBuffer2; + exports.streamToBuffer3 = streamToBuffer3; + exports.readStreamToLocalFile = readStreamToLocalFile; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const node_fs_1 = tslib_1.__importDefault(__require("node:fs")); + const node_util_1 = tslib_1.__importDefault(__require("node:util")); + const constants_js_1 = require_constants$1(); + /** + * Reads a readable stream into buffer. Fill the buffer from offset to end. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param offset - From which position in the buffer to be filled, inclusive + * @param end - To which position in the buffer to be filled, exclusive + * @param encoding - Encoding of the Readable stream + */ + async function streamToBuffer(stream, buffer, offset, end, encoding) { + let pos = 0; + const count = end - offset; + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(/* @__PURE__ */ new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { + if (pos >= count) { + clearTimeout(timeout); + resolve(); + return; + } + let chunk = stream.read(); + if (!chunk) return; + if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); + const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + }); + stream.on("end", () => { + clearTimeout(timeout); + if (pos < count) reject(/* @__PURE__ */ new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); + resolve(); + }); + stream.on("error", (msg) => { + clearTimeout(timeout); + reject(msg); + }); + }); } - function utf8ByteLength(str) { - return Buffer.byteLength(str); + /** + * Reads a readable stream into buffer entirely. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param encoding - Encoding of the Readable stream + * @returns with the count of bytes read. + * @throws `RangeError` If buffer size is not big enough. + */ + async function streamToBuffer2(stream, buffer, encoding) { + let pos = 0; + const bufferSize = buffer.length; + return new Promise((resolve, reject) => { + stream.on("readable", () => { + let chunk = stream.read(); + if (!chunk) return; + if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); + if (pos + chunk.length > bufferSize) { + reject(/* @__PURE__ */ new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); + return; + } + buffer.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }); + stream.on("end", () => { + resolve(pos); + }); + stream.on("error", reject); + }); } - const HTTP_HEADER_DELIMITER = ": "; - const SPACE_DELIMITER = " "; - const NOT_FOUND = -1; /** - * Util class for parsing batch response. + * Reads a readable stream into a buffer. + * + * @param stream - A Node.js Readable stream + * @param encoding - Encoding of the Readable stream + * @returns with the count of bytes read. */ - var BatchResponseParser = class { - constructor(batchResponse, subRequests) { - if (!batchResponse || !batchResponse.contentType) throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); - if (!subRequests || subRequests.size === 0) throw new RangeError("Invalid state: subRequests is not provided or size is 0."); - this.batchResponse = batchResponse; - this.subRequests = subRequests; - this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; - this.batchResponseEnding = `--${this.responseBatchBoundary}--`; + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. + * + * @param rs - The read stream. + * @param file - Destination file path. + */ + async function readStreamToLocalFile(rs, file) { + return new Promise((resolve, reject) => { + const ws = node_fs_1.default.createWriteStream(file); + rs.on("error", (err) => { + reject(err); + }); + ws.on("error", (err) => { + reject(err); + }); + ws.on("close", resolve); + rs.pipe(ws); + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Promisified version of fs.stat(). + */ + exports.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports.fsCreateReadStream = node_fs_1.default.createReadStream; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PageBlobClient = exports.BlockBlobClient = exports.AppendBlobClient = exports.BlobClient = void 0; + const core_rest_pipeline_1 = require_commonjs$9(); + const core_auth_1 = require_commonjs$8(); + const core_util_1 = require_commonjs$11(); + const core_util_2 = require_commonjs$11(); + const BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + const BlobQueryResponse_js_1 = require_BlobQueryResponse(); + const storage_common_1 = require_commonjs$4(); + const models_js_1 = require_models(); + const PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + const Pipeline_js_1 = require_Pipeline(); + const BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + const Range_js_1 = require_Range(); + const StorageClient_js_1 = require_StorageClient(); + const Batch_js_1 = require_Batch(); + const storage_common_2 = require_commonjs$4(); + const constants_js_1 = require_constants$1(); + const tracing_js_1 = require_tracing(); + const utils_common_js_1 = require_utils_common$1(); + const utils_js_1 = require_utils(); + const BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + const BlobLeaseClient_js_1 = require_BlobLeaseClient(); + /** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + */ + var BlobClient = class BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; + /** + * The name of the blob. + */ + get name() { + return this._name; } - async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); - const responseBodyAsText = await getBodyAsText(this.batchResponse); - const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); - const subResponseCount = subResponses.length; - if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); - const deserializedSubResponses = new Array(subResponseCount); - let subResponsesSucceededCount = 0; - let subResponsesFailedCount = 0; - for (let index = 0; index < subResponseCount; index++) { - const subResponse = subResponses[index]; - const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); - let subRespHeaderStartFound = false; - let subRespHeaderEndFound = false; - let subRespFailed = false; - let contentId = NOT_FOUND; - for (const responseLine of responseLines) { - if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); - if (responseLine.startsWith(HTTP_VERSION_1_1)) { - subRespHeaderStartFound = true; - const tokens = responseLine.split(SPACE_DELIMITER); - deserializedSubResponse.status = parseInt(tokens[1]); - deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); - } - continue; - } - if (responseLine.trim() === "") { - if (!subRespHeaderEndFound) subRespHeaderEndFound = true; - continue; - } - if (!subRespHeaderEndFound) { - if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); - const tokens = responseLine.split(HTTP_HEADER_DELIMITER); - deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { - deserializedSubResponse.errorCode = tokens[1]; - subRespFailed = true; - } - } else { - if (!deserializedSubResponse.bodyAsText) deserializedSubResponse.bodyAsText = ""; - deserializedSubResponse.bodyAsText += responseLine; - } - } - if (contentId !== NOT_FOUND && Number.isInteger(contentId) && contentId >= 0 && contentId < this.subRequests.size && deserializedSubResponses[contentId] === void 0) { - deserializedSubResponse._request = this.subRequests.get(contentId); - deserializedSubResponses[contentId] = deserializedSubResponse; - } else logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); - if (subRespFailed) subResponsesFailedCount++; - else subResponsesSucceededCount++; - } - return { - subResponses: deserializedSubResponses, - subResponsesSucceededCount, - subResponsesFailedCount - }; + /** + * The name of the storage container the blob is associated with. + */ + get containerName() { + return this._containerName; + } + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + options = options || {}; + let pipeline; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof storage_common_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (core_util_1.isNodeLike) { + const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url, pipeline); + ({blobName: this._name, containerName: this._containerName} = this.getBlobAndContainerNamesFromUrl()); + this.blobContext = this.storageClientContext.blob; + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } - }; - var MutexLockStatus; - (function(MutexLockStatus$1) { - MutexLockStatus$1[MutexLockStatus$1["LOCKED"] = 0] = "LOCKED"; - MutexLockStatus$1[MutexLockStatus$1["UNLOCKED"] = 1] = "UNLOCKED"; - })(MutexLockStatus || (MutexLockStatus = {})); - /** - * An async mutex lock. - */ - var Mutex = class { /** - * Lock for a specific key. If the lock has been acquired by another customer, then - * will wait until getting the lock. + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. * - * @param key - lock key + * @param snapshot - The snapshot timestamp. + * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - static async lock(key) { - return new Promise((resolve) => { - if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { - this.keys[key] = MutexLockStatus.LOCKED; - resolve(); - } else this.onUnlockEvent(key, () => { - this.keys[key] = MutexLockStatus.LOCKED; - resolve(); - }); - }); + withSnapshot(snapshot) { + return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** - * Unlock a key. + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. * - * @param key - + * @param versionId - The versionId. + * @returns A new BlobClient object pointing to the version of this blob. */ - static async unlock(key) { - return new Promise((resolve) => { - if (this.keys[key] === MutexLockStatus.LOCKED) this.emitUnlockEvent(key); - delete this.keys[key]; - resolve(); - }); - } - static onUnlockEvent(key, handler) { - if (this.listeners[key] === void 0) this.listeners[key] = [handler]; - else this.listeners[key].push(handler); - } - static emitUnlockEvent(key) { - if (this.listeners[key] !== void 0 && this.listeners[key].length > 0) { - const handler = this.listeners[key].shift(); - setImmediate(() => { - handler.call(this); - }); - } - } - }; - Mutex.keys = {}; - Mutex.listeners = {}; - /** - * A BlobBatch represents an aggregated set of operations on blobs. - * Currently, only `delete` and `setAccessTier` are supported. - */ - var BlobBatch = class { - constructor() { - this.batch = "batch"; - this.batchRequest = new InnerBatchRequest(); + withVersion(versionId) { + return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** - * Get the value of Content-Type for a batch request. - * The value must be multipart/mixed with a batch boundary. - * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + * Creates a AppendBlobClient object. + * */ - getMultiPartContentType() { - return this.batchRequest.getMultipartContentType(); + getAppendBlobClient() { + return new AppendBlobClient(this.url, this.pipeline); } /** - * Get assembled HTTP request body for sub requests. + * Creates a BlockBlobClient object. + * */ - getHttpRequestBody() { - return this.batchRequest.getHttpRequestBody(); + getBlockBlobClient() { + return new BlockBlobClient(this.url, this.pipeline); } /** - * Get sub requests that are added into the batch request. + * Creates a PageBlobClient object. + * */ - getSubRequests() { - return this.batchRequest.getSubRequests(); - } - async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); - try { - this.batchRequest.preAddSubRequest(subRequest); - await assembleSubRequestFunc(); - this.batchRequest.postAddSubRequest(subRequest); - } finally { - await Mutex.unlock(this.batch); - } - } - setBatchType(batchType) { - if (!this.batchType) this.batchType = batchType; - if (this.batchType !== batchType) throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); + getPageBlobClient() { + return new PageBlobClient(this.url, this.pipeline); } - async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url$1; - let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url$1 = urlOrBlobClient; - credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url$1 = urlOrBlobClient.url; - credential = urlOrBlobClient.credential; - options = credentialOrOptions; - } else throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); - if (!options) options = {}; - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { - this.setBatchType("delete"); - await this.addSubRequestInternal({ - url: url$1, - credential - }, async () => { - await new BlobClient(url$1, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob + * + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Optional options to Blob Download operation. + * + * + * Example usage (Node.js): + * + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); + * } + * ``` + * + * Example usage (browser): + * + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * ``` + */ + async download(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + requestOptions: { onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress }, + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ + offset, + count + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedRes = { + ...res, + _response: res._response, + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) return wrappedRes; + if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + if (res.contentLength === void 0) throw new RangeError(`File download response doesn't contain valid content length header`); + if (!res.etag) throw new RangeError(`File download response doesn't contain valid etag header`); + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { + const updatedDownloadOptions = { + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ifMatch: options.conditions.ifMatch || res.etag, + ifModifiedSince: options.conditions.ifModifiedSince, + ifNoneMatch: options.conditions.ifNoneMatch, + ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ + count: offset + res.contentLength - start, + offset: start + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey + }; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; + }, offset, res.contentLength, { + maxRetryRequests: options.maxRetryRequests, + onProgress: options.onProgress }); }); } - async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url$1; - let credential; - let tier$1; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url$1 = urlOrBlobClient; - credential = credentialOrTier; - tier$1 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url$1 = urlOrBlobClient.url; - credential = urlOrBlobClient.credential; - tier$1 = credentialOrTier; - options = tierOrOptions; - } else throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); - if (!options) options = {}; - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { - this.setBatchType("setAccessTier"); - await this.addSubRequestInternal({ - url: url$1, - credential - }, async () => { - await new BlobClient(url$1, this.batchRequest.createPipeline(credential)).setAccessTier(tier$1, updatedOptions); - }); + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param options - options to Exists operation. + */ + async exists(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + try { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + await this.getProperties({ + abortSignal: options.abortSignal, + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + }); + return true; + } catch (e) { + if (e.statusCode === 404) return false; + else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) return true; + throw e; + } }); } - }; - /** - * Inner batch request class which is responsible for assembling and serializing sub requests. - * See https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled. - */ - var InnerBatchRequest = class { - constructor() { - this.operationCount = 0; - this.body = ""; - const tempGuid = coreUtil.randomUUID(); - this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; - this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; - this.batchRequestEnding = `--${this.boundary}--`; - this.subRequests = new Map(); - } /** - * Create pipeline to assemble sub requests. The idea here is to use existing - * credential and serialization/deserialization components, with additional policies to - * filter unnecessary headers, assemble sub requests into request's body - * and intercept request from going to wire. - * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Optional options to Get Properties operation. */ - createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, - serializerOptions: { xml: { xmlCharKey: "#" } } - }), { phase: "Serialize" }); - corePipeline.addPolicy(batchHeaderFilterPolicy()); - corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } - }), { phase: "Sign" }); - else if (credential instanceof StorageSharedKeyCredential) corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ - accountName: credential.accountName, - accountKey: credential.accountKey - }), { phase: "Sign" }); - const pipeline = new Pipeline([]); - pipeline._credential = credential; - pipeline._corePipeline = corePipeline; - return pipeline; - } - appendSubRequestToBody(request) { - this.body += [ - this.subRequestPrefix, - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, - "", - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` - ].join(HTTP_LINE_ENDING); - for (const [name, value] of request.headers) this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; - this.body += HTTP_LINE_ENDING; - } - preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); - const path$13 = getURLPath(subRequest.url); - if (!path$13 || path$13 === "") throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); - } - postAddSubRequest(subRequest) { - this.subRequests.set(this.operationCount, subRequest); - this.operationCount++; - } - getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; - } - getMultipartContentType() { - return this.multipartContentType; - } - getSubRequests() { - return this.subRequests; - } - }; - function batchRequestAssemblePolicy(batchRequest) { - return { - name: "batchRequestAssemblePolicy", - async sendRequest(request) { - batchRequest.appendSubRequestToBody(request); + async getProperties(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + })); return { - request, - status: 200, - headers: coreRestPipeline.createHttpHeaders() + ...res, + _response: res._response, + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) }; - } - }; - } - function batchHeaderFilterPolicy() { - return { - name: "batchHeaderFilterPolicy", - async sendRequest(request, next) { - let xMsHeaderName = ""; - for (const [name] of request.headers) if (iEqual(name, HeaderConstants.X_MS_VERSION)) xMsHeaderName = name; - if (xMsHeaderName !== "") request.headers.delete(xMsHeaderName); - return next(request); - } - }; - } - /** - * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - */ - var BlobBatchClient = class { - constructor(url$1, credentialOrPipeline, options) { - let pipeline; - if (isPipelineLike(credentialOrPipeline)) pipeline = credentialOrPipeline; - else if (!credentialOrPipeline) pipeline = newPipeline(new AnonymousCredential(), options); - else pipeline = newPipeline(credentialOrPipeline, options); - const storageClientContext = new StorageContextClient(url$1, getCoreClientOptions(pipeline)); - const path$13 = getURLPath(url$1); - if (path$13 && path$13 !== "/") this.serviceOrContainerContext = storageClientContext.container; - else this.serviceOrContainerContext = storageClientContext.service; + }); } /** - * Creates a {@link BlobBatch}. - * A BlobBatch represents an aggregated set of operations on blobs. + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob + * + * @param options - Optional options to Blob Delete operation. */ - createBatch() { - return new BlobBatch(); - } - async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); - for (const urlOrBlobClient of urlsOrBlobClients) if (typeof urlOrBlobClient === "string") await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); - else await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); - return this.submitBatch(batch); - } - async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); - for (const urlOrBlobClient of urlsOrBlobClients) if (typeof urlOrBlobClient === "string") await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); - else await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); - return this.submitBatch(batch); + async delete(options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ + abortSignal: options.abortSignal, + deleteSnapshots: options.deleteSnapshots, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Submit batch request which consists of multiple subrequests. - * - * Get `blobBatchClient` and other details before running the snippets. - * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` - * - * Example usage: - * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" - * }); - * const batchResp = await blobBatchClient.submitBatch(batchRequest); - * console.log(batchResp.subResponsesSucceededCount); - * ``` - * - * Example using a lease: - * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } - * }); - * const batchResp = await blobBatchClient.submitBatch(batchRequest); - * console.log(batchResp.subResponsesSucceededCount); - * ``` - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * - * @param batchRequest - A set of Delete or SetTier operations. - * @param options - + * @param options - Optional options to Blob Delete operation. */ - async submitBatch(batchRequest, options = {}) { - if (!batchRequest || batchRequest.getSubRequests().size === 0) throw new RangeError("Batch request should contain one or more sub requests."); - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { - const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); - const responseSummary = await batchResponseParser.parseBatchResponse(); - const res = { - _response: rawBatchResponse._response, - contentType: rawBatchResponse.contentType, - errorCode: rawBatchResponse.errorCode, - requestId: rawBatchResponse.requestId, - clientRequestId: rawBatchResponse.clientRequestId, - version: rawBatchResponse.version, - subResponses: responseSummary.subResponses, - subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, - subResponsesFailedCount: responseSummary.subResponsesFailedCount - }; - return res; + async deleteIfExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { + try { + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + }; + } catch (e) { + if (e.details?.errorCode === "BlobNotFound") return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; + throw e; + } }); } - }; - /** - * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. - */ - var ContainerClient = class extends StorageClient { /** - * The name of the container. + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob + * + * @param options - Optional options to Blob Undelete operation. */ - get containerName() { - return this._containerName; - } - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { - let pipeline; - let url$1; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url$1 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url$1 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); - } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { - const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url$1 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); - if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - pipeline = newPipeline(sharedKeyCredential, options); - } else throw new Error("Account connection string is only supported in Node.js environment"); - else if (extractedCreds.kind === "SASConnString") { - url$1 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } else throw new Error("Expecting non-empty strings for containerName parameter"); - super(url$1, pipeline); - this._containerName = this.getContainerNameFromUrl(); - this.containerContext = this.storageClientContext.container; + async undelete(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Creates a new container under the specified account. If the container with - * the same name already exists, the operation fails. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * Sets system properties on the blob. * - * @param options - Options to Container Create operation. + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * + * @param blobHTTPHeaders - If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * A common header to set is `blobContentType` + * enabling the browser to provide functionality + * based on file type. + * @param options - Optional options to Blob Set HTTP Headers operation. + */ + async setHTTPHeaders(blobHTTPHeaders, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ + abortSignal: options.abortSignal, + blobHttpHeaders: blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. * - * Example usage: + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); - * const createContainerResponse = await containerClient.create(); - * console.log("Container was created successfully", createContainerResponse.requestId); - * ``` + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Optional options to Set Metadata operation. */ - async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + async setMetadata(metadata, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** - * Creates a new container under the specified account. If the container with - * the same name already exists, it is not changed. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). * + * @param tags - * @param options - */ - async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a$2, _b$1; - try { - const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } catch (e) { - if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "ContainerAlreadyExists") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); - else throw e; - } + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + blobModifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + tags: (0, utils_common_js_1.toBlobTags)(tags) + })); }); } /** - * Returns true if the Azure container resource represented by this client exists; false otherwise. - * - * NOTE: use this function with care since an existing container might be deleted by other clients or - * applications. Vice versa new containers with the same name might be added by other clients or - * applications after this function completes. + * Gets the tags associated with the underlying blob. * * @param options - */ - async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { - try { - await this.getProperties({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions - }); - return true; - } catch (e) { - if (e.statusCode === 404) return false; - throw e; - } + async getTags(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + blobModifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + ...response, + _response: response._response, + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; }); } /** - * Creates a {@link BlobClient} + * Get a {@link BlobLeaseClient} that manages leases on the blob. * - * @param blobName - A blob name - * @returns A new BlobClient object for the given blob name. + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the blob. */ - getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** - * Creates an {@link AppendBlobClient} + * Creates a read-only snapshot of a blob. + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * - * @param blobName - An append blob name + * @param options - Optional options to the Blob Create Snapshot operation. */ - getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + async createSnapshot(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Creates a {@link BlockBlobClient} + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. * - * @param blobName - A block blob name + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * Example usage: + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * ```js - * const content = "Hello world!"; + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * const blockBlobClient = containerClient.getBlockBlobClient(""); - * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); - * ``` - */ - getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Creates a {@link PageBlobClient} + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); * - * @param blobName - A page blob name - */ - getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Returns all user-defined metadata and system properties for the specified - * container. The data returned does not include the container's list of blobs. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); + * } + * const manualResult = manualCopyPoller.getResult(); * - * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if - * they originally contained uppercase characters. This differs from the metadata keys returned by - * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which - * will retain their original casing. + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * }, + * }); + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * @param options - Options to Container Get Properties operation. + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress + * }); + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); + * + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); + * // cancel operation after starting it. + * try { + * await cancelCopyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); + * } + * } + * ``` + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. */ - async getProperties(options = {}) { - if (!options.conditions) options.conditions = {}; - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + async beginCopyFromURL(copySource, options = {}) { + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ + blobClient: { + abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), + getProperties: (...args) => this.getProperties(...args), + startCopyFromURL: (...args) => this.startCopyFromURL(...args) + }, + copySource, + intervalInMs: options.intervalInMs, + onProgress: options.onProgress, + resumeFrom: options.resumeFrom, + startCopyFromURLOptions: options }); + await poller.poll(); + return poller; } /** - * Marks the specified container for deletion. The container and any blobs - * contained within it are later deleted during garbage collection. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * - * @param options - Options to Container Delete operation. + * @param copyId - Id of the Copy From URL operation. + * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async delete(options = {}) { - if (!options.conditions) options.conditions = {}; - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); }); } /** - * Marks the specified container for deletion if it exists. The container and any blobs - * contained within it are later deleted during garbage collection. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container - * - * @param options - Options to Container Delete operation. - */ - async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a$2, _b$1; - try { - const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } catch (e) { - if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "ContainerNotFound") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); - throw e; - } - }); - } - /** - * Sets one or more user-defined name-value pairs for the specified container. - * - * If no option provided, or no metadata defined in the parameter, the container - * metadata will be removed. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * - * @param metadata - Replace existing metadata with this value. - * If no value provided the existing metadata will be removed. - * @param options - Options to Container Set Metadata operation. + * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param options - */ - async setMetadata(metadata$1, options = {}) { - if (!options.conditions) options.conditions = {}; - if (options.conditions.ifUnmodifiedSince) throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + async syncCopyFromURL(copySource, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, + metadata: options.metadata, leaseAccessConditions: options.conditions, - metadata: metadata$1, - modifiedAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + sourceContentMD5: options.sourceContentMD5, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + encryptionScope: options.encryptionScope, + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** - * Gets the permissions for the specified container. The permissions indicate - * whether container data may be accessed publicly. - * - * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. - * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * - * @param options - Options to Container Get Access Policy operation. + * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param options - Optional options to the Blob Set Tier operation. */ - async getAccessPolicy(options = {}) { - if (!options.conditions) options.conditions = {}; - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); - const res = { - _response: response._response, - blobPublicAccess: response.blobPublicAccess, - date: response.date, - etag: response.etag, - errorCode: response.errorCode, - lastModified: response.lastModified, - requestId: response.requestId, - clientRequestId: response.clientRequestId, - signedIdentifiers: [], - version: response.version - }; - for (const identifier of response) { - let accessPolicy = void 0; - if (identifier.accessPolicy) { - accessPolicy = { permissions: identifier.accessPolicy.permissions }; - if (identifier.accessPolicy.expiresOn) accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); - if (identifier.accessPolicy.startsOn) accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); - } - res.signedIdentifiers.push({ - accessPolicy, - id: identifier.id + }); + } + async downloadToBuffer(param1, param2, param3, param4 = {}) { + let buffer; + let offset = 0; + let count = 0; + let options = param4; + if (param1 instanceof Buffer) { + buffer = param1; + offset = param2 || 0; + count = typeof param3 === "number" ? param3 : 0; + } else { + offset = typeof param1 === "number" ? param1 : 0; + count = typeof param2 === "number" ? param2 : 0; + options = param3 || {}; + } + let blockSize = options.blockSize ?? 0; + if (blockSize < 0) throw new RangeError("blockSize option must be >= 0"); + if (blockSize === 0) blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + if (offset < 0) throw new RangeError("offset option must be >= 0"); + if (count && count <= 0) throw new RangeError("count option must be greater than 0"); + if (!options.conditions) options.conditions = {}; + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + if (!count) { + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions }); + count = response.contentLength - offset; + if (count < 0) throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } - return res; + if (!buffer) try { + buffer = Buffer.alloc(count); + } catch (error) { + throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`); + } + if (buffer.length < count) throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); + let transferProgress = 0; + const batch = new Batch_js_1.Batch(options.concurrency); + for (let off = offset; off < offset + count; off = off + blockSize) batch.addOperation(async () => { + let chunkEnd = offset + count; + if (off + blockSize < chunkEnd) chunkEnd = off + blockSize; + const stream = (await this.download(off, chunkEnd - off, { + abortSignal: options.abortSignal, + conditions: options.conditions, + maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + })).readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); + transferProgress += chunkEnd - off; + if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); + }); + await batch.do(); + return buffer; }); } /** - * Sets the permissions for the specified container. The permissions indicate - * whether blobs in a container may be accessed publicly. - * - * When you set permissions for a container, the existing permissions are replaced. - * If no access or containerAcl provided, the existing container ACL will be - * removed. + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. - * During this interval, a shared access signature that is associated with the stored access policy will - * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. * - * @param access - The level of public access to data in the container. - * @param containerAcl - Array of elements each having a unique Id and details of the access policy. - * @param options - Options to Container Set Access Policy operation. + * @param filePath - + * @param offset - From which position of the block blob to download. + * @param count - How much data to be downloaded. Will download to the end when passing undefined. + * @param options - Options to Blob download options. + * @returns The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. */ - async setAccessPolicy(access$1, containerAcl$1, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { - const acl = []; - for (const identifier of containerAcl$1 || []) acl.push({ - accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", - permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" - }, - id: identifier.id + async downloadToFile(filePath, offset = 0, count, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions }); - return assertResponse(await this.containerContext.setAccessPolicy({ + if (response.readableStreamBody) await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); + response.blobDownloadStream = void 0; + return response; + }); + } + getBlobAndContainerNamesFromUrl() { + let containerName; + let blobName; + try { + const parsedUrl = new URL(this.url); + if (parsedUrl.host.split(".")[1] === "blob") { + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { + const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); + containerName = pathComponents[2]; + blobName = pathComponents[4]; + } else { + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + containerName = decodeURIComponent(containerName); + blobName = decodeURIComponent(blobName); + blobName = blobName.replace(/\\/g, "/"); + if (!containerName) throw new Error("Provided containerName is invalid."); + return { + blobName, + containerName + }; + } catch (error) { + throw new Error("Unable to extract blobName and containerName with provided information."); + } + } + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. + */ + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, - access: access$1, - containerAcl: acl, leaseAccessConditions: options.conditions, - modifiedAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions.tagConditions + }, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + rehydratePriority: options.rehydratePriority, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); }); } /** - * Get a {@link BlobLeaseClient} that manages leases on the container. + * Only available for BlobClient constructed with a shared key credential. * - * @param proposeLeaseId - Initial proposed lease Id. - * @returns A new BlobLeaseClient object for managing leases on the container. + * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } /** - * Creates a new block blob, or updates the content of an existing block blob. + * Only available for BlobClient constructed with a shared key credential. * - * Updating an existing block blob overwrites any existing metadata on the blob. - * Partial updates are not supported; the content of the existing blob is - * overwritten with the new content. To perform a partial update of a block blob's, - * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, - * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better - * performance with concurrency uploading. + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasStringToSign(options) { + if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** * - * @param blobName - Name of the block blob to create or update. - * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function - * which returns a new Readable stream whose offset is from data source beginning. - * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a - * string including non non-Base64/Hex-encoded characters. - * @param options - Options to configure the Block Blob Upload operation. - * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - async uploadBlockBlob(blobName, body$1, contentLength$1, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { - const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body$1, contentLength$1, updatedOptions); - return { - blockBlobClient, - response - }; + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** - * Marks the specified blob or snapshot for deletion. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob + * Only available for BlobClient constructed with a shared key credential. * - * @param blobName - - * @param options - Options to Blob Delete operation. - * @returns Block blob deletion response data. + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { - let blobClient = this.getBlobClient(blobName); - if (options.versionId) blobClient = blobClient.withVersion(options.versionId); - return blobClient.delete(updatedOptions); - }); + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** - * listBlobFlatSegment returns a single segment of blobs starting from the - * specified Marker. Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call listBlobsFlatSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * Delete the immutablility policy on the blob. * - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to Container List Blob Flat Segment operation. + * @param options - Optional options to delete immutability policy on the blob. */ - async listBlobFlatSegment(marker$1, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker$1 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { - _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), - segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { - name: BlobNameToString(blobItemInternal.name), - tags: toTags(blobItemInternal.blobTags), - objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) - }); - return blobItem; - }) }) - }); - return wrappedResponse; + async deleteImmutabilityPolicy(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); } /** - * listBlobHierarchySegment returns a single segment of blobs starting from - * the specified Marker. Use an empty Marker to start enumeration from the - * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment - * again (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * Set immutability policy on the blob. * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to Container List Blob Hierarchy Segment operation. + * @param options - Optional options to set immutability policy on the blob. */ - async listBlobHierarchySegment(delimiter$1, marker$1, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a$2; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter$1, Object.assign(Object.assign({ marker: marker$1 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { - _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), - segment: Object.assign(Object.assign({}, response.segment), { - blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { - name: BlobNameToString(blobItemInternal.name), - tags: toTags(blobItemInternal.blobTags), - objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) - }); - return blobItem; - }), - blobPrefixes: (_a$2 = response.segment.blobPrefixes) === null || _a$2 === void 0 ? void 0 : _a$2.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) - }) - }); - return wrappedResponse; + async setImmutabilityPolicy(immutabilityPolicy, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ + immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, + immutabilityPolicyMode: immutabilityPolicy.policyMode, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** - * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * Set legal hold on the blob. * - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the ContinuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list blobs operation. + * @param options - Optional options to set legal hold on the blob. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker$1, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker$1 || marker$1 === void 0) do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker$1, options)); - marker$1 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker$1); + async setLegalHold(legalHoldEnabled, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); } /** - * Returns an AsyncIterableIterator of {@link BlobItem} objects + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * - * @param options - Options to list blobs operation. + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a$2, e_1, _b$1, _c$1; - let marker$1; - try { - for (var _d$1 = true, _e = tslib.__asyncValues(this.listSegments(marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const listBlobsFlatSegmentResponse = _c$1; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); }); } + }; + exports.BlobClient = BlobClient; + /** + * AppendBlobClient defines a set of operations applicable to append blobs. + */ + var AppendBlobClient = class AppendBlobClient extends BlobClient { /** - * Returns an async iterable iterator to list all the blobs - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. - * - * Example using `for await` syntax: - * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` - * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * ``` + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof storage_common_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (core_util_1.isNodeLike) { + const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url, pipeline); + this.appendBlobContext = this.storageClientContext.appendBlob; + } + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. * - * Example using paging with a marker: + * @param snapshot - The snapshot timestamp. + * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot) { + return new AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); + } + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; + * @param options - Options to the Append Block Create operation. * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } * - * // Gets next marker - * let marker = response.continuationToken; + * Example usage: * - * // Passing next marker as continuationToken + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * - * @param options - Options to list blobs. - * @returns An asyncIterableIterator that supports paging. + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); + * await appendBlobClient.create(); + * ``` */ - listBlobsFlat(options = {}) { - const include$1 = []; - if (options.includeCopy) include$1.push("copy"); - if (options.includeDeleted) include$1.push("deleted"); - if (options.includeMetadata) include$1.push("metadata"); - if (options.includeSnapshots) include$1.push("snapshots"); - if (options.includeVersions) include$1.push("versions"); - if (options.includeUncommitedBlobs) include$1.push("uncommittedblobs"); - if (options.includeTags) include$1.push("tags"); - if (options.includeDeletedWithVersions) include$1.push("deletedwithversions"); - if (options.includeImmutabilityPolicy) include$1.push("immutabilitypolicy"); - if (options.includeLegalHold) include$1.push("legalhold"); - if (options.prefix === "") options.prefix = void 0; - const updatedOptions = Object.assign(Object.assign({}, options), include$1.length > 0 ? { include: include$1 } : {}); - const iter = this.listItems(updatedOptions); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - } - }; + async create(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the ContinuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list blobs operation. + * @param options - */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter$1, marker$1, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker$1 || marker$1 === void 0) do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter$1, marker$1, options)); - marker$1 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker$1); + async createIfNotExists(options = {}) { + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { + try { + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + }; + } catch (e) { + if (e.details?.errorCode === "BlobAlreadyExists") return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; + throw e; + } }); } /** - * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * Seals the append blob, making it read only. * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param options - Options to list blobs operation. + * @param options - */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter$1, options = {}) { - var _a$2, e_2, _b$1, _c$1; - let marker$1; - try { - for (var _d$1 = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter$1, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const listBlobsHierarchySegmentResponse = _c$1; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) for (const prefix$1 of segment.blobPrefixes) yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix$1)); - for (const blob of segment.blobItems) yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } + async seal(options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** - * Returns an async iterable iterator to list all the blobs by hierarchy. - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. - * - * Example using `for await` syntax: - * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * Commits a new block of data to the end of the existing append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * - * Example using `iter.next()`: + * @param body - Data to be appended. + * @param contentLength - Length of the body in bytes. + * @param options - Options to the Append Block operation. * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` * - * Example using `byPage()`: + * Example usage: * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * Example using paging with a max page size: + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * - * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const content = "Hello World!"; * - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); * - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); + * await existingAppendBlobClient.appendBlock(content, content.length); * ``` - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter$1, options = {}) { - if (delimiter$1 === "") throw new RangeError("delimiter should contain one or more characters"); - const include$1 = []; - if (options.includeCopy) include$1.push("copy"); - if (options.includeDeleted) include$1.push("deleted"); - if (options.includeMetadata) include$1.push("metadata"); - if (options.includeSnapshots) include$1.push("snapshots"); - if (options.includeVersions) include$1.push("versions"); - if (options.includeUncommitedBlobs) include$1.push("uncommittedblobs"); - if (options.includeTags) include$1.push("tags"); - if (options.includeDeletedWithVersions) include$1.push("deletedwithversions"); - if (options.includeImmutabilityPolicy) include$1.push("immutabilitypolicy"); - if (options.includeLegalHold) include$1.push("legalhold"); - if (options.prefix === "") options.prefix = void 0; - const updatedOptions = Object.assign(Object.assign({}, options), include$1.length > 0 ? { include: include$1 } : {}); - const iter = this.listItemsByHierarchy(delimiter$1, updatedOptions); - return { - async next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter$1, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - } - }; + async appendBlock(body, contentLength, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + requestOptions: { onUploadProgress: options.onProgress }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * The Filter Blobs operation enables callers to list blobs in the container whose tags - * match a given search expression. + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. + * @param sourceURL - + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param sourceOffset - Offset in source to be appended + * @param count - Number of bytes to be appended as a block + * @param options - */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - where: tagFilterSqlExpression, - marker: marker$1, - maxPageSize: options.maxPageSize, + sourceRange: (0, Range_js_1.rangeToString)({ + offset: sourceOffset, + count + }), + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + appendPositionAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { - _response: response._response, - blobs: response.blobs.map((blob) => { - var _a$2; - let tagValue = ""; - if (((_a$2 = blob.tags) === null || _a$2 === void 0 ? void 0 : _a$2.blobTagSet.length) === 1) tagValue = blob.tags.blobTagSet[0].value; - return Object.assign(Object.assign({}, blob), { - tags: toTags(blob.tags), - tagValue - }); - }) - }); - return wrappedResponse; }); } + }; + exports.AppendBlobClient = AppendBlobClient; + /** + * BlockBlobClient defines a set of operations applicable to block blobs. + */ + var BlockBlobClient = class BlockBlobClient extends BlobClient { /** - * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. + * blobContext provided by protocol layer. * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker$1, options = {}) { - let response; - if (!!marker$1 || marker$1 === void 0) do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options)); - response.blobs = response.blobs || []; - marker$1 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker$1); - }); + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof storage_common_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (core_util_1.isNodeLike) { + const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url, pipeline); + this.blockBlobContext = this.storageClientContext.blockBlob; + this._blobContext = this.storageClientContext.blob; } /** - * Returns an AsyncIterableIterator for blobs. + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to findBlobsByTagsItems. + * @param snapshot - The snapshot timestamp. + * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a$2, e_3, _b$1, _c$1; - let marker$1; - try { - for (var _d$1 = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const segment = _c$1; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + withSnapshot(snapshot) { + return new BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** - * Returns an async iterable iterator to find all blobs with specified tag - * under the specified container. + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * .byPage() returns an async iterable iterator to list the blobs in pages. + * Quick query for a JSON or CSV formatted blob. * - * Example using `for await` syntax: + * Example usage (Node.js): * - * ```js - * let i = 1; - * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * Example using `iter.next()`: + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * ```js - * let i = 1; - * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); * - * Example using `byPage()`: + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { + * return new Promise((resolve, reject) => { + * const chunks: Buffer[] = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); * } * ``` * - * Example using paging with a marker: + * @param query - + * @param options - + */ + async query(query, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) throw new Error("This operation currently is only supported in Node.js."); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ + abortSignal: options.abortSignal, + queryRequest: { + queryType: "SQL", + expression: query, + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) + }, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + })); + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { + abortSignal: options.abortSignal, + onProgress: options.onProgress, + onError: options.onError + }); + }); + } + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. * - * ```js - * let i = 1; - * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * - * // Prints 2 blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to the Block Blob Upload operation. + * @returns Response data for the Block Blob Upload operation. * - * // Gets next marker - * let marker = response.continuationToken; - * // Passing next marker as continuationToken - * iterator = containerClient - * .findBlobsByTags("tagkey='tagvalue'") - * .byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; + * Example usage: * - * // Prints blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` + */ + async upload(body, contentLength, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + requestOptions: { onUploadProgress: options.onProgress }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Creates a new Block Blob where the contents of the blob are read from a given URL. + * This API is supported beginning with the 2020-04-08 version. Partial updates + * are not supported with Put Blob from URL; the content of an existing blob is overwritten with + * the content of the new blob. To perform partial updates to a block blob’s contents using a + * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to find blobs by tags. + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Optional parameters. */ - findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); - const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - } - }; + async syncUploadFromURL(sourceURL, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block + * + * @param blockId - A 64-byte value that is base64-encoded + * @param body - Data to upload to the staging area. + * @param contentLength - Number of bytes to upload. + * @param options - Options to the Block Blob Stage Block operation. + * @returns Response data for the Block Blob Stage Block operation. + */ + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + requestOptions: { onUploadProgress: options.onProgress }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url + * + * @param blockId - A 64-byte value that is base64-encoded + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Options to the Block Blob Stage Block From URL operation. + * @returns Response data for the Block Blob Stage Block From URL operation. + */ + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ + offset, + count + }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list + * + * @param blocks - Array of 64-byte value that is base64-encoded + * @param options - Options to the Block Blob Commit Block List operation. + * @returns Response data for the Block Blob Commit Block List operation. + */ + async commitBlockList(blocks, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. + * @param listType - Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param options - Options to the Block Blob Get Block List operation. + * @returns Response data for the Block Blob Get Block List operation. */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); + if (!res.committedBlocks) res.committedBlocks = []; + if (!res.uncommittedBlocks) res.uncommittedBlocks = []; + return res; }); } - getContainerNameFromUrl() { - let containerName; - try { - const parsedUrl = new URL(this.url); - if (parsedUrl.hostname.split(".")[1] === "blob") containerName = parsedUrl.pathname.split("/")[1]; - else if (isIpEndpointStyle(parsedUrl)) containerName = parsedUrl.pathname.split("/")[2]; - else containerName = parsedUrl.pathname.split("/")[1]; - containerName = decodeURIComponent(containerName); - if (!containerName) throw new Error("Provided containerName is invalid."); - return containerName; - } catch (error) { - throw new Error("Unable to extract containerName with provided information."); - } - } /** - * Only available for ContainerClient constructed with a shared key credential. + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. * - * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param options - */ - generateSasUrl(options) { - return new Promise((resolve) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); + async uploadData(data, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; + if (data instanceof Buffer) buffer = data; + else if (data instanceof ArrayBuffer) buffer = Buffer.from(data); + else { + data = data; + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); + } else { + const browserBlob = new Blob([data]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); + } }); } /** - * Only available for ContainerClient constructed with a shared key credential. + * ONLY AVAILABLE IN BROWSERS. * - * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI - * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; - } - /** - * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the input user delegation key. + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @deprecated Use {@link uploadData} instead. * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView + * @param options - Options to upload browser data. + * @returns Response data for the Blob Upload operation. */ - generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); + async uploadBrowserData(browserData, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + const browserBlob = new Blob([browserData]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); } /** - * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI - * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasStringToSign(options, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).stringToSign; - } - /** - * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. * - * @returns A new BlobBatchClient object for this container. - */ - getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); - } - }; - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the - * values are set, this should be serialized with toString and set as the permissions field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ - var AccountSASPermissions = class AccountSASPermissions { - constructor() { - /** - * Permission to read resources and list queues and tables granted. - */ - this.read = false; - /** - * Permission to write resources granted. - */ - this.write = false; - /** - * Permission to delete blobs and files granted. - */ - this.delete = false; - /** - * Permission to delete versions granted. - */ - this.deleteVersion = false; - /** - * Permission to list blob containers, blobs, shares, directories, and files granted. - */ - this.list = false; - /** - * Permission to add messages, table entities, and append to blobs granted. - */ - this.add = false; - /** - * Permission to create blobs and files granted. - */ - this.create = false; - /** - * Permissions to update messages and table entities granted. - */ - this.update = false; - /** - * Permission to get and delete messages granted. - */ - this.process = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Permission to filter blobs. - */ - this.filter = false; - /** - * Permission to set immutability policy. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - } - /** - * Parse initializes the AccountSASPermissions fields from a string. + * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. * - * @param permissions - + * @param bodyFactory - + * @param size - size of the data to upload. + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. */ - static parse(permissions) { - const accountSASPermissions = new AccountSASPermissions(); - for (const c of permissions) switch (c) { - case "r": - accountSASPermissions.read = true; - break; - case "w": - accountSASPermissions.write = true; - break; - case "d": - accountSASPermissions.delete = true; - break; - case "x": - accountSASPermissions.deleteVersion = true; - break; - case "l": - accountSASPermissions.list = true; - break; - case "a": - accountSASPermissions.add = true; - break; - case "c": - accountSASPermissions.create = true; - break; - case "u": - accountSASPermissions.update = true; - break; - case "p": - accountSASPermissions.process = true; - break; - case "t": - accountSASPermissions.tag = true; - break; - case "f": - accountSASPermissions.filter = true; - break; - case "i": - accountSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - accountSASPermissions.permanentDelete = true; - break; - default: throw new RangeError(`Invalid permission character: ${c}`); + async uploadSeekableInternal(bodyFactory, size, options = {}) { + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + if (blockSize === 0) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) throw new RangeError(`${size} is too larger to upload to a block blob.`); + if (size > maxSingleShotSize) { + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } } - return accountSASPermissions; - } - /** - * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const accountSASPermissions = new AccountSASPermissions(); - if (permissionLike.read) accountSASPermissions.read = true; - if (permissionLike.write) accountSASPermissions.write = true; - if (permissionLike.delete) accountSASPermissions.delete = true; - if (permissionLike.deleteVersion) accountSASPermissions.deleteVersion = true; - if (permissionLike.filter) accountSASPermissions.filter = true; - if (permissionLike.tag) accountSASPermissions.tag = true; - if (permissionLike.list) accountSASPermissions.list = true; - if (permissionLike.add) accountSASPermissions.add = true; - if (permissionLike.create) accountSASPermissions.create = true; - if (permissionLike.update) accountSASPermissions.update = true; - if (permissionLike.process) accountSASPermissions.process = true; - if (permissionLike.setImmutabilityPolicy) accountSASPermissions.setImmutabilityPolicy = true; - if (permissionLike.permanentDelete) accountSASPermissions.permanentDelete = true; - return accountSASPermissions; + if (!options.blobHTTPHeaders) options.blobHTTPHeaders = {}; + if (!options.conditions) options.conditions = {}; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + if (size <= maxSingleShotSize) return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); + const numBlocks = Math.floor((size - 1) / blockSize) + 1; + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); + const blockList = []; + const blockIDPrefix = (0, core_util_2.randomUUID)(); + let transferProgress = 0; + const batch = new Batch_js_1.Batch(options.concurrency); + for (let i = 0; i < numBlocks; i++) batch.addOperation(async () => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); + const start = blockSize * i; + const contentLength = (i === numBlocks - 1 ? size : start + blockSize) - start; + blockList.push(blockID); + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { + abortSignal: options.abortSignal, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + }); + transferProgress += contentLength; + if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); + }); + await batch.do(); + return this.commitBlockList(blockList, updatedOptions); + }); } /** - * Produces the SAS permissions string for an Azure Storage account. - * Call this method to set AccountSASSignatureValues Permissions field. - * - * Using this method will guarantee the resource types are in - * an order accepted by the service. + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * Uploads a local file in blocks to a block blob. * - */ - toString() { - const permissions = []; - if (this.read) permissions.push("r"); - if (this.write) permissions.push("w"); - if (this.delete) permissions.push("d"); - if (this.deleteVersion) permissions.push("x"); - if (this.filter) permissions.push("f"); - if (this.tag) permissions.push("t"); - if (this.list) permissions.push("l"); - if (this.add) permissions.push("a"); - if (this.create) permissions.push("c"); - if (this.update) permissions.push("u"); - if (this.process) permissions.push("p"); - if (this.setImmutabilityPolicy) permissions.push("i"); - if (this.permanentDelete) permissions.push("y"); - return permissions.join(""); - } - }; - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the - * values are set, this should be serialized with toString and set as the resources field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but - * the order of the resources is particular and this class guarantees correctness. - */ - var AccountSASResourceTypes = class AccountSASResourceTypes { - constructor() { - /** - * Permission to access service level APIs granted. - */ - this.service = false; - /** - * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. - */ - this.container = false; - /** - * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. - */ - this.object = false; - } - /** - * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an - * Error if it encounters a character that does not correspond to a valid resource type. + * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. * - * @param resourceTypes - + * @param filePath - Full path of local file + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. */ - static parse(resourceTypes) { - const accountSASResourceTypes = new AccountSASResourceTypes(); - for (const c of resourceTypes) switch (c) { - case "s": - accountSASResourceTypes.service = true; - break; - case "c": - accountSASResourceTypes.container = true; - break; - case "o": - accountSASResourceTypes.object = true; - break; - default: throw new RangeError(`Invalid resource type: ${c}`); - } - return accountSASResourceTypes; + async uploadFile(filePath, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; + return this.uploadSeekableInternal((offset, count) => { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { + autoClose: true, + end: count ? offset + count - 1 : Infinity, + start: offset + }); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); + }); } /** - * Converts the given resource types to a string. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - */ - toString() { - const resourceTypes = []; - if (this.service) resourceTypes.push("s"); - if (this.container) resourceTypes.push("c"); - if (this.object) resourceTypes.push("o"); - return resourceTypes.join(""); - } - }; - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant access to that service. Once all the - * values are set, this should be serialized with toString and set as the services field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but - * the order of the services is particular and this class guarantees correctness. - */ - var AccountSASServices = class AccountSASServices { - constructor() { - /** - * Permission to access blob resources granted. - */ - this.blob = false; - /** - * Permission to access file resources granted. - */ - this.file = false; - /** - * Permission to access queue resources granted. - */ - this.queue = false; - /** - * Permission to access table resources granted. - */ - this.table = false; - } - /** - * Creates an {@link AccountSASServices} from the specified services string. This method will throw an - * Error if it encounters a character that does not correspond to a valid service. + * Uploads a Node.js Readable stream into block blob. * - * @param services - - */ - static parse(services) { - const accountSASServices = new AccountSASServices(); - for (const c of services) switch (c) { - case "b": - accountSASServices.blob = true; - break; - case "f": - accountSASServices.file = true; - break; - case "q": - accountSASServices.queue = true; - break; - case "t": - accountSASServices.table = true; - break; - default: throw new RangeError(`Invalid service character: ${c}`); - } - return accountSASServices; - } - /** - * Converts the given services to a string. + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. * + * @param stream - Node.js Readable stream + * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param options - Options to Upload Stream to Block Blob operation. + * @returns Response data for the Blob Upload operation. */ - toString() { - const services = []; - if (this.blob) services.push("b"); - if (this.table) services.push("t"); - if (this.queue) services.push("q"); - if (this.file) services.push("f"); - return services.join(""); + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + if (!options.blobHTTPHeaders) options.blobHTTPHeaders = {}; + if (!options.conditions) options.conditions = {}; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + let blockNum = 0; + const blockIDPrefix = (0, core_util_2.randomUUID)(); + let transferProgress = 0; + const blockList = []; + await new storage_common_2.BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); + blockList.push(blockID); + blockNum++; + await this.stageBlock(blockID, body, length, { + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + }); + transferProgress += length; + if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); + }, Math.ceil(maxConcurrency / 4 * 3)).do(); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + }); } }; + exports.BlockBlobClient = BlockBlobClient; /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual - * REST request. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - * - * @param accountSASSignatureValues - - * @param sharedKeyCredential - - */ - function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { - return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; - } - function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version$1 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version$1 < "2020-08-04") throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version$1 < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version$1 < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); - if (accountSASSignatureValues.encryptionScope && version$1 < "2020-12-06") throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); - let stringToSign; - if (version$1 >= "2020-12-06") stringToSign = [ - sharedKeyCredential.accountName, - parsedPermissions, - parsedServices, - parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", - accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version$1, - accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", - "" - ].join("\n"); - else stringToSign = [ - sharedKeyCredential.accountName, - parsedPermissions, - parsedServices, - parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", - accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version$1, - "" - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(version$1, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), - stringToSign - }; - } - /** - * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you - * to manipulate blob containers. + * PageBlobClient defines a set of operations applicable to page blobs. */ - var BlobServiceClient = class BlobServiceClient extends StorageClient { + var PageBlobClient = class PageBlobClient extends BlobClient { /** - * - * Creates an instance of BlobServiceClient from connection string. - * - * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. - * [ Note - Account connection string can only be used in NODE.JS runtime. ] - * Account connection string example - - * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` - * SAS connection string example - - * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` - * @param options - Optional. Options to configure the HTTP pipeline. + * pageBlobsContext provided by protocol layer. */ - static fromConnectionString(connectionString, options) { - options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); - if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - const pipeline = newPipeline(sharedKeyCredential, options); - return new BlobServiceClient(extractedCreds.url, pipeline); - } else throw new Error("Account connection string is only supported in Node.js environment"); - else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); - return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); - } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - constructor(url$1, credentialOrPipeline, options) { + pageBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) pipeline = credentialOrPipeline; - else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) pipeline = newPipeline(credentialOrPipeline, options); - else pipeline = newPipeline(new AnonymousCredential(), options); - super(url$1, pipeline); - this.serviceContext = this.storageClientContext.service; - } - /** - * Creates a {@link ContainerClient} object - * - * @param containerName - A container name - * @returns A new ContainerClient object for the given container name. - * - * Example usage: - * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); - * ``` - */ - getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); - } - /** - * Create a Blob container. @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * - * @param containerName - Name of the container to create. - * @param options - Options to configure Container Create operation. - * @returns Container creation response and the corresponding container client. - */ - async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(containerName); - const containerCreateResponse = await containerClient.create(updatedOptions); - return { - containerClient, - containerCreateResponse - }; - }); + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof storage_common_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (core_util_1.isNodeLike) { + const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url, pipeline); + this.pageBlobContext = this.storageClientContext.pageBlob; } /** - * Deletes a Blob container. + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. * - * @param containerName - Name of the container to delete. - * @param options - Options to configure Container Delete operation. - * @returns Container deletion response. + * @param snapshot - The snapshot timestamp. + * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(containerName); - return containerClient.delete(updatedOptions); - }); + withSnapshot(snapshot) { + return new PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** - * Restore a previously deleted Blob container. - * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * - * @param deletedContainerName - Name of the previously deleted container. - * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. - * @param options - Options to configure Container Restore operation. - * @returns Container deletion response. + * @param size - size of the page blob. + * @param options - Options to the Page Blob Create operation. + * @returns Response data for the Page Blob Create operation. */ - async undeleteContainer(deletedContainerName$1, deletedContainerVersion$1, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName$1); - const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName$1, - deletedContainerVersion: deletedContainerVersion$1, + async create(size, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + blobSequenceNumber: options.blobSequenceNumber, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); - return { - containerClient, - containerUndeleteResponse - }; }); } /** - * Rename an existing Blob Container. + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. + * @param size - size of the page blob. + * @param options - */ - async renameContainer(sourceContainerName$1, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a$2; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName$1, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a$2 = options.sourceCondition) === null || _a$2 === void 0 ? void 0 : _a$2.leaseId }))); - return { - containerClient, - containerRenameResponse - }; + async createIfNotExists(size, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { + try { + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + }; + } catch (e) { + if (e.details?.errorCode === "BlobAlreadyExists") return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; + throw e; + } }); } /** - * Gets the properties of a storage account’s Blob service, including properties - * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * - * @param options - Options to the Service Get Properties operation. - * @returns Response data for the Service Get Properties operation. + * @param body - Data to upload + * @param offset - Offset of destination page blob + * @param count - Content length of the body, also number of bytes to be uploaded + * @param options - Options to the Page Blob Upload Pages operation. + * @returns Response data for the Page Blob Upload Pages operation. */ - async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + async uploadPages(body, offset, count, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + requestOptions: { onUploadProgress: options.onProgress }, + range: (0, Range_js_1.rangeToString)({ + offset, + count + }), + sequenceNumberAccessConditions: options.conditions, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** - * Sets properties for a storage account’s Blob service endpoint, including properties - * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * - * @param properties - - * @param options - Options to the Service Set Properties operation. - * @returns Response data for the Service Set Properties operation. + * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param destOffset - Offset of destination page blob + * @param count - Number of bytes to be uploaded from source page blob + * @param options - */ - async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ + offset: sourceOffset, + count + }), 0, (0, Range_js_1.rangeToString)({ + offset: destOffset, + count + }), { abortSignal: options.abortSignal, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + sequenceNumberAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** - * Retrieves statistics related to replication for the Blob service. It is only - * available on the secondary location endpoint when read-access geo-redundant - * replication is enabled for the storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * Frees the specified pages from the page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * - * @param options - Options to the Service Get Statistics operation. - * @returns Response data for the Service Get Statistics operation. + * @param offset - Starting byte position of the pages to clear. + * @param count - Number of bytes to clear. + * @param options - Options to the Page Blob Clear Pages operation. + * @returns Response data for the Page Blob Clear Pages operation. */ - async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + async clearPages(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ + offset, + count + }), + sequenceNumberAccessConditions: options.conditions, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns Response data for the Page Blob Get Ranges operation. */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + async getPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ + offset, + count + }), tracingOptions: updatedOptions.tracingOptions })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** - * Returns a list of the containers under the specified account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2 - * - * @param marker - A string value that identifies the portion of - * the list of containers to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all containers remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to the Service List Container Segment operation. - * @returns Response data for the Service List Container Segment operation. - */ - async listContainersSegment(marker$1, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ - abortSignal: options.abortSignal, - marker: marker$1 - }, options), { - include: typeof options.include === "string" ? [options.include] : options.include, - tracingOptions: updatedOptions.tracingOptions - }))); - }); - } - /** - * The Filter Blobs operation enables callers to list blobs across all containers whose tags - * match a given search expression. Filter blobs searches across all containers within a - * storage account but can be scoped within the expression to a single container. + * getPageRangesSegment returns a single segment of page ranges starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, - where: tagFilterSqlExpression, - marker: marker$1, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ + offset, + count + }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { - _response: response._response, - blobs: response.blobs.map((blob) => { - var _a$2; - let tagValue = ""; - if (((_a$2 = blob.tags) === null || _a$2 === void 0 ? void 0 : _a$2.blobTagSet.length) === 1) tagValue = blob.tags.blobTagSet[0].value; - return Object.assign(Object.assign({}, blob), { - tags: toTags(blob.tags), - tagValue - }); - }) - }); - return wrappedResponse; }); } /** - * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. + * @param options - Options to List Page Ranges operation. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker$1, options = {}) { - let response; - if (!!marker$1 || marker$1 === void 0) do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options)); - response.blobs = response.blobs || []; - marker$1 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker$1); - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); } /** - * Returns an AsyncIterableIterator for blobs. + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to findBlobsByTagsItems. + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to List Page Ranges operation. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a$2, e_1, _b$1, _c$1; - let marker$1; - try { - for (var _d$1 = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const segment = _c$1; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); } /** - * Returns an async iterable iterator to find all blobs with specified tag - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. + * Returns an async iterable iterator to list of page ranges for a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * let i = 1; - * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); * - * ```js + * // Example using `for await` syntax * let i = 1; - * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * for await (const pageRange of pageBlobClient.listPageRanges()) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `byPage()`: + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken - * iterator = blobServiceClient - * .findBlobsByTags("tagkey='tagvalue'") - * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to find blobs by tags. + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns An asyncIterableIterator that supports paging. */ - findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); - const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + listPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + const iter = this.listPageRangeItems(offset, count, options); return { next() { return iter.next(); @@ -35434,142 +35449,198 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return this; }, byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** - * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * - * @param marker - A string value that identifies the portion of - * the list of containers to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all containers remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list containers operation. + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker$1, options = {}) { - let listContainersSegmentResponse; - if (!!marker$1 || marker$1 === void 0) do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker$1, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker$1 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker$1); + async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevsnapshot: prevSnapshot, + range: (0, Range_js_1.rangeToString)({ + offset, + count + }), + tracingOptions: updatedOptions.tracingOptions + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** - * Returns an AsyncIterableIterator for Container Items + * getPageRangesDiffSegment returns a single segment of page ranges starting from the + * specified Marker for difference between previous snapshot and the target page blob. + * Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesDiffSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * - * @param options - Options to list containers operation. + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a$2, e_2, _b$1, _c$1; - let marker$1; - try { - for (var _d$1 = true, _e = tslib.__asyncValues(this.listSegments(marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const segment = _c$1; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, + prevsnapshot: prevSnapshotOrUrl, + range: (0, Range_js_1.rangeToString)({ + offset, + count + }), + marker, + maxPageSize: options?.maxPageSize, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** - * Returns an async iterable iterator to list all the containers - * under the specified account. + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} * - * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get + * items. The marker value is opaque to the client. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } + /** + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects * - * ```js - * let i = 1; - * for await (const container of blobServiceClient.listContainers()) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * ``` + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } + /** + * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); * - * ```js + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `byPage()`: + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * - * // Prints 2 container names - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken - * iterator = blobServiceClient - * .listContainers() + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints 10 container names - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * @param options - Options to list containers. + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Ranges operation. * @returns An asyncIterableIterator that supports paging. */ - listContainers(options = {}) { - if (options.prefix === "") options.prefix = void 0; - const include$1 = []; - if (options.includeDeleted) include$1.push("deleted"); - if (options.includeMetadata) include$1.push("metadata"); - if (options.includeSystem) include$1.push("system"); - const listSegmentOptions = Object.assign(Object.assign({}, options), include$1.length > 0 ? { include: include$1 } : {}); - const iter = this.listItems(listSegmentOptions); + listPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { ...options }); return { next() { return iter.next(); @@ -35578,6776 +35649,8069 @@ var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27. return this; }, byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** - * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using - * bearer token authentication. + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. + */ + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ + offset, + count + }), + tracingOptions: updatedOptions.tracingOptions + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); + }); + } + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param size - Target size + * @param options - Options to the Page Blob Resize operation. + * @returns Response data for the Page Blob Resize operation. + */ + async resize(size, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets a page blob's sequence number. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. + * @param sequenceNumber - Required if sequenceNumberAction is max or update + * @param options - Options to the Page Blob Update Sequence Number operation. + * @returns Response data for the Page Blob Update Sequence Number operation. + */ + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { + abortSignal: options.abortSignal, + blobSequenceNumber: sequenceNumber, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * - * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time - * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time + * @param copySource - Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Options to the Page Blob Copy Incremental operation. + * @returns Response data for the Page Blob Copy Incremental operation. */ - async getUserDelegationKey(startsOn, expiresOn$1, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn$1, false) - }, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const userDelegationKey = { - signedObjectId: response.signedObjectId, - signedTenantId: response.signedTenantId, - signedStartsOn: new Date(response.signedStartsOn), - signedExpiresOn: new Date(response.signedExpiresOn), - signedService: response.signedService, - signedVersion: response.signedVersion, - value: response.value - }; - const res = Object.assign({ - _response: response._response, - requestId: response.requestId, - clientRequestId: response.clientRequestId, - version: response.version, - date: response.date, - errorCode: response.errorCode - }, userDelegationKey); - return res; }); } - /** - * Creates a BlobBatchClient object to conduct batch operations. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - * - * @returns A new BlobBatchClient object for this service. - */ - getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + }; + exports.PageBlobClient = PageBlobClient; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getBodyAsText = getBodyAsText; + exports.utf8ByteLength = utf8ByteLength; + const utils_js_1 = require_utils(); + const constants_js_1 = require_constants$1(); + async function getBodyAsText(batchResponse) { + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); + } + function utf8ByteLength(str) { + return Buffer.byteLength(str); + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BatchResponseParser = void 0; + const core_rest_pipeline_1 = require_commonjs$9(); + const core_http_compat_1 = require_commonjs$6(); + const constants_js_1 = require_constants$1(); + const BatchUtils_js_1 = require_BatchUtils(); + const log_js_1 = require_log$1(); + const HTTP_HEADER_DELIMITER = ": "; + const SPACE_DELIMITER = " "; + const NOT_FOUND = -1; + /** + * Util class for parsing batch response. + */ + var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; + constructor(batchResponse, subRequests) { + if (!batchResponse || !batchResponse.contentType) throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); + if (!subRequests || subRequests.size === 0) throw new RangeError("Invalid state: subRequests is not provided or size is 0."); + this.batchResponse = batchResponse; + this.subRequests = subRequests; + this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; + this.batchResponseEnding = `--${this.responseBatchBoundary}--`; + } + async parseBatchResponse() { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); + const subResponses = (await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse)).split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); + const subResponseCount = subResponses.length; + if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); + const deserializedSubResponses = new Array(subResponseCount); + let subResponsesSucceededCount = 0; + let subResponsesFailedCount = 0; + for (let index = 0; index < subResponseCount; index++) { + const subResponse = subResponses[index]; + const deserializedSubResponse = {}; + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); + let subRespHeaderStartFound = false; + let subRespHeaderEndFound = false; + let subRespFailed = false; + let contentId = NOT_FOUND; + for (const responseLine of responseLines) { + if (!subRespHeaderStartFound) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { + subRespHeaderStartFound = true; + const tokens = responseLine.split(SPACE_DELIMITER); + deserializedSubResponse.status = parseInt(tokens[1]); + deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); + } + continue; + } + if (responseLine.trim() === "") { + if (!subRespHeaderEndFound) subRespHeaderEndFound = true; + continue; + } + if (!subRespHeaderEndFound) { + if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); + const tokens = responseLine.split(HTTP_HEADER_DELIMITER); + deserializedSubResponse.headers.set(tokens[0], tokens[1]); + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { + deserializedSubResponse.errorCode = tokens[1]; + subRespFailed = true; + } + } else { + if (!deserializedSubResponse.bodyAsText) deserializedSubResponse.bodyAsText = ""; + deserializedSubResponse.bodyAsText += responseLine; + } + } + if (contentId !== NOT_FOUND && Number.isInteger(contentId) && contentId >= 0 && contentId < this.subRequests.size && deserializedSubResponses[contentId] === void 0) { + deserializedSubResponse._request = this.subRequests.get(contentId); + deserializedSubResponses[contentId] = deserializedSubResponse; + } else log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + if (subRespFailed) subResponsesFailedCount++; + else subResponsesSucceededCount++; + } + return { + subResponses: deserializedSubResponses, + subResponsesSucceededCount, + subResponsesFailedCount + }; } + }; + exports.BatchResponseParser = BatchResponseParser; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Mutex = void 0; + var MutexLockStatus; + (function(MutexLockStatus) { + MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED"; + MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED"; + })(MutexLockStatus || (MutexLockStatus = {})); + /** + * An async mutex lock. + */ + var Mutex = class { /** - * Only available for BlobServiceClient constructed with a shared key credential. - * - * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * Lock for a specific key. If the lock has been acquired by another customer, then + * will wait until getting the lock. * - * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. - * @param permissions - Specifies the list of permissions to be associated with the SAS. - * @param resourceTypes - Specifies the resource types associated with the shared access signature. - * @param options - Optional parameters. - * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + * @param key - lock key */ - generateAccountSasUrl(expiresOn$1, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); - if (expiresOn$1 === void 0) { - const now = new Date(); - expiresOn$1 = new Date(now.getTime() + 3600 * 1e3); - } - const sas = generateAccountSASQueryParameters(Object.assign({ - permissions, - expiresOn: expiresOn$1, - resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + static async lock(key) { + return new Promise((resolve) => { + if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + } else this.onUnlockEvent(key, () => { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + }); + }); } /** - * Only available for BlobServiceClient constructed with a shared key credential. - * - * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * Unlock a key. * - * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. - * @param permissions - Specifies the list of permissions to be associated with the SAS. - * @param resourceTypes - Specifies the resource types associated with the shared access signature. - * @param options - Optional parameters. - * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + * @param key - */ - generateSasStringToSign(expiresOn$1, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); - if (expiresOn$1 === void 0) { - const now = new Date(); - expiresOn$1 = new Date(now.getTime() + 3600 * 1e3); + static async unlock(key) { + return new Promise((resolve) => { + if (this.keys[key] === MutexLockStatus.LOCKED) this.emitUnlockEvent(key); + delete this.keys[key]; + resolve(); + }); + } + static keys = {}; + static listeners = {}; + static onUnlockEvent(key, handler) { + if (this.listeners[key] === void 0) this.listeners[key] = [handler]; + else this.listeners[key].push(handler); + } + static emitUnlockEvent(key) { + if (this.listeners[key] !== void 0 && this.listeners[key].length > 0) { + const handler = this.listeners[key].shift(); + setImmediate(() => { + handler.call(this); + }); } - return generateAccountSASQueryParametersInternal(Object.assign({ - permissions, - expiresOn: expiresOn$1, - resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; } }; - /** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ - exports.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports.KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports.AccountSASPermissions = AccountSASPermissions; - exports.AccountSASResourceTypes = AccountSASResourceTypes; - exports.AccountSASServices = AccountSASServices; - exports.AnonymousCredential = AnonymousCredential; - exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports.AppendBlobClient = AppendBlobClient; - exports.BaseRequestPolicy = BaseRequestPolicy; - exports.BlobBatch = BlobBatch; - exports.BlobBatchClient = BlobBatchClient; - exports.BlobClient = BlobClient; - exports.BlobLeaseClient = BlobLeaseClient; - exports.BlobSASPermissions = BlobSASPermissions; - exports.BlobServiceClient = BlobServiceClient; - exports.BlockBlobClient = BlockBlobClient; - exports.ContainerClient = ContainerClient; - exports.ContainerSASPermissions = ContainerSASPermissions; - exports.Credential = Credential; - exports.CredentialPolicy = CredentialPolicy; - exports.PageBlobClient = PageBlobClient; - exports.Pipeline = Pipeline; - exports.SASQueryParameters = SASQueryParameters; - exports.StorageBrowserPolicy = StorageBrowserPolicy; - exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports.StorageOAuthScopes = StorageOAuthScopes; - exports.StorageRetryPolicy = StorageRetryPolicy; - exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports.isPipelineLike = isPipelineLike; - exports.logger = logger; - exports.newPipeline = newPipeline; -} }); + exports.Mutex = Mutex; +})); //#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/errors.js -var require_errors = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/errors.js"(exports) { +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.CacheNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0; - var FilesNotFoundError = class extends Error { - constructor(files = []) { - let message = "No files were found to upload"; - if (files.length > 0) message += `: ${files.join(", ")}`; - super(message); - this.files = files; - this.name = "FilesNotFoundError"; + exports.BlobBatch = void 0; + const core_util_1 = require_commonjs$11(); + const core_auth_1 = require_commonjs$8(); + const core_rest_pipeline_1 = require_commonjs$9(); + const core_util_2 = require_commonjs$11(); + const storage_common_1 = require_commonjs$4(); + const Clients_js_1 = require_Clients(); + const Mutex_js_1 = require_Mutex(); + const Pipeline_js_1 = require_Pipeline(); + const utils_common_js_1 = require_utils_common$1(); + const core_xml_1 = require_commonjs$5(); + const constants_js_1 = require_constants$1(); + const tracing_js_1 = require_tracing(); + const core_client_1 = require_commonjs$7(); + /** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + */ + var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; + constructor() { + this.batchRequest = new InnerBatchRequest(); } - }; - exports.FilesNotFoundError = FilesNotFoundError; - var InvalidResponseError = class extends Error { - constructor(message) { - super(message); - this.name = "InvalidResponseError"; + /** + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + */ + getMultiPartContentType() { + return this.batchRequest.getMultipartContentType(); } - }; - exports.InvalidResponseError = InvalidResponseError; - var CacheNotFoundError = class extends Error { - constructor(message = "Cache not found") { - super(message); - this.name = "CacheNotFoundError"; + /** + * Get assembled HTTP request body for sub requests. + */ + getHttpRequestBody() { + return this.batchRequest.getHttpRequestBody(); } - }; - exports.CacheNotFoundError = CacheNotFoundError; - var GHESNotSupportedError = class extends Error { - constructor(message = "@actions/cache v4.1.4+, actions/cache/save@v4+ and actions/cache/restore@v4+ are not currently supported on GHES.") { - super(message); - this.name = "GHESNotSupportedError"; + /** + * Get sub requests that are added into the batch request. + */ + getSubRequests() { + return this.batchRequest.getSubRequests(); } - }; - exports.GHESNotSupportedError = GHESNotSupportedError; - var NetworkError = class extends Error { - constructor(code) { - const message = `Unable to make request: ${code}\nIf you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`; - super(message); - this.code = code; - this.name = "NetworkError"; + async addSubRequestInternal(subRequest, assembleSubRequestFunc) { + await Mutex_js_1.Mutex.lock(this.batch); + try { + this.batchRequest.preAddSubRequest(subRequest); + await assembleSubRequestFunc(); + this.batchRequest.postAddSubRequest(subRequest); + } finally { + await Mutex_js_1.Mutex.unlock(this.batch); + } + } + setBatchType(batchType) { + if (!this.batchType) this.batchType = batchType; + if (this.batchType !== batchType) throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); + } + async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { + let url; + let credential; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof storage_common_1.StorageSharedKeyCredential || credentialOrOptions instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; + credential = credentialOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + options = credentialOrOptions; + } else throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + if (!options) options = {}; + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("delete"); + await this.addSubRequestInternal({ + url, + credential + }, async () => { + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + }); + }); + } + async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { + let url; + let credential; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof storage_common_1.StorageSharedKeyCredential || credentialOrTier instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; + credential = credentialOrTier; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + tier = credentialOrTier; + options = tierOrOptions; + } else throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + if (!options) options = {}; + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("setAccessTier"); + await this.addSubRequestInternal({ + url, + credential + }, async () => { + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); + }); + }); } }; - exports.NetworkError = NetworkError; - NetworkError.isNetworkErrorCode = (code) => { - if (!code) return false; - return [ - "ECONNRESET", - "ENOTFOUND", - "ETIMEDOUT", - "ECONNREFUSED", - "EHOSTUNREACH" - ].includes(code); - }; - var UsageError = class extends Error { + exports.BlobBatch = BlobBatch; + /** + * Inner batch request class which is responsible for assembling and serializing sub requests. + * See https://learn.microsoft.com/rest/api/storageservices/blob-batch#request-body for how requests are assembled. + */ + var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { - const message = `Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; - super(message); - this.name = "UsageError"; + this.operationCount = 0; + this.body = ""; + this.boundary = `batch_${(0, core_util_1.randomUUID)()}`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; + this.batchRequestEnding = `--${this.boundary}--`; + this.subRequests = /* @__PURE__ */ new Map(); + } + /** + * Create pipeline to assemble sub requests. The idea here is to use existing + * credential and serialization/deserialization components, with additional policies to + * filter unnecessary headers, assemble sub requests into request's body + * and intercept request from going to wire. + * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + createPipeline(credential) { + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { xml: { xmlCharKey: "#" } } + }), { phase: "Serialize" }); + corePipeline.addPolicy(batchHeaderFilterPolicy()); + corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); + if ((0, core_auth_1.isTokenCredential)(credential)) corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential, + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } + }), { phase: "Sign" }); + else if (credential instanceof storage_common_1.StorageSharedKeyCredential) corePipeline.addPolicy((0, storage_common_1.storageSharedKeyCredentialPolicy)({ + accountName: credential.accountName, + accountKey: credential.accountKey + }), { phase: "Sign" }); + const pipeline = new Pipeline_js_1.Pipeline([]); + pipeline._credential = credential; + pipeline._corePipeline = corePipeline; + return pipeline; + } + appendSubRequestToBody(request) { + this.body += [ + this.subRequestPrefix, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + "", + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` + ].join(constants_js_1.HTTP_LINE_ENDING); + for (const [name, value] of request.headers) this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; + this.body += constants_js_1.HTTP_LINE_ENDING; + } + preAddSubRequest(subRequest) { + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); + const path = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path || path === "") throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); + } + postAddSubRequest(subRequest) { + this.subRequests.set(this.operationCount, subRequest); + this.operationCount++; + } + getHttpRequestBody() { + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; + } + getMultipartContentType() { + return this.multipartContentType; + } + getSubRequests() { + return this.subRequests; } }; - exports.UsageError = UsageError; - UsageError.isUsageErrorMessage = (msg) => { - if (!msg) return false; - return msg.includes("insufficient usage"); - }; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/uploadUtils.js -var require_uploadUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports) { - var __createBinding$13 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; + function batchRequestAssemblePolicy(batchRequest) { + return { + name: "batchRequestAssemblePolicy", + async sendRequest(request) { + batchRequest.appendSubRequestToBody(request); + return { + request, + status: 200, + headers: (0, core_rest_pipeline_1.createHttpHeaders)() + }; } }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$13 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$13 = exports && exports.__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$13(result, mod, k); + } + function batchHeaderFilterPolicy() { + return { + name: "batchHeaderFilterPolicy", + async sendRequest(request, next) { + let xMsHeaderName = ""; + for (const [name] of request.headers) if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) xMsHeaderName = name; + if (xMsHeaderName !== "") request.headers.delete(xMsHeaderName); + return next(request); + } + }; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobBatchClient = void 0; + const BatchResponseParser_js_1 = require_BatchResponseParser(); + const BatchUtils_js_1 = require_BatchUtils(); + const BlobBatch_js_1 = require_BlobBatch(); + const tracing_js_1 = require_tracing(); + const storage_common_1 = require_commonjs$4(); + const StorageContextClient_js_1 = require_StorageContextClient(); + const Pipeline_js_1 = require_Pipeline(); + const utils_common_js_1 = require_utils_common$1(); + /** + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + */ + var BlobBatchClient = class { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { + let pipeline; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) pipeline = credentialOrPipeline; + else if (!credentialOrPipeline) pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + else pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path = (0, utils_common_js_1.getURLPath)(url); + if (path && path !== "/") this.serviceOrContainerContext = storageClientContext.container; + else this.serviceOrContainerContext = storageClientContext.service; } - __setModuleDefault$13(result, mod); - return result; - }; - var __awaiter$14 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + /** + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. + */ + createBatch() { + return new BlobBatch_js_1.BlobBatch(); + } + async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { + const batch = new BlobBatch_js_1.BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) if (typeof urlOrBlobClient === "string") await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); + else await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); + return this.submitBatch(batch); + } + async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { + const batch = new BlobBatch_js_1.BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) if (typeof urlOrBlobClient === "string") await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); + else await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); + return this.submitBatch(batch); + } + /** + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @param batchRequest - A set of Delete or SetTier operations. + * @param options - + */ + async submitBatch(batchRequest, options = {}) { + if (!batchRequest || batchRequest.getSubRequests().size === 0) throw new RangeError("Batch request should contain one or more sub requests."); + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + const batchRequestBody = batchRequest.getHttpRequestBody(); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { ...updatedOptions })); + const responseSummary = await new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()).parseBatchResponse(); + return { + _response: rawBatchResponse._response, + contentType: rawBatchResponse.contentType, + errorCode: rawBatchResponse.errorCode, + requestId: rawBatchResponse.requestId, + clientRequestId: rawBatchResponse.clientRequestId, + version: rawBatchResponse.version, + subResponses: responseSummary.subResponses, + subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, + subResponsesFailedCount: responseSummary.subResponsesFailedCount + }; + }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); }; + exports.BlobBatchClient = BlobBatchClient; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.uploadCacheArchiveSDK = exports.UploadProgress = void 0; - const core$8 = __importStar$13(require_core()); - const storage_blob_1$1 = require_dist$1(); - const errors_1$1 = require_errors(); + exports.ContainerClient = void 0; + const core_rest_pipeline_1 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); + const core_auth_1 = require_commonjs$8(); + const storage_common_1 = require_commonjs$4(); + const Pipeline_js_1 = require_Pipeline(); + const StorageClient_js_1 = require_StorageClient(); + const tracing_js_1 = require_tracing(); + const utils_common_js_1 = require_utils_common$1(); + const BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + const BlobLeaseClient_js_1 = require_BlobLeaseClient(); + const Clients_js_1 = require_Clients(); + const BlobBatchClient_js_1 = require_BlobBatchClient(); /** - * Class for tracking the upload state and displaying stats. + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. */ - var UploadProgress = class { - constructor(contentLength$1) { - this.contentLength = contentLength$1; - this.sentBytes = 0; - this.displayedComplete = false; - this.startTime = Date.now(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; + /** + * The name of the container. + */ + get containerName() { + return this._containerName; + } + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof storage_common_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { + const containerName = credentialOrPipelineOrContainerName; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (core_util_1.isNodeLike) { + const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); + if (!options.proxyOptions) options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName parameter"); + super(url, pipeline); + this._containerName = this.getContainerNameFromUrl(); + this.containerContext = this.storageClientContext.container; } /** - * Sets the number of bytes sent + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://learn.microsoft.com/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * - * @param sentBytes the number of bytes sent + * @param options - Options to Container Create operation. + * + * + * Example usage: + * + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` */ - setSentBytes(sentBytes) { - this.sentBytes = sentBytes; + async create(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); + }); } /** - * Returns the total number of bytes transferred. + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://learn.microsoft.com/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * + * @param options - */ - getTransferredBytes() { - return this.sentBytes; + async createIfNotExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { + try { + const res = await this.create(updatedOptions); + return { + succeeded: true, + ...res, + _response: res._response + }; + } catch (e) { + if (e.details?.errorCode === "ContainerAlreadyExists") return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; + else throw e; + } + }); } /** - * Returns true if the upload is complete. + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param options - */ - isDone() { - return this.getTransferredBytes() === this.contentLength; + async exists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + try { + await this.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + }); + return true; + } catch (e) { + if (e.statusCode === 404) return false; + throw e; + } + }); } /** - * Prints the current upload stats. Once the upload completes, this will print one - * last line and then stop. + * Creates a {@link BlobClient} + * + * @param blobName - A blob name + * @returns A new BlobClient object for the given blob name. */ - display() { - if (this.displayedComplete) return; - const transferredBytes = this.sentBytes; - const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); - const elapsedTime = Date.now() - this.startTime; - const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core$8.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); - if (this.isDone()) this.displayedComplete = true; + getBlobClient(blobName) { + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** - * Returns a function used to handle TransferProgressEvents. + * Creates an {@link AppendBlobClient} + * + * @param blobName - An append blob name */ - onProgress() { - return (progress) => { - this.setSentBytes(progress.loadedBytes); - }; + getAppendBlobClient(blobName) { + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** - * Starts the timer that displays the stats. + * Creates a {@link BlockBlobClient} * - * @param delayInMs the delay between each write + * @param blobName - A block blob name + * + * + * Example usage: + * + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` */ - startDisplayTimer(delayInMs = 1e3) { - const displayCallback = () => { - this.display(); - if (!this.isDone()) this.timeoutHandle = setTimeout(displayCallback, delayInMs); - }; - this.timeoutHandle = setTimeout(displayCallback, delayInMs); + getBlockBlobClient(blobName) { + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** - * Stops the timer that displays the stats. As this typically indicates the upload - * is complete, this will display one last line, unless the last line has already - * been written. + * Creates a {@link PageBlobClient} + * + * @param blobName - A page blob name */ - stopDisplayTimer() { - if (this.timeoutHandle) { - clearTimeout(this.timeoutHandle); - this.timeoutHandle = void 0; - } - this.display(); - } - }; - exports.UploadProgress = UploadProgress; - /** - * Uploads a cache archive directly to Azure Blob Storage using the Azure SDK. - * This function will display progress information to the console. Concurrency of the - * upload is determined by the calling functions. - * - * @param signedUploadURL - * @param archivePath - * @param options - * @returns - */ - function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a$2; - return __awaiter$14(this, void 0, void 0, function* () { - const blobClient = new storage_blob_1$1.BlobClient(signedUploadURL); - const blockBlobClient = blobClient.getBlockBlobClient(); - const uploadProgress = new UploadProgress((_a$2 = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a$2 !== void 0 ? _a$2 : 0); - const uploadOptions = { - blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, - concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, - maxSingleShotSize: 128 * 1024 * 1024, - onProgress: uploadProgress.onProgress() - }; - try { - uploadProgress.startDisplayTimer(); - core$8.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); - const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); - if (response._response.status >= 400) throw new errors_1$1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); - return response; - } catch (error) { - core$8.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error.message}`); - throw error; - } finally { - uploadProgress.stopDisplayTimer(); - } - }); - } - exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/requestUtils.js -var require_requestUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/requestUtils.js"(exports) { - var __createBinding$12 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$12 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$12 = exports && exports.__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$12(result, mod, k); - } - __setModuleDefault$12(result, mod); - return result; - }; - var __awaiter$13 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.retryHttpClientResponse = exports.retryTypedResponse = exports.retry = exports.isRetryableStatusCode = exports.isServerErrorStatusCode = exports.isSuccessStatusCode = void 0; - const core$7 = __importStar$12(require_core()); - const http_client_1$3 = require_lib(); - const constants_1$3 = require_constants$3(); - function isSuccessStatusCode(statusCode) { - if (!statusCode) return false; - return statusCode >= 200 && statusCode < 300; - } - exports.isSuccessStatusCode = isSuccessStatusCode; - function isServerErrorStatusCode(statusCode) { - if (!statusCode) return true; - return statusCode >= 500; - } - exports.isServerErrorStatusCode = isServerErrorStatusCode; - function isRetryableStatusCode(statusCode) { - if (!statusCode) return false; - const retryableStatusCodes = [ - http_client_1$3.HttpCodes.BadGateway, - http_client_1$3.HttpCodes.ServiceUnavailable, - http_client_1$3.HttpCodes.GatewayTimeout - ]; - return retryableStatusCodes.includes(statusCode); - } - exports.isRetryableStatusCode = isRetryableStatusCode; - function sleep(milliseconds) { - return __awaiter$13(this, void 0, void 0, function* () { - return new Promise((resolve) => setTimeout(resolve, milliseconds)); - }); - } - function retry(name, method, getStatusCode, maxAttempts = constants_1$3.DefaultRetryAttempts, delay$4 = constants_1$3.DefaultRetryDelay, onError = void 0) { - return __awaiter$13(this, void 0, void 0, function* () { - let errorMessage = ""; - let attempt = 1; - while (attempt <= maxAttempts) { - let response = void 0; - let statusCode = void 0; - let isRetryable = false; - try { - response = yield method(); - } catch (error) { - if (onError) response = onError(error); - isRetryable = true; - errorMessage = error.message; - } - if (response) { - statusCode = getStatusCode(response); - if (!isServerErrorStatusCode(statusCode)) return response; - } - if (statusCode) { - isRetryable = isRetryableStatusCode(statusCode); - errorMessage = `Cache service responded with ${statusCode}`; - } - core$7.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); - if (!isRetryable) { - core$7.debug(`${name} - Error is not retryable`); - break; - } - yield sleep(delay$4); - attempt++; - } - throw Error(`${name} failed: ${errorMessage}`); - }); - } - exports.retry = retry; - function retryTypedResponse(name, method, maxAttempts = constants_1$3.DefaultRetryAttempts, delay$4 = constants_1$3.DefaultRetryDelay) { - return __awaiter$13(this, void 0, void 0, function* () { - return yield retry( - name, - method, - (response) => response.statusCode, - maxAttempts, - delay$4, - // If the error object contains the statusCode property, extract it and return - // an TypedResponse so it can be processed by the retry logic. - (error) => { - if (error instanceof http_client_1$3.HttpClientError) return { - statusCode: error.statusCode, - result: null, - headers: {}, - error - }; - else return void 0; - } -); - }); - } - exports.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1$3.DefaultRetryAttempts, delay$4 = constants_1$3.DefaultRetryDelay) { - return __awaiter$13(this, void 0, void 0, function* () { - return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay$4); - }); - } - exports.retryHttpClientResponse = retryHttpClientResponse; -} }); - -//#endregion -//#region node_modules/.deno/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist/index.js -var require_dist = __commonJS({ "node_modules/.deno/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist/index.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - const listenersMap = new WeakMap(); - const abortedMap = new WeakMap(); - /** - * An aborter instance implements AbortSignal interface, can abort HTTP requests. - * - * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. - * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation - * cannot or will not ever be cancelled. - * - * @example - * Abort without timeout - * ```ts - * await doAsyncWork(AbortSignal.none); - * ``` - */ - var AbortSignal$1 = class AbortSignal$1 { - constructor() { - /** - * onabort event listener. - */ - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); + getPageBlobClient(blobName) { + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** - * Status of whether aborted or not. + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * - * @readonly + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Options to Container Get Properties operation. */ - get aborted() { - if (!abortedMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); - return abortedMap.get(this); + async getProperties(options = {}) { + if (!options.conditions) options.conditions = {}; + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Creates a new AbortSignal instance that will never be aborted. + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * - * @readonly + * @param options - Options to Container Delete operation. */ - static get none() { - return new AbortSignal$1(); + async delete(options = {}) { + if (!options.conditions) options.conditions = {}; + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Added new "abort" event listener, only support "abort" event. + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * - * @param _type - Only support "abort" event - * @param listener - The listener to be added + * @param options - Options to Container Delete operation. */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); - const listeners = listenersMap.get(this); - listeners.push(listener); + async deleteIfExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { + try { + const res = await this.delete(updatedOptions); + return { + succeeded: true, + ...res, + _response: res._response + }; + } catch (e) { + if (e.details?.errorCode === "ContainerNotFound") return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; + throw e; + } + }); } /** - * Remove "abort" event listener, only support "abort" event. + * Sets one or more user-defined name-value pairs for the specified container. * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata + * + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Options to Container Set Metadata operation. */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) listeners.splice(index, 1); + async setMetadata(metadata, options = {}) { + if (!options.conditions) options.conditions = {}; + if (options.conditions.ifUnmodifiedSince) throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Dispatches a synthetic event to the AbortSignal. + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl + * + * @param options - Options to Container Get Access Policy operation. */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - /** - * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. - * Will try to trigger abort event for all linked AbortSignal nodes. - * - * - If there is a timeout, the timer will be cancelled. - * - If aborted is true, nothing will happen. - * - * @internal - */ - function abortSignal(signal) { - if (signal.aborted) return; - if (signal.onabort) signal.onabort.call(signal); - const listeners = listenersMap.get(signal); - if (listeners) listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - abortedMap.set(signal, true); - } - /** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - /** - * An AbortController provides an AbortSignal and the associated controls to signal - * that an asynchronous operation should be aborted. - * - * @example - * Abort an operation when another event fires - * ```ts - * const controller = new AbortController(); - * const signal = controller.signal; - * doAsyncWork(signal); - * button.addEventListener('click', () => controller.abort()); - * ``` - * - * @example - * Share aborter cross multiple operations in 30s - * ```ts - * // Upload the same data to 2 different data centers at the same time, - * // abort another when any of them is finished - * const controller = AbortController.withTimeout(30 * 1000); - * doAsyncWork(controller.signal).then(controller.abort); - * doAsyncWork(controller.signal).then(controller.abort); - *``` - * - * @example - * Cascaded aborting - * ```ts - * // All operations can't take more than 30 seconds - * const aborter = Aborter.timeout(30 * 1000); - * - * // Following 2 operations can't take more than 25 seconds - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * ``` - */ - var AbortController$1 = class { - constructor(parentSignals) { - this._signal = new AbortSignal$1(); - if (!parentSignals) return; - if (!Array.isArray(parentSignals)) parentSignals = arguments; - for (const parentSignal of parentSignals) if (parentSignal.aborted) this.abort(); - else parentSignal.addEventListener("abort", () => { - this.abort(); + async getAccessPolicy(options = {}) { + if (!options.conditions) options.conditions = {}; + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + const res = { + _response: response._response, + blobPublicAccess: response.blobPublicAccess, + date: response.date, + etag: response.etag, + errorCode: response.errorCode, + lastModified: response.lastModified, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + signedIdentifiers: [], + version: response.version + }; + for (const identifier of response) { + let accessPolicy = void 0; + if (identifier.accessPolicy) { + accessPolicy = { permissions: identifier.accessPolicy.permissions }; + if (identifier.accessPolicy.expiresOn) accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); + if (identifier.accessPolicy.startsOn) accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); + } + res.signedIdentifiers.push({ + accessPolicy, + id: identifier.id + }); + } + return res; }); } /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. * - * @readonly + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl + * + * @param access - The level of public access to data in the container. + * @param containerAcl - Array of elements each having a unique Id and details of the access policy. + * @param options - Options to Container Set Access Policy operation. */ - get signal() { - return this._signal; + async setAccessPolicy(access, containerAcl, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + const acl = []; + for (const identifier of containerAcl || []) acl.push({ + accessPolicy: { + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", + permissions: identifier.accessPolicy.permissions, + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" + }, + id: identifier.id + }); + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ + abortSignal: options.abortSignal, + access, + containerAcl: acl, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the container. */ - abort() { - abortSignal(this._signal); + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param blobName - Name of the block blob to create or update. + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to configure the Block Blob Upload operation. + * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - static timeout(ms) { - const signal = new AbortSignal$1(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") timer.unref(); - return signal; - } - }; - exports.AbortController = AbortController$1; - exports.AbortError = AbortError; - exports.AbortSignal = AbortSignal$1; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/downloadUtils.js -var require_downloadUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports) { - var __createBinding$11 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$11 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$11 = exports && exports.__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$11(result, mod, k); - } - __setModuleDefault$11(result, mod); - return result; - }; - var __awaiter$12 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + const blockBlobClient = this.getBlockBlobClient(blobName); + return { + blockBlobClient, + response: await blockBlobClient.upload(body, contentLength, updatedOptions) + }; }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.downloadCacheStorageSDK = exports.downloadCacheHttpClientConcurrent = exports.downloadCacheHttpClient = exports.DownloadProgress = void 0; - const core$6 = __importStar$11(require_core()); - const http_client_1$2 = require_lib(); - const storage_blob_1 = require_dist$1(); - const buffer = __importStar$11(__require("buffer")); - const fs$3 = __importStar$11(__require("fs")); - const stream$1 = __importStar$11(__require("stream")); - const util$1 = __importStar$11(__require("util")); - const utils$3 = __importStar$11(require_cacheUtils()); - const constants_1$2 = require_constants$3(); - const requestUtils_1$1 = require_requestUtils(); - const abort_controller_1 = require_dist(); - /** - * Pipes the body of a HTTP response to a stream - * - * @param response the HTTP response - * @param output the writable stream - */ - function pipeResponseToStream(response, output) { - return __awaiter$12(this, void 0, void 0, function* () { - const pipeline = util$1.promisify(stream$1.pipeline); - yield pipeline(response.message, output); - }); - } - /** - * Class for tracking the download state and displaying stats. - */ - var DownloadProgress = class { - constructor(contentLength$1) { - this.contentLength = contentLength$1; - this.segmentIndex = 0; - this.segmentSize = 0; - this.segmentOffset = 0; - this.receivedBytes = 0; - this.displayedComplete = false; - this.startTime = Date.now(); - } /** - * Progress to the next segment. Only call this method when the previous segment - * is complete. + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * - * @param segmentSize the length of the next segment + * @param blobName - + * @param options - Options to Blob Delete operation. + * @returns Block blob deletion response data. */ - nextSegment(segmentSize) { - this.segmentOffset = this.segmentOffset + this.segmentSize; - this.segmentIndex = this.segmentIndex + 1; - this.segmentSize = segmentSize; - this.receivedBytes = 0; - core$6.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + async deleteBlob(blobName, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + let blobClient = this.getBlobClient(blobName); + if (options.versionId) blobClient = blobClient.withVersion(options.versionId); + return blobClient.delete(updatedOptions); + }); } /** - * Sets the number of bytes received for the current segment. + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * - * @param receivedBytes the number of bytes received + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Flat Segment operation. */ - setReceivedBytes(receivedBytes) { - this.receivedBytes = receivedBytes; + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + return { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + return { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + }) + } + }; + }); } /** - * Returns the total number of bytes transferred. + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Hierarchy Segment operation. */ - getTransferredBytes() { - return this.segmentOffset + this.receivedBytes; + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + return { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + return { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + return { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + }) + } + }; + }); } /** - * Returns true if the download is complete. + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. */ - isDone() { - return this.getTransferredBytes() === this.contentLength; + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); } /** - * Prints the current download stats. Once the download completes, this will print one - * last line and then stop. + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @param options - Options to list blobs operation. */ - display() { - if (this.displayedComplete) return; - const transferredBytes = this.segmentOffset + this.receivedBytes; - const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); - const elapsedTime = Date.now() - this.startTime; - const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core$6.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); - if (this.isDone()) this.displayedComplete = true; + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) yield* listBlobsFlatSegmentResponse.segment.blobItems; } /** - * Returns a function used to handle TransferProgressEvents. + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param options - Options to list blobs. + * @returns An asyncIterableIterator that supports paging. */ - onProgress() { - return (progress) => { - this.setReceivedBytes(progress.loadedBytes); + listBlobsFlat(options = {}) { + const include = []; + if (options.includeCopy) include.push("copy"); + if (options.includeDeleted) include.push("deleted"); + if (options.includeMetadata) include.push("metadata"); + if (options.includeSnapshots) include.push("snapshots"); + if (options.includeVersions) include.push("versions"); + if (options.includeUncommitedBlobs) include.push("uncommittedblobs"); + if (options.includeTags) include.push("tags"); + if (options.includeDeletedWithVersions) include.push("deletedwithversions"); + if (options.includeImmutabilityPolicy) include.push("immutabilitypolicy"); + if (options.includeLegalHold) include.push("legalhold"); + if (options.prefix === "") options.prefix = void 0; + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItems(updatedOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); + } }; } /** - * Starts the timer that displays the stats. + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse * - * @param delayInMs the delay between each write + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. */ - startDisplayTimer(delayInMs = 1e3) { - const displayCallback = () => { - this.display(); - if (!this.isDone()) this.timeoutHandle = setTimeout(displayCallback, delayInMs); - }; - this.timeoutHandle = setTimeout(displayCallback, delayInMs); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); } /** - * Stops the timer that displays the stats. As this typically indicates the download - * is complete, this will display one last line, unless the last line has already - * been written. + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. */ - stopDisplayTimer() { - if (this.timeoutHandle) { - clearTimeout(this.timeoutHandle); - this.timeoutHandle = void 0; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) for (const prefix of segment.blobPrefixes) yield { + kind: "prefix", + ...prefix + }; + for (const blob of segment.blobItems) yield { + kind: "blob", + ...blob + }; } - this.display(); } - }; - exports.DownloadProgress = DownloadProgress; - /** - * Download the cache using the Actions toolkit http-client - * - * @param archiveLocation the URL for the cache - * @param archivePath the local path where the cache is saved - */ - function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter$12(this, void 0, void 0, function* () { - const writeStream = fs$3.createWriteStream(archivePath); - const httpClient = new http_client_1$2.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1$1.retryHttpClientResponse)("downloadCache", () => __awaiter$12(this, void 0, void 0, function* () { - return httpClient.get(archiveLocation); - })); - downloadResponse.message.socket.setTimeout(constants_1$2.SocketTimeout, () => { - downloadResponse.message.destroy(); - core$6.debug(`Aborting download, socket timed out after ${constants_1$2.SocketTimeout} ms`); - }); - yield pipeResponseToStream(downloadResponse, writeStream); - const contentLengthHeader = downloadResponse.message.headers["content-length"]; - if (contentLengthHeader) { - const expectedLength = parseInt(contentLengthHeader); - const actualLength = utils$3.getArchiveFileSizeInBytes(archivePath); - if (actualLength !== expectedLength) throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); - } else core$6.debug("Unable to validate download, no Content-Length header"); - }); - } - exports.downloadCacheHttpClient = downloadCacheHttpClient; - /** - * Download the cache using the Actions toolkit http-client concurrently - * - * @param archiveLocation the URL for the cache - * @param archivePath the local path where the cache is saved - */ - function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a$2; - return __awaiter$12(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs$3.promises.open(archivePath, "w"); - const httpClient = new http_client_1$2.HttpClient("actions/cache", void 0, { - socketTimeout: options.timeoutInMs, - keepAlive: true - }); - try { - const res = yield (0, requestUtils_1$1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter$12(this, void 0, void 0, function* () { - return yield httpClient.request("HEAD", archiveLocation, null, {}); - })); - const lengthHeader = res.message.headers["content-length"]; - if (lengthHeader === void 0 || lengthHeader === null) throw new Error("Content-Length not found on blob response"); - const length = parseInt(lengthHeader); - if (Number.isNaN(length)) throw new Error(`Could not interpret Content-Length: ${length}`); - const downloads = []; - const blockSize = 4 * 1024 * 1024; - for (let offset = 0; offset < length; offset += blockSize) { - const count = Math.min(blockSize, length - offset); - downloads.push({ - offset, - promiseGetter: () => __awaiter$12(this, void 0, void 0, function* () { - return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); - }) - }); - } - downloads.reverse(); - let actives = 0; - let bytesDownloaded = 0; - const progress = new DownloadProgress(length); - progress.startDisplayTimer(); - const progressFn = progress.onProgress(); - const activeDownloads = []; - let nextDownload; - const waitAndWrite = () => __awaiter$12(this, void 0, void 0, function* () { - const segment = yield Promise.race(Object.values(activeDownloads)); - yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); - actives--; - delete activeDownloads[segment.offset]; - bytesDownloaded += segment.count; - progressFn({ loadedBytes: bytesDownloaded }); - }); - while (nextDownload = downloads.pop()) { - activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); - actives++; - if (actives >= ((_a$2 = options.downloadConcurrency) !== null && _a$2 !== void 0 ? _a$2 : 10)) yield waitAndWrite(); - } - while (actives > 0) yield waitAndWrite(); - } finally { - httpClient.dispose(); - yield archiveDescriptor.close(); - } - }); - } - exports.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; - function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter$12(this, void 0, void 0, function* () { - const retries = 5; - let failures = 0; - while (true) try { - const timeout = 3e4; - const result = yield promiseWithTimeout(timeout, downloadSegment(httpClient, archiveLocation, offset, count)); - if (typeof result === "string") throw new Error("downloadSegmentRetry failed due to timeout"); - return result; - } catch (err) { - if (failures >= retries) throw err; - failures++; - } - }); - } - function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter$12(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1$1.retryHttpClientResponse)("downloadCachePart", () => __awaiter$12(this, void 0, void 0, function* () { - return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); - })); - if (!partRes.readBodyBuffer) throw new Error("Expected HttpClientResponse to implement readBodyBuffer"); - return { - offset, - count, - buffer: yield partRes.readBodyBuffer() - }; - }); - } - /** - * Download the cache using the Azure Storage SDK. Only call this method if the - * URL points to an Azure Storage endpoint. - * - * @param archiveLocation the URL for the cache - * @param archivePath the local path where the cache is saved - * @param options the download options with the defaults set - */ - function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a$2; - return __awaiter$12(this, void 0, void 0, function* () { - const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { tryTimeoutInMs: options.timeoutInMs } }); - const properties = yield client.getProperties(); - const contentLength$1 = (_a$2 = properties.contentLength) !== null && _a$2 !== void 0 ? _a$2 : -1; - if (contentLength$1 < 0) { - core$6.debug("Unable to determine content length, downloading file with http-client..."); - yield downloadCacheHttpClient(archiveLocation, archivePath); - } else { - const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); - const downloadProgress = new DownloadProgress(contentLength$1); - const fd = fs$3.openSync(archivePath, "w"); - try { - downloadProgress.startDisplayTimer(); - const controller = new abort_controller_1.AbortController(); - const abortSignal$1 = controller.signal; - while (!downloadProgress.isDone()) { - const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; - const segmentSize = Math.min(maxSegmentSize, contentLength$1 - segmentStart); - downloadProgress.nextSegment(segmentSize); - const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 36e5, client.downloadToBuffer(segmentStart, segmentSize, { - abortSignal: abortSignal$1, - concurrency: options.downloadConcurrency, - onProgress: downloadProgress.onProgress() - })); - if (result === "timeout") { - controller.abort(); - throw new Error("Aborting cache download as the download time exceeded the timeout."); - } else if (Buffer.isBuffer(result)) fs$3.writeFileSync(fd, result); - } - } finally { - downloadProgress.stopDisplayTimer(); - fs$3.closeSync(fd); + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. + */ + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") throw new RangeError("delimiter should contain one or more characters"); + const include = []; + if (options.includeCopy) include.push("copy"); + if (options.includeDeleted) include.push("deleted"); + if (options.includeMetadata) include.push("metadata"); + if (options.includeSnapshots) include.push("snapshots"); + if (options.includeVersions) include.push("versions"); + if (options.includeUncommitedBlobs) include.push("uncommittedblobs"); + if (options.includeTags) include.push("tags"); + if (options.includeDeletedWithVersions) include.push("deletedwithversions"); + if (options.includeImmutabilityPolicy) include.push("immutabilitypolicy"); + if (options.includeLegalHold) include.push("legalhold"); + if (options.prefix === "") options.prefix = void 0; + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); + return { + async next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } - } - }); - } - exports.downloadCacheStorageSDK = downloadCacheStorageSDK; - const promiseWithTimeout = (timeoutMs, promise) => __awaiter$12(void 0, void 0, void 0, function* () { - let timeoutHandle; - const timeoutPromise = new Promise((resolve) => { - timeoutHandle = setTimeout(() => resolve("timeout"), timeoutMs); - }); - return Promise.race([promise, timeoutPromise]).then((result) => { - clearTimeout(timeoutHandle); - return result; - }); - }); -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/options.js -var require_options = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/options.js"(exports) { - var __createBinding$10 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$10 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$10 = exports && exports.__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$10(result, mod, k); - } - __setModuleDefault$10(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getDownloadOptions = exports.getUploadOptions = void 0; - const core$5 = __importStar$10(require_core()); - /** - * Returns a copy of the upload options with defaults filled in. - * - * @param copy the original upload options - */ - function getUploadOptions(copy$1) { - const result = { - useAzureSdk: false, - uploadConcurrency: 4, - uploadChunkSize: 32 * 1024 * 1024 - }; - if (copy$1) { - if (typeof copy$1.useAzureSdk === "boolean") result.useAzureSdk = copy$1.useAzureSdk; - if (typeof copy$1.uploadConcurrency === "number") result.uploadConcurrency = copy$1.uploadConcurrency; - if (typeof copy$1.uploadChunkSize === "number") result.uploadChunkSize = copy$1.uploadChunkSize; + }; } /** - * Add env var overrides + * The Filter Blobs operation enables callers to list blobs in the container whose tags + * match a given search expression. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. */ - result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; - result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core$5.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core$5.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core$5.debug(`Upload chunk size: ${result.uploadChunkSize}`); - return result; - } - exports.getUploadOptions = getUploadOptions; - /** - * Returns a copy of the download options with defaults filled in. - * - * @param copy the original download options - */ - function getDownloadOptions(copy$1) { - const result = { - useAzureSdk: false, - concurrentBlobDownloads: true, - downloadConcurrency: 8, - timeoutInMs: 3e4, - segmentTimeoutInMs: 6e5, - lookupOnly: false - }; - if (copy$1) { - if (typeof copy$1.useAzureSdk === "boolean") result.useAzureSdk = copy$1.useAzureSdk; - if (typeof copy$1.concurrentBlobDownloads === "boolean") result.concurrentBlobDownloads = copy$1.concurrentBlobDownloads; - if (typeof copy$1.downloadConcurrency === "number") result.downloadConcurrency = copy$1.downloadConcurrency; - if (typeof copy$1.timeoutInMs === "number") result.timeoutInMs = copy$1.timeoutInMs; - if (typeof copy$1.segmentTimeoutInMs === "number") result.segmentTimeoutInMs = copy$1.segmentTimeoutInMs; - if (typeof copy$1.lookupOnly === "boolean") result.lookupOnly = copy$1.lookupOnly; + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions + })); + return { + ...response, + _response: response._response, + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) tagValue = blob.tags.blobTagSet[0].value; + return { + ...blob, + tags: (0, utils_common_js_1.toTags)(blob.tags), + tagValue + }; + }) + }; + }); } - const segmentDownloadTimeoutMins = process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]; - if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; - core$5.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core$5.debug(`Download concurrency: ${result.downloadConcurrency}`); - core$5.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core$5.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core$5.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core$5.debug(`Lookup only: ${result.lookupOnly}`); - return result; - } - exports.getDownloadOptions = getDownloadOptions; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/config.js -var require_config = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/config.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getCacheServiceURL = exports.getCacheServiceVersion = exports.isGhes = void 0; - function isGhes() { - const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); - const hostname = ghUrl.hostname.trimEnd().toUpperCase(); - const isGitHubHost = hostname === "GITHUB.COM"; - const isGheHost = hostname.endsWith(".GHE.COM"); - const isLocalHost = hostname.endsWith(".LOCALHOST"); - return !isGitHubHost && !isGheHost && !isLocalHost; - } - exports.isGhes = isGhes; - function getCacheServiceVersion() { - if (isGhes()) return "v1"; - return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; - } - exports.getCacheServiceVersion = getCacheServiceVersion; - function getCacheServiceURL() { - const version$1 = getCacheServiceVersion(); - switch (version$1) { - case "v1": return process.env["ACTIONS_CACHE_URL"] || process.env["ACTIONS_RESULTS_URL"] || ""; - case "v2": return process.env["ACTIONS_RESULTS_URL"] || ""; - default: throw new Error(`Unsupported cache service version: ${version$1}`); + /** + * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); } - } - exports.getCacheServiceURL = getCacheServiceURL; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/package.json -var require_package = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/package.json"(exports, module) { - module.exports = { - "name": "@actions/cache", - "version": "4.0.3", - "preview": true, - "description": "Actions cache lib", - "keywords": [ - "github", - "actions", - "cache" - ], - "homepage": "https://github.com/actions/toolkit/tree/main/packages/cache", - "license": "MIT", - "main": "lib/cache.js", - "types": "lib/cache.d.ts", - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": ["lib", "!.DS_Store"], - "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git", - "directory": "packages/cache" - }, - "scripts": { - "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", - "test": "echo \"Error: run tests from root\" && exit 1", - "tsc": "tsc" - }, - "bugs": { "url": "https://github.com/actions/toolkit/issues" }, - "dependencies": { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", - "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", - "@protobuf-ts/plugin": "^2.9.4", - "semver": "^6.3.1" - }, - "devDependencies": { - "@types/node": "^22.13.9", - "@types/semver": "^6.0.0", - "typescript": "^5.2.2" + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) yield* segment.blobs; } - }; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/user-agent.js -var require_user_agent = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getUserAgentString = void 0; - const packageJson = require_package(); - /** - * Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package - */ - function getUserAgentString() { - return `@actions/cache-${packageJson.version}`; - } - exports.getUserAgentString = getUserAgentString; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheHttpClient.js -var require_cacheHttpClient = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports) { - var __createBinding$9 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$9 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$9 = exports && exports.__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$9(result, mod, k); + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified container. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + const listSegmentOptions = { ...options }; + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); + } + }; } - __setModuleDefault$9(result, mod); - return result; - }; - var __awaiter$11 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = void 0; - const core$4 = __importStar$9(require_core()); - const http_client_1$1 = require_lib(); - const auth_1$1 = require_auth(); - const fs$2 = __importStar$9(__require("fs")); - const url_1 = __require("url"); - const utils$2 = __importStar$9(require_cacheUtils()); - const uploadUtils_1 = require_uploadUtils(); - const downloadUtils_1 = require_downloadUtils(); - const options_1 = require_options(); - const requestUtils_1 = require_requestUtils(); - const config_1$2 = require_config(); - const user_agent_1$1 = require_user_agent(); - function getCacheApiUrl(resource) { - const baseUrl = (0, config_1$2.getCacheServiceURL)(); - if (!baseUrl) throw new Error("Cache Service Url not found, unable to restore cache."); - const url$1 = `${baseUrl}_apis/artifactcache/${resource}`; - core$4.debug(`Resource Url: ${url$1}`); - return url$1; - } - function createAcceptHeader(type, apiVersion) { - return `${type};api-version=${apiVersion}`; - } - function getRequestOptions() { - const requestOptions = { headers: { Accept: createAcceptHeader("application/json", "6.0-preview.1") } }; - return requestOptions; - } - function createHttpClient() { - const token = process.env["ACTIONS_RUNTIME_TOKEN"] || ""; - const bearerCredentialHandler = new auth_1$1.BearerCredentialHandler(token); - return new http_client_1$1.HttpClient((0, user_agent_1$1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); - } - function getCacheEntry(keys, paths, options) { - return __awaiter$11(this, void 0, void 0, function* () { - const httpClient = createHttpClient(); - const version$1 = utils$2.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); - const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version$1}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter$11(this, void 0, void 0, function* () { - return httpClient.getJson(getCacheApiUrl(resource)); - })); - if (response.statusCode === 204) { - if (core$4.isDebug()) yield printCachesListForDiagnostics(keys[0], httpClient, version$1); - return null; - } - if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) throw new Error(`Cache service responded with ${response.statusCode}`); - const cacheResult = response.result; - const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; - if (!cacheDownloadUrl) throw new Error("Cache not found."); - core$4.setSecret(cacheDownloadUrl); - core$4.debug(`Cache Result:`); - core$4.debug(JSON.stringify(cacheResult)); - return cacheResult; - }); - } - exports.getCacheEntry = getCacheEntry; - function printCachesListForDiagnostics(key, httpClient, version$1) { - return __awaiter$11(this, void 0, void 0, function* () { - const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter$11(this, void 0, void 0, function* () { - return httpClient.getJson(getCacheApiUrl(resource)); - })); - if (response.statusCode === 200) { - const cacheListResult = response.result; - const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; - if (totalCount && totalCount > 0) { - core$4.debug(`No matching cache found for cache key '${key}', version '${version$1} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`); - for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) core$4.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); - } - } - }); - } - function downloadCache(archiveLocation, archivePath, options) { - return __awaiter$11(this, void 0, void 0, function* () { - const archiveUrl = new url_1.URL(archiveLocation); - const downloadOptions = (0, options_1.getDownloadOptions)(options); - if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) if (downloadOptions.useAzureSdk) yield (0, downloadUtils_1.downloadCacheStorageSDK)(archiveLocation, archivePath, downloadOptions); - else if (downloadOptions.concurrentBlobDownloads) yield (0, downloadUtils_1.downloadCacheHttpClientConcurrent)(archiveLocation, archivePath, downloadOptions); - else yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); - else yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); - }); - } - exports.downloadCache = downloadCache; - function reserveCache(key, paths, options) { - return __awaiter$11(this, void 0, void 0, function* () { - const httpClient = createHttpClient(); - const version$1 = utils$2.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); - const reserveCacheRequest = { - key, - version: version$1, - cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize - }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter$11(this, void 0, void 0, function* () { - return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); - })); - return response; - }); - } - exports.reserveCache = reserveCache; - function getContentRange(start, end) { - return `bytes ${start}-${end}/*`; - } - function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter$11(this, void 0, void 0, function* () { - core$4.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); - const additionalHeaders = { - "Content-Type": "application/octet-stream", - "Content-Range": getContentRange(start, end) - }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter$11(this, void 0, void 0, function* () { - return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); - })); - if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); - }); - } - function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter$11(this, void 0, void 0, function* () { - const fileSize = utils$2.getArchiveFileSizeInBytes(archivePath); - const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs$2.openSync(archivePath, "r"); - const uploadOptions = (0, options_1.getUploadOptions)(options); - const concurrency = utils$2.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); - const maxChunkSize = utils$2.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); - const parallelUploads = [...new Array(concurrency).keys()]; - core$4.debug("Awaiting all uploads"); - let offset = 0; + getContainerNameFromUrl() { + let containerName; try { - yield Promise.all(parallelUploads.map(() => __awaiter$11(this, void 0, void 0, function* () { - while (offset < fileSize) { - const chunkSize = Math.min(fileSize - offset, maxChunkSize); - const start = offset; - const end = offset + chunkSize - 1; - offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs$2.createReadStream(archivePath, { - fd, - start, - end, - autoClose: false - }).on("error", (error) => { - throw new Error(`Cache upload failed because file read failed with ${error.message}`); - }), start, end); - } - }))); - } finally { - fs$2.closeSync(fd); - } - return; - }); - } - function commitCache(httpClient, cacheId, filesize) { - return __awaiter$11(this, void 0, void 0, function* () { - const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter$11(this, void 0, void 0, function* () { - return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); - })); - }); - } - function saveCache$2(cacheId, archivePath, signedUploadURL, options) { - return __awaiter$11(this, void 0, void 0, function* () { - const uploadOptions = (0, options_1.getUploadOptions)(options); - if (uploadOptions.useAzureSdk) { - if (!signedUploadURL) throw new Error("Azure Storage SDK can only be used when a signed URL is provided."); - yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); - } else { - const httpClient = createHttpClient(); - core$4.debug("Upload cache"); - yield uploadFile(httpClient, cacheId, archivePath, options); - core$4.debug("Commiting cache"); - const cacheSize = utils$2.getArchiveFileSizeInBytes(archivePath); - core$4.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); - const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); - if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); - core$4.info("Cache saved successfully"); + const parsedUrl = new URL(this.url); + if (parsedUrl.hostname.split(".")[1] === "blob") containerName = parsedUrl.pathname.split("/")[1]; + else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) containerName = parsedUrl.pathname.split("/")[2]; + else containerName = parsedUrl.pathname.split("/")[1]; + containerName = decodeURIComponent(containerName); + if (!containerName) throw new Error("Provided containerName is invalid."); + return containerName; + } catch (error) { + throw new Error("Unable to extract containerName with provided information."); } - }); - } - exports.saveCache = saveCache$2; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js -var require_json_typings = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.isJsonObject = exports.typeofJsonValue = void 0; - /** - * Get the type of a JSON value. - * Distinguishes between array, null and object. - */ - function typeofJsonValue(value) { - let t = typeof value; - if (t == "object") { - if (Array.isArray(value)) return "array"; - if (value === null) return "null"; } - return t; - } - exports.typeofJsonValue = typeofJsonValue; - /** - * Is this a JSON object (instead of an array or null)? - */ - function isJsonObject(value) { - return value !== null && typeof value == "object" && !Array.isArray(value); - } - exports.isJsonObject = isJsonObject; -} }); + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasStringToSign(options) { + if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; + } + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this container. + */ + getBlobBatchClient() { + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); + } + }; + exports.ContainerClient = ContainerClient; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/base64.js -var require_base64 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/base64.js"(exports) { +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.base64encode = exports.base64decode = void 0; - let encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); - let decTable = []; - for (let i = 0; i < encTable.length; i++) decTable[encTable[i].charCodeAt(0)] = i; - decTable["-".charCodeAt(0)] = encTable.indexOf("+"); - decTable["_".charCodeAt(0)] = encTable.indexOf("/"); + exports.AccountSASPermissions = void 0; /** - * Decodes a base64 string to a byte array. + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * - ignores white-space, including line breaks and tabs - * - allows inner padding (can decode concatenated base64 strings) - * - does not require padding - * - understands base64url encoding: - * "-" instead of "+", - * "_" instead of "/", - * no padding + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. */ - function base64decode(base64Str) { - let es = base64Str.length * 3 / 4; - if (base64Str[base64Str.length - 2] == "=") es -= 2; - else if (base64Str[base64Str.length - 1] == "=") es -= 1; - let bytes = new Uint8Array(es), bytePos = 0, groupPos = 0, b, p = 0; - for (let i = 0; i < base64Str.length; i++) { - b = decTable[base64Str.charCodeAt(i)]; - if (b === void 0) switch (base64Str[i]) { - case "=": groupPos = 0; - case "\n": - case "\r": - case " ": - case " ": continue; - default: throw Error(`invalid base64 string.`); - } - switch (groupPos) { - case 0: - p = b; - groupPos = 1; + var AccountSASPermissions = class AccountSASPermissions { + /** + * Parse initializes the AccountSASPermissions fields from a string. + * + * @param permissions - + */ + static parse(permissions) { + const accountSASPermissions = new AccountSASPermissions(); + for (const c of permissions) switch (c) { + case "r": + accountSASPermissions.read = true; break; - case 1: - bytes[bytePos++] = p << 2 | (b & 48) >> 4; - p = b; - groupPos = 2; + case "w": + accountSASPermissions.write = true; break; - case 2: - bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2; - p = b; - groupPos = 3; + case "d": + accountSASPermissions.delete = true; break; - case 3: - bytes[bytePos++] = (p & 3) << 6 | b; - groupPos = 0; + case "x": + accountSASPermissions.deleteVersion = true; break; - } - } - if (groupPos == 1) throw Error(`invalid base64 string.`); - return bytes.subarray(0, bytePos); - } - exports.base64decode = base64decode; - /** - * Encodes a byte array to a base64 string. - * Adds padding at the end. - * Does not insert newlines. - */ - function base64encode(bytes) { - let base64$1 = "", groupPos = 0, b, p = 0; - for (let i = 0; i < bytes.length; i++) { - b = bytes[i]; - switch (groupPos) { - case 0: - base64$1 += encTable[b >> 2]; - p = (b & 3) << 4; - groupPos = 1; + case "l": + accountSASPermissions.list = true; break; - case 1: - base64$1 += encTable[p | b >> 4]; - p = (b & 15) << 2; - groupPos = 2; + case "a": + accountSASPermissions.add = true; break; - case 2: - base64$1 += encTable[p | b >> 6]; - base64$1 += encTable[b & 63]; - groupPos = 0; + case "c": + accountSASPermissions.create = true; break; + case "u": + accountSASPermissions.update = true; + break; + case "p": + accountSASPermissions.process = true; + break; + case "t": + accountSASPermissions.tag = true; + break; + case "f": + accountSASPermissions.filter = true; + break; + case "i": + accountSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + accountSASPermissions.permanentDelete = true; + break; + default: throw new RangeError(`Invalid permission character: ${c}`); } + return accountSASPermissions; } - if (groupPos) { - base64$1 += encTable[p]; - base64$1 += "="; - if (groupPos == 1) base64$1 += "="; - } - return base64$1; - } - exports.base64encode = base64encode; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js -var require_protobufjs_utf8 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.utf8read = void 0; - const fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk); - /** - * @deprecated This function will no longer be exported with the next major - * release, since protobuf-ts has switch to TextDecoder API. If you need this - * function, please migrate to @protobufjs/utf8. For context, see - * https://github.com/timostamm/protobuf-ts/issues/184 - * - * Reads UTF8 bytes as a string. - * - * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40) - * - * Copyright (c) 2016, Daniel Wirtz - */ - function utf8read(bytes) { - if (bytes.length < 1) return ""; - let pos = 0, parts = [], chunk = [], i = 0, t; - let len = bytes.length; - while (pos < len) { - t = bytes[pos++]; - if (t < 128) chunk[i++] = t; - else if (t > 191 && t < 224) chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63; - else if (t > 239 && t < 365) { - t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 65536; - chunk[i++] = 55296 + (t >> 10); - chunk[i++] = 56320 + (t & 1023); - } else chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63; - if (i > 8191) { - parts.push(fromCharCodes(chunk)); - i = 0; - } - } - if (parts.length) { - if (i) parts.push(fromCharCodes(chunk.slice(0, i))); - return parts.join(""); + /** + * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - + */ + static from(permissionLike) { + const accountSASPermissions = new AccountSASPermissions(); + if (permissionLike.read) accountSASPermissions.read = true; + if (permissionLike.write) accountSASPermissions.write = true; + if (permissionLike.delete) accountSASPermissions.delete = true; + if (permissionLike.deleteVersion) accountSASPermissions.deleteVersion = true; + if (permissionLike.filter) accountSASPermissions.filter = true; + if (permissionLike.tag) accountSASPermissions.tag = true; + if (permissionLike.list) accountSASPermissions.list = true; + if (permissionLike.add) accountSASPermissions.add = true; + if (permissionLike.create) accountSASPermissions.create = true; + if (permissionLike.update) accountSASPermissions.update = true; + if (permissionLike.process) accountSASPermissions.process = true; + if (permissionLike.setImmutabilityPolicy) accountSASPermissions.setImmutabilityPolicy = true; + if (permissionLike.permanentDelete) accountSASPermissions.permanentDelete = true; + return accountSASPermissions; } - return fromCharCodes(chunk.slice(0, i)); - } - exports.utf8read = utf8read; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js -var require_binary_format_contract = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0; - /** - * This handler implements the default behaviour for unknown fields. - * When reading data, unknown fields are stored on the message, in a - * symbol property. - * When writing data, the symbol property is queried and unknown fields - * are serialized into the output again. - */ - var UnknownFieldHandler; - (function(UnknownFieldHandler$1) { /** - * The symbol used to store unknown fields for a message. - * The property must conform to `UnknownFieldContainer`. + * Permission to read resources and list queues and tables granted. */ - UnknownFieldHandler$1.symbol = Symbol.for("protobuf-ts/unknown"); + read = false; /** - * Store an unknown field during binary read directly on the message. - * This method is compatible with `BinaryReadOptions.readUnknownField`. + * Permission to write resources granted. */ - UnknownFieldHandler$1.onRead = (typeName, message, fieldNo, wireType, data) => { - let container = is(message) ? message[UnknownFieldHandler$1.symbol] : message[UnknownFieldHandler$1.symbol] = []; - container.push({ - no: fieldNo, - wireType, - data - }); - }; + write = false; /** - * Write unknown fields stored for the message to the writer. - * This method is compatible with `BinaryWriteOptions.writeUnknownFields`. + * Permission to delete blobs and files granted. */ - UnknownFieldHandler$1.onWrite = (typeName, message, writer) => { - for (let { no, wireType, data } of UnknownFieldHandler$1.list(message)) writer.tag(no, wireType).raw(data); - }; + delete = false; /** - * List unknown fields stored for the message. - * Note that there may be multiples fields with the same number. + * Permission to delete versions granted. */ - UnknownFieldHandler$1.list = (message, fieldNo) => { - if (is(message)) { - let all = message[UnknownFieldHandler$1.symbol]; - return fieldNo ? all.filter((uf) => uf.no == fieldNo) : all; - } - return []; - }; + deleteVersion = false; /** - * Returns the last unknown field by field number. + * Permission to list blob containers, blobs, shares, directories, and files granted. */ - UnknownFieldHandler$1.last = (message, fieldNo) => UnknownFieldHandler$1.list(message, fieldNo).slice(-1)[0]; - const is = (message) => message && Array.isArray(message[UnknownFieldHandler$1.symbol]); - })(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {})); - /** - * Merges binary write or read options. Later values override earlier values. - */ - function mergeBinaryOptions(a, b) { - return Object.assign(Object.assign({}, a), b); - } - exports.mergeBinaryOptions = mergeBinaryOptions; - /** - * Protobuf binary format wire types. - * - * A wire type provides just enough information to find the length of the - * following value. - * - * See https://developers.google.com/protocol-buffers/docs/encoding#structure - */ - var WireType; - (function(WireType$1) { + list = false; /** - * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum + * Permission to add messages, table entities, and append to blobs granted. */ - WireType$1[WireType$1["Varint"] = 0] = "Varint"; + add = false; /** - * Used for fixed64, sfixed64, double. - * Always 8 bytes with little-endian byte order. + * Permission to create blobs and files granted. */ - WireType$1[WireType$1["Bit64"] = 1] = "Bit64"; + create = false; /** - * Used for string, bytes, embedded messages, packed repeated fields - * - * Only repeated numeric types (types which use the varint, 32-bit, - * or 64-bit wire types) can be packed. In proto3, such fields are - * packed by default. + * Permissions to update messages and table entities granted. */ - WireType$1[WireType$1["LengthDelimited"] = 2] = "LengthDelimited"; + update = false; /** - * Used for groups - * @deprecated + * Permission to get and delete messages granted. */ - WireType$1[WireType$1["StartGroup"] = 3] = "StartGroup"; + process = false; /** - * Used for groups - * @deprecated + * Specfies Tag access granted. */ - WireType$1[WireType$1["EndGroup"] = 4] = "EndGroup"; + tag = false; /** - * Used for fixed32, sfixed32, float. - * Always 4 bytes with little-endian byte order. + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * */ - WireType$1[WireType$1["Bit32"] = 5] = "Bit32"; - })(WireType = exports.WireType || (exports.WireType = {})); -} }); + toString() { + const permissions = []; + if (this.read) permissions.push("r"); + if (this.write) permissions.push("w"); + if (this.delete) permissions.push("d"); + if (this.deleteVersion) permissions.push("x"); + if (this.filter) permissions.push("f"); + if (this.tag) permissions.push("t"); + if (this.list) permissions.push("l"); + if (this.add) permissions.push("a"); + if (this.create) permissions.push("c"); + if (this.update) permissions.push("u"); + if (this.process) permissions.push("p"); + if (this.setImmutabilityPolicy) permissions.push("i"); + if (this.permanentDelete) permissions.push("y"); + return permissions.join(""); + } + }; + exports.AccountSASPermissions = AccountSASPermissions; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js -var require_goog_varint = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js"(exports) { +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0; + exports.AccountSASResourceTypes = void 0; /** - * Read a 64 bit varint as two JS numbers. - * - * Returns tuple: - * [0]: low bits - * [0]: high bits - * - * Copyright 2008 Google Inc. All rights reserved. + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175 + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. */ - function varint64read() { - let lowBits = 0; - let highBits = 0; - for (let shift = 0; shift < 28; shift += 7) { - let b = this.buf[this.pos++]; - lowBits |= (b & 127) << shift; - if ((b & 128) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - } - let middleByte = this.buf[this.pos++]; - lowBits |= (middleByte & 15) << 28; - highBits = (middleByte & 112) >> 4; - if ((middleByte & 128) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - for (let shift = 3; shift <= 31; shift += 7) { - let b = this.buf[this.pos++]; - highBits |= (b & 127) << shift; - if ((b & 128) == 0) { - this.assertBounds(); - return [lowBits, highBits]; + var AccountSASResourceTypes = class AccountSASResourceTypes { + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @param resourceTypes - + */ + static parse(resourceTypes) { + const accountSASResourceTypes = new AccountSASResourceTypes(); + for (const c of resourceTypes) switch (c) { + case "s": + accountSASResourceTypes.service = true; + break; + case "c": + accountSASResourceTypes.container = true; + break; + case "o": + accountSASResourceTypes.object = true; + break; + default: throw new RangeError(`Invalid resource type: ${c}`); } + return accountSASResourceTypes; } - throw new Error("invalid varint"); - } - exports.varint64read = varint64read; - /** - * Write a 64 bit varint, given as two JS numbers, to the given bytes array. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344 - */ - function varint64write(lo, hi, bytes) { - for (let i = 0; i < 28; i = i + 7) { - const shift = lo >>> i; - const hasNext = !(shift >>> 7 == 0 && hi == 0); - const byte = (hasNext ? shift | 128 : shift) & 255; - bytes.push(byte); - if (!hasNext) return; - } - const splitBits = lo >>> 28 & 15 | (hi & 7) << 4; - const hasMoreBits = !(hi >> 3 == 0); - bytes.push((hasMoreBits ? splitBits | 128 : splitBits) & 255); - if (!hasMoreBits) return; - for (let i = 3; i < 31; i = i + 7) { - const shift = hi >>> i; - const hasNext = !(shift >>> 7 == 0); - const byte = (hasNext ? shift | 128 : shift) & 255; - bytes.push(byte); - if (!hasNext) return; + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; + /** + * Converts the given resource types to a string. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + */ + toString() { + const resourceTypes = []; + if (this.service) resourceTypes.push("s"); + if (this.container) resourceTypes.push("c"); + if (this.object) resourceTypes.push("o"); + return resourceTypes.join(""); } - bytes.push(hi >>> 31 & 1); - } - exports.varint64write = varint64write; - const TWO_PWR_32_DBL$1 = 65536 * 65536; + }; + exports.AccountSASResourceTypes = AccountSASResourceTypes; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AccountSASServices = void 0; /** - * Parse decimal string of 64 bit integer value as two JS numbers. - * - * Returns tuple: - * [0]: minus sign? - * [1]: low bits - * [2]: high bits + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * Copyright 2008 Google Inc. + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. */ - function int64fromString(dec) { - let minus = dec[0] == "-"; - if (minus) dec = dec.slice(1); - const base = 1e6; - let lowBits = 0; - let highBits = 0; - function add1e6digit(begin, end) { - const digit1e6 = Number(dec.slice(begin, end)); - highBits *= base; - lowBits = lowBits * base + digit1e6; - if (lowBits >= TWO_PWR_32_DBL$1) { - highBits = highBits + (lowBits / TWO_PWR_32_DBL$1 | 0); - lowBits = lowBits % TWO_PWR_32_DBL$1; + var AccountSASServices = class AccountSASServices { + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @param services - + */ + static parse(services) { + const accountSASServices = new AccountSASServices(); + for (const c of services) switch (c) { + case "b": + accountSASServices.blob = true; + break; + case "f": + accountSASServices.file = true; + break; + case "q": + accountSASServices.queue = true; + break; + case "t": + accountSASServices.table = true; + break; + default: throw new RangeError(`Invalid service character: ${c}`); } + return accountSASServices; } - add1e6digit(-24, -18); - add1e6digit(-18, -12); - add1e6digit(-12, -6); - add1e6digit(-6); - return [ - minus, - lowBits, - highBits - ]; - } - exports.int64fromString = int64fromString; - /** - * Format 64 bit integer value (as two JS numbers) to decimal string. - * - * Copyright 2008 Google Inc. - */ - function int64toString(bitsLow, bitsHigh) { - if (bitsHigh >>> 0 <= 2097151) return "" + (TWO_PWR_32_DBL$1 * bitsHigh + (bitsLow >>> 0)); - let low = bitsLow & 16777215; - let mid = (bitsLow >>> 24 | bitsHigh << 8) >>> 0 & 16777215; - let high = bitsHigh >> 16 & 65535; - let digitA = low + mid * 6777216 + high * 6710656; - let digitB = mid + high * 8147497; - let digitC = high * 2; - let base = 1e7; - if (digitA >= base) { - digitB += Math.floor(digitA / base); - digitA %= base; - } - if (digitB >= base) { - digitC += Math.floor(digitB / base); - digitB %= base; - } - function decimalFrom1e7(digit1e7, needLeadingZeros) { - let partial = digit1e7 ? String(digit1e7) : ""; - if (needLeadingZeros) return "0000000".slice(partial.length) + partial; - return partial; + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; + /** + * Converts the given services to a string. + * + */ + toString() { + const services = []; + if (this.blob) services.push("b"); + if (this.table) services.push("t"); + if (this.queue) services.push("q"); + if (this.file) services.push("f"); + return services.join(""); } - return decimalFrom1e7( - digitC, - /*needLeadingZeros=*/ - 0 -) + decimalFrom1e7( - digitB, - /*needLeadingZeros=*/ - digitC -) + decimalFrom1e7( - digitA, - /*needLeadingZeros=*/ - 1 -); - } - exports.int64toString = int64toString; + }; + exports.AccountSASServices = AccountSASServices; +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + const AccountSASPermissions_js_1 = require_AccountSASPermissions(); + const AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + const AccountSASServices_js_1 = require_AccountSASServices(); + const SasIPRange_js_1 = require_SasIPRange(); + const SASQueryParameters_js_1 = require_SASQueryParameters(); + const constants_js_1 = require_constants$1(); + const utils_common_js_1 = require_utils_common$1(); /** - * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)` + * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * Copyright 2008 Google Inc. All rights reserved. + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. * - * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144 + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + * @param accountSASSignatureValues - + * @param sharedKeyCredential - */ - function varint32write(value, bytes) { - if (value >= 0) { - while (value > 127) { - bytes.push(value & 127 | 128); - value = value >>> 7; - } - bytes.push(value); - } else { - for (let i = 0; i < 9; i++) { - bytes.push(value & 127 | 128); - value = value >> 7; - } - bytes.push(1); - } + function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { + return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } - exports.varint32write = varint32write; + function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + let stringToSign; + if (version >= "2020-12-06") stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", + "" + ].join("\n"); + else stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + stringToSign + }; + } +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BlobServiceClient = void 0; + const core_auth_1 = require_commonjs$8(); + const core_rest_pipeline_1 = require_commonjs$9(); + const core_util_1 = require_commonjs$11(); + const Pipeline_js_1 = require_Pipeline(); + const ContainerClient_js_1 = require_ContainerClient(); + const utils_common_js_1 = require_utils_common$1(); + const storage_common_1 = require_commonjs$4(); + const utils_common_js_2 = require_utils_common$1(); + const tracing_js_1 = require_tracing(); + const BlobBatchClient_js_1 = require_BlobBatchClient(); + const StorageClient_js_1 = require_StorageClient(); + const AccountSASPermissions_js_1 = require_AccountSASPermissions(); + const AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + const AccountSASServices_js_1 = require_AccountSASServices(); /** - * Read an unsigned 32 bit varint. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220 + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. */ - function varint32read() { - let b = this.buf[this.pos++]; - let result = b & 127; - if ((b & 128) == 0) { - this.assertBounds(); - return result; + var BlobServiceClient = class BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param options - Optional. Options to configure the HTTP pipeline. + */ + static fromConnectionString(connectionString, options) { + options = options || {}; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); + if (extractedCreds.kind === "AccountConnString") if (core_util_1.isNodeLike) { + const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (!options.proxyOptions) options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + return new BlobServiceClient(extractedCreds.url, pipeline); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + const pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } - b = this.buf[this.pos++]; - result |= (b & 127) << 7; - if ((b & 128) == 0) { - this.assertBounds(); - return result; + constructor(url, credentialOrPipeline, options) { + let pipeline; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) pipeline = credentialOrPipeline; + else if (core_util_1.isNodeLike && credentialOrPipeline instanceof storage_common_1.StorageSharedKeyCredential || credentialOrPipeline instanceof storage_common_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); + else pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_1.AnonymousCredential(), options); + super(url, pipeline); + this.serviceContext = this.storageClientContext.service; } - b = this.buf[this.pos++]; - result |= (b & 127) << 14; - if ((b & 128) == 0) { - this.assertBounds(); - return result; + /** + * Creates a {@link ContainerClient} object + * + * @param containerName - A container name + * @returns A new ContainerClient object for the given container name. + * + * Example usage: + * + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + getContainerClient(containerName) { + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } - b = this.buf[this.pos++]; - result |= (b & 127) << 21; - if ((b & 128) == 0) { - this.assertBounds(); - return result; + /** + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container + * + * @param containerName - Name of the container to create. + * @param options - Options to configure Container Create operation. + * @returns Container creation response and the corresponding container client. + */ + async createContainer(containerName, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(containerName); + return { + containerClient, + containerCreateResponse: await containerClient.create(updatedOptions) + }; + }); } - b = this.buf[this.pos++]; - result |= (b & 15) << 28; - for (let readBytes = 5; (b & 128) !== 0 && readBytes < 10; readBytes++) b = this.buf[this.pos++]; - if ((b & 128) != 0) throw new Error("invalid varint"); - this.assertBounds(); - return result >>> 0; - } - exports.varint32read = varint32read; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js -var require_pb_long = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PbLong = exports.PbULong = exports.detectBi = void 0; - const goog_varint_1$2 = require_goog_varint(); - let BI; - function detectBi() { - const dv = new DataView(new ArrayBuffer(8)); - const ok = globalThis.BigInt !== void 0 && typeof dv.getBigInt64 === "function" && typeof dv.getBigUint64 === "function" && typeof dv.setBigInt64 === "function" && typeof dv.setBigUint64 === "function"; - BI = ok ? { - MIN: BigInt("-9223372036854775808"), - MAX: BigInt("9223372036854775807"), - UMIN: BigInt("0"), - UMAX: BigInt("18446744073709551615"), - C: BigInt, - V: dv - } : void 0; - } - exports.detectBi = detectBi; - detectBi(); - function assertBi(bi) { - if (!bi) throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support"); - } - const RE_DECIMAL_STR = /^-?[0-9]+$/; - const TWO_PWR_32_DBL = 4294967296; - const HALF_2_PWR_32 = 2147483648; - var SharedPbLong = class { /** - * Create a new instance with the given bits. + * Deletes a Blob container. + * + * @param containerName - Name of the container to delete. + * @param options - Options to configure Container Delete operation. + * @returns Container deletion response. */ - constructor(lo, hi) { - this.lo = lo | 0; - this.hi = hi | 0; + async deleteContainer(containerName, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return this.getContainerClient(containerName).delete(updatedOptions); + }); } /** - * Is this instance equal to 0? + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param deletedContainerName - Name of the previously deleted container. + * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. + * @param options - Options to configure Container Restore operation. + * @returns Container deletion response. */ - isZero() { - return this.lo == 0 && this.hi == 0; + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); + const containerContext = containerClient["storageClientContext"].container; + return { + containerClient, + containerUndeleteResponse: (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, + tracingOptions: updatedOptions.tracingOptions + })) + }; + }); } /** - * Convert to a native number. + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties + * + * @param options - Options to the Service Get Properties operation. + * @returns Response data for the Service Get Properties operation. */ - toNumber() { - let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0); - if (!Number.isSafeInteger(result)) throw new Error("cannot convert to safe number"); - return result; + async getProperties(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); } - }; - /** - * 64-bit unsigned integer as two 32-bit values. - * Converts between `string`, `number` and `bigint` representations. - */ - var PbULong = class PbULong extends SharedPbLong { /** - * Create instance from a `string`, `number` or `bigint`. + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties + * + * @param properties - + * @param options - Options to the Service Set Properties operation. + * @returns Response data for the Service Set Properties operation. */ - static from(value) { - if (BI) switch (typeof value) { - case "string": - if (value == "0") return this.ZERO; - if (value == "") throw new Error("string is no integer"); - value = BI.C(value); - case "number": - if (value === 0) return this.ZERO; - value = BI.C(value); - case "bigint": - if (!value) return this.ZERO; - if (value < BI.UMIN) throw new Error("signed value for ulong"); - if (value > BI.UMAX) throw new Error("ulong too large"); - BI.V.setBigUint64(0, value, true); - return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true)); - } - else switch (typeof value) { - case "string": - if (value == "0") return this.ZERO; - value = value.trim(); - if (!RE_DECIMAL_STR.test(value)) throw new Error("string is no integer"); - let [minus, lo, hi] = goog_varint_1$2.int64fromString(value); - if (minus) throw new Error("signed value for ulong"); - return new PbULong(lo, hi); - case "number": - if (value == 0) return this.ZERO; - if (!Number.isSafeInteger(value)) throw new Error("number is no integer"); - if (value < 0) throw new Error("signed value for ulong"); - return new PbULong(value, value / TWO_PWR_32_DBL); - } - throw new Error("unknown value " + typeof value); + async setProperties(properties, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Convert to decimal string. + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats + * + * @param options - Options to the Service Get Statistics operation. + * @returns Response data for the Service Get Statistics operation. */ - toString() { - return BI ? this.toBigInt().toString() : goog_varint_1$2.int64toString(this.lo, this.hi); + async getStatistics(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); } /** - * Convert to native bigint. + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. */ - toBigInt() { - assertBi(BI); - BI.V.setInt32(0, this.lo, true); - BI.V.setInt32(4, this.hi, true); - return BI.V.getBigUint64(0, true); + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); } - }; - exports.PbULong = PbULong; - /** - * ulong 0 singleton. - */ - PbULong.ZERO = new PbULong(0, 0); - /** - * 64-bit signed integer as two 32-bit values. - * Converts between `string`, `number` and `bigint` representations. - */ - var PbLong = class PbLong extends SharedPbLong { /** - * Create instance from a `string`, `number` or `bigint`. + * Returns a list of the containers under the specified account. + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to the Service List Container Segment operation. + * @returns Response data for the Service List Container Segment operation. + */ + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions + })); + return { + ...response, + _response: response._response, + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) tagValue = blob.tags.blobTagSet[0].value; + return { + ...blob, + tags: (0, utils_common_js_1.toTags)(blob.tags), + tagValue + }; + }) + }; + }); + } + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) yield* segment.blobs; + } + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties + * + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Use iter.next() to iterate the blobs + * i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Use paging with a marker + * i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + const listSegmentOptions = { ...options }; + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); + } + }; + } + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list containers operation. + */ + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } + /** + * Returns an AsyncIterableIterator for Container Items + * + * @param options - Options to list containers operation. + */ + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) yield* segment.containerItems; + } + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * + * // Use iter.next() to iterate the containers + * i = 1; + * const iter = blobServiceClient.listContainers(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Use paging with a marker + * i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param options - Options to list containers. + * @returns An asyncIterableIterator that supports paging. */ - static from(value) { - if (BI) switch (typeof value) { - case "string": - if (value == "0") return this.ZERO; - if (value == "") throw new Error("string is no integer"); - value = BI.C(value); - case "number": - if (value === 0) return this.ZERO; - value = BI.C(value); - case "bigint": - if (!value) return this.ZERO; - if (value < BI.MIN) throw new Error("signed long too small"); - if (value > BI.MAX) throw new Error("signed long too large"); - BI.V.setBigInt64(0, value, true); - return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true)); - } - else switch (typeof value) { - case "string": - if (value == "0") return this.ZERO; - value = value.trim(); - if (!RE_DECIMAL_STR.test(value)) throw new Error("string is no integer"); - let [minus, lo, hi] = goog_varint_1$2.int64fromString(value); - if (minus) { - if (hi > HALF_2_PWR_32 || hi == HALF_2_PWR_32 && lo != 0) throw new Error("signed long too small"); - } else if (hi >= HALF_2_PWR_32) throw new Error("signed long too large"); - let pbl = new PbLong(lo, hi); - return minus ? pbl.negate() : pbl; - case "number": - if (value == 0) return this.ZERO; - if (!Number.isSafeInteger(value)) throw new Error("number is no integer"); - return value > 0 ? new PbLong(value, value / TWO_PWR_32_DBL) : new PbLong(-value, -value / TWO_PWR_32_DBL).negate(); - } - throw new Error("unknown value " + typeof value); + listContainers(options = {}) { + if (options.prefix === "") options.prefix = void 0; + const include = []; + if (options.includeDeleted) include.push("deleted"); + if (options.includeMetadata) include.push("metadata"); + if (options.includeSystem) include.push("system"); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItems(listSegmentOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); + } + }; } /** - * Do we have a minus sign? + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key + * + * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time + * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - isNegative() { - return (this.hi & HALF_2_PWR_32) !== 0; + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) + }, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + const userDelegationKey = { + signedObjectId: response.signedObjectId, + signedTenantId: response.signedTenantId, + signedStartsOn: new Date(response.signedStartsOn), + signedExpiresOn: new Date(response.signedExpiresOn), + signedService: response.signedService, + signedVersion: response.signedVersion, + value: response.value + }; + return { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; + }); } /** - * Negate two's complement. - * Invert all the bits and add one to the result. + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this service. */ - negate() { - let hi = ~this.hi, lo = this.lo; - if (lo) lo = ~lo + 1; - else hi += 1; - return new PbLong(lo, hi); + getBlobBatchClient() { + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** - * Convert to decimal string. + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - toString() { - if (BI) return this.toBigInt().toString(); - if (this.isNegative()) { - let n = this.negate(); - return "-" + goog_varint_1$2.int64toString(n.lo, n.hi); + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + if (expiresOn === void 0) { + const now = /* @__PURE__ */ new Date(); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return goog_varint_1$2.int64toString(this.lo, this.hi); + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ + permissions, + expiresOn, + resourceTypes, + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** - * Convert to native bigint. + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - toBigInt() { - assertBi(BI); - BI.V.setInt32(0, this.lo, true); - BI.V.setInt32(4, this.hi, true); - return BI.V.getBigInt64(0, true); + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + if (expiresOn === void 0) { + const now = /* @__PURE__ */ new Date(); + expiresOn = new Date(now.getTime() + 3600 * 1e3); + } + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ + permissions, + expiresOn, + resourceTypes, + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports.PbLong = PbLong; - /** - * long 0 singleton. - */ - PbLong.ZERO = new PbLong(0, 0); -} }); + exports.BlobServiceClient = BlobServiceClient; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-reader.js -var require_binary_reader = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-reader.js"(exports) { +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.BinaryReader = exports.binaryReadOptions = void 0; - const binary_format_contract_1$3 = require_binary_format_contract(); - const pb_long_1$6 = require_pb_long(); - const goog_varint_1$1 = require_goog_varint(); - const defaultsRead$1 = { - readUnknownField: true, - readerFactory: (bytes) => new BinaryReader(bytes) - }; - /** - * Make options for reading binary data form partial options. - */ - function binaryReadOptions(options) { - return options ? Object.assign(Object.assign({}, defaultsRead$1), options) : defaultsRead$1; - } - exports.binaryReadOptions = binaryReadOptions; - var BinaryReader = class { - constructor(buf, textDecoder) { - this.varint64 = goog_varint_1$1.varint64read; - /** - * Read a `uint32` field, an unsigned 32 bit varint. - */ - this.uint32 = goog_varint_1$1.varint32read; - this.buf = buf; - this.len = buf.length; - this.pos = 0; - this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); - this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder("utf-8", { - fatal: true, - ignoreBOM: true - }); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.KnownEncryptionAlgorithmType = void 0; + /** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType) { + KnownEncryptionAlgorithmType["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); +})); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.31.0/node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs$2 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logger = exports.RestError = exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = exports.StorageSharedKeyCredentialPolicy = exports.StorageSharedKeyCredential = exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = exports.Credential = exports.CredentialPolicy = exports.BaseRequestPolicy = exports.AnonymousCredentialPolicy = exports.AnonymousCredential = exports.StorageOAuthScopes = exports.newPipeline = exports.isPipelineLike = exports.Pipeline = exports.getBlobServiceAccountAudience = exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTier = exports.generateBlobSASQueryParameters = exports.generateAccountSASQueryParameters = void 0; + const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + const core_rest_pipeline_1 = require_commonjs$9(); + Object.defineProperty(exports, "RestError", { + enumerable: true, + get: function() { + return core_rest_pipeline_1.RestError; + } + }); + tslib_1.__exportStar(require_BlobServiceClient(), exports); + tslib_1.__exportStar(require_Clients(), exports); + tslib_1.__exportStar(require_ContainerClient(), exports); + tslib_1.__exportStar(require_BlobLeaseClient(), exports); + tslib_1.__exportStar(require_AccountSASPermissions(), exports); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports); + tslib_1.__exportStar(require_AccountSASServices(), exports); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports, "generateAccountSASQueryParameters", { + enumerable: true, + get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; } - /** - * Reads a tag - field number and wire type. - */ - tag() { - let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7; - if (fieldNo <= 0 || wireType < 0 || wireType > 5) throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType); - return [fieldNo, wireType]; + }); + tslib_1.__exportStar(require_BlobBatch(), exports); + tslib_1.__exportStar(require_BlobBatchClient(), exports); + tslib_1.__exportStar(require_BatchResponse(), exports); + tslib_1.__exportStar(require_BlobSASPermissions(), exports); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports, "generateBlobSASQueryParameters", { + enumerable: true, + get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; } - /** - * Skip one element on the wire and return the skipped data. - * Supports WireType.StartGroup since v2.0.0-alpha.23. - */ - skip(wireType) { - let start = this.pos; - switch (wireType) { - case binary_format_contract_1$3.WireType.Varint: - while (this.buf[this.pos++] & 128); - break; - case binary_format_contract_1$3.WireType.Bit64: this.pos += 4; - case binary_format_contract_1$3.WireType.Bit32: - this.pos += 4; - break; - case binary_format_contract_1$3.WireType.LengthDelimited: - let len = this.uint32(); - this.pos += len; - break; - case binary_format_contract_1$3.WireType.StartGroup: - let t; - while ((t = this.tag()[1]) !== binary_format_contract_1$3.WireType.EndGroup) this.skip(t); - break; - default: throw new Error("cant skip wire type " + wireType); - } - this.assertBounds(); - return this.buf.subarray(start, this.pos); + }); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports); + var models_js_1 = require_models(); + Object.defineProperty(exports, "BlockBlobTier", { + enumerable: true, + get: function() { + return models_js_1.BlockBlobTier; } - /** - * Throws error if position in byte array is out of range. - */ - assertBounds() { - if (this.pos > this.len) throw new RangeError("premature EOF"); + }); + Object.defineProperty(exports, "PremiumPageBlobTier", { + enumerable: true, + get: function() { + return models_js_1.PremiumPageBlobTier; } - /** - * Read a `int32` field, a signed 32 bit varint. - */ - int32() { - return this.uint32() | 0; + }); + Object.defineProperty(exports, "StorageBlobAudience", { + enumerable: true, + get: function() { + return models_js_1.StorageBlobAudience; } - /** - * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint. - */ - sint32() { - let zze = this.uint32(); - return zze >>> 1 ^ -(zze & 1); + }); + Object.defineProperty(exports, "getBlobServiceAccountAudience", { + enumerable: true, + get: function() { + return models_js_1.getBlobServiceAccountAudience; } - /** - * Read a `int64` field, a signed 64-bit varint. - */ - int64() { - return new pb_long_1$6.PbLong(...this.varint64()); + }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports, "Pipeline", { + enumerable: true, + get: function() { + return Pipeline_js_1.Pipeline; } - /** - * Read a `uint64` field, an unsigned 64-bit varint. - */ - uint64() { - return new pb_long_1$6.PbULong(...this.varint64()); + }); + Object.defineProperty(exports, "isPipelineLike", { + enumerable: true, + get: function() { + return Pipeline_js_1.isPipelineLike; } - /** - * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint. - */ - sint64() { - let [lo, hi] = this.varint64(); - let s$1 = -(lo & 1); - lo = (lo >>> 1 | (hi & 1) << 31) ^ s$1; - hi = hi >>> 1 ^ s$1; - return new pb_long_1$6.PbLong(lo, hi); + }); + Object.defineProperty(exports, "newPipeline", { + enumerable: true, + get: function() { + return Pipeline_js_1.newPipeline; } - /** - * Read a `bool` field, a variant. - */ - bool() { - let [lo, hi] = this.varint64(); - return lo !== 0 || hi !== 0; + }); + Object.defineProperty(exports, "StorageOAuthScopes", { + enumerable: true, + get: function() { + return Pipeline_js_1.StorageOAuthScopes; } - /** - * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer. - */ - fixed32() { - return this.view.getUint32((this.pos += 4) - 4, true); + }); + var storage_common_1 = require_commonjs$4(); + Object.defineProperty(exports, "AnonymousCredential", { + enumerable: true, + get: function() { + return storage_common_1.AnonymousCredential; + } + }); + Object.defineProperty(exports, "AnonymousCredentialPolicy", { + enumerable: true, + get: function() { + return storage_common_1.AnonymousCredentialPolicy; + } + }); + Object.defineProperty(exports, "BaseRequestPolicy", { + enumerable: true, + get: function() { + return storage_common_1.BaseRequestPolicy; + } + }); + Object.defineProperty(exports, "CredentialPolicy", { + enumerable: true, + get: function() { + return storage_common_1.CredentialPolicy; + } + }); + Object.defineProperty(exports, "Credential", { + enumerable: true, + get: function() { + return storage_common_1.Credential; + } + }); + Object.defineProperty(exports, "StorageRetryPolicyType", { + enumerable: true, + get: function() { + return storage_common_1.StorageRetryPolicyType; + } + }); + Object.defineProperty(exports, "StorageRetryPolicy", { + enumerable: true, + get: function() { + return storage_common_1.StorageRetryPolicy; + } + }); + Object.defineProperty(exports, "StorageRetryPolicyFactory", { + enumerable: true, + get: function() { + return storage_common_1.StorageRetryPolicyFactory; + } + }); + Object.defineProperty(exports, "StorageSharedKeyCredential", { + enumerable: true, + get: function() { + return storage_common_1.StorageSharedKeyCredential; + } + }); + Object.defineProperty(exports, "StorageSharedKeyCredentialPolicy", { + enumerable: true, + get: function() { + return storage_common_1.StorageSharedKeyCredentialPolicy; + } + }); + Object.defineProperty(exports, "StorageBrowserPolicy", { + enumerable: true, + get: function() { + return storage_common_1.StorageBrowserPolicy; + } + }); + Object.defineProperty(exports, "StorageBrowserPolicyFactory", { + enumerable: true, + get: function() { + return storage_common_1.StorageBrowserPolicyFactory; + } + }); + tslib_1.__exportStar(require_SASQueryParameters(), exports); + tslib_1.__exportStar(require_generatedModels(), exports); + var log_js_1 = require_log$1(); + Object.defineProperty(exports, "logger", { + enumerable: true, + get: function() { + return log_js_1.logger; + } + }); +})); + +//#endregion +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/shared/errors.js +var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RateLimitError = exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.CacheNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0; + var FilesNotFoundError = class extends Error { + constructor(files = []) { + let message = "No files were found to upload"; + if (files.length > 0) message += `: ${files.join(", ")}`; + super(message); + this.files = files; + this.name = "FilesNotFoundError"; + } + }; + exports.FilesNotFoundError = FilesNotFoundError; + var InvalidResponseError = class extends Error { + constructor(message) { + super(message); + this.name = "InvalidResponseError"; + } + }; + exports.InvalidResponseError = InvalidResponseError; + var CacheNotFoundError = class extends Error { + constructor(message = "Cache not found") { + super(message); + this.name = "CacheNotFoundError"; + } + }; + exports.CacheNotFoundError = CacheNotFoundError; + var GHESNotSupportedError = class extends Error { + constructor(message = "@actions/cache v4.1.4+, actions/cache/save@v4+ and actions/cache/restore@v4+ are not currently supported on GHES.") { + super(message); + this.name = "GHESNotSupportedError"; + } + }; + exports.GHESNotSupportedError = GHESNotSupportedError; + var NetworkError = class extends Error { + constructor(code) { + const message = `Unable to make request: ${code}\nIf you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`; + super(message); + this.code = code; + this.name = "NetworkError"; + } + }; + exports.NetworkError = NetworkError; + NetworkError.isNetworkErrorCode = (code) => { + if (!code) return false; + return [ + "ECONNRESET", + "ENOTFOUND", + "ETIMEDOUT", + "ECONNREFUSED", + "EHOSTUNREACH" + ].includes(code); + }; + var UsageError = class extends Error { + constructor() { + super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`); + this.name = "UsageError"; + } + }; + exports.UsageError = UsageError; + UsageError.isUsageErrorMessage = (msg) => { + if (!msg) return false; + return msg.includes("insufficient usage"); + }; + var RateLimitError = class extends Error { + constructor(message) { + super(message); + this.name = "RateLimitError"; + } + }; + exports.RateLimitError = RateLimitError; +})); + +//#endregion +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/uploadUtils.js +var require_uploadUtils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.UploadProgress = void 0; + exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + const core = __importStar(require_core()); + const storage_blob_1 = require_commonjs$2(); + const errors_1 = require_errors(); + /** + * Class for tracking the upload state and displaying stats. + */ + var UploadProgress = class { + constructor(contentLength) { + this.contentLength = contentLength; + this.sentBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); } /** - * Read a `sfixed32` field, a signed, fixed-length 32-bit integer. + * Sets the number of bytes sent + * + * @param sentBytes the number of bytes sent */ - sfixed32() { - return this.view.getInt32((this.pos += 4) - 4, true); + setSentBytes(sentBytes) { + this.sentBytes = sentBytes; } /** - * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer. + * Returns the total number of bytes transferred. */ - fixed64() { - return new pb_long_1$6.PbULong(this.sfixed32(), this.sfixed32()); + getTransferredBytes() { + return this.sentBytes; } /** - * Read a `fixed64` field, a signed, fixed-length 64-bit integer. + * Returns true if the upload is complete. */ - sfixed64() { - return new pb_long_1$6.PbLong(this.sfixed32(), this.sfixed32()); + isDone() { + return this.getTransferredBytes() === this.contentLength; } /** - * Read a `float` field, 32-bit floating point number. + * Prints the current upload stats. Once the upload completes, this will print one + * last line and then stop. */ - float() { - return this.view.getFloat32((this.pos += 4) - 4, true); + display() { + if (this.displayedComplete) return; + const transferredBytes = this.sentBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); + core.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + if (this.isDone()) this.displayedComplete = true; } /** - * Read a `double` field, a 64-bit floating point number. + * Returns a function used to handle TransferProgressEvents. */ - double() { - return this.view.getFloat64((this.pos += 8) - 8, true); + onProgress() { + return (progress) => { + this.setSentBytes(progress.loadedBytes); + }; } /** - * Read a `bytes` field, length-delimited arbitrary data. - */ - bytes() { - let len = this.uint32(); - let start = this.pos; - this.pos += len; - this.assertBounds(); - return this.buf.subarray(start, start + len); + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs = 1e3) { + const displayCallback = () => { + this.display(); + if (!this.isDone()) this.timeoutHandle = setTimeout(displayCallback, delayInMs); + }; + this.timeoutHandle = setTimeout(displayCallback, delayInMs); } /** - * Read a `string` field, length-delimited data converted to UTF-8 text. + * Stops the timer that displays the stats. As this typically indicates the upload + * is complete, this will display one last line, unless the last line has already + * been written. */ - string() { - return this.textDecoder.decode(this.bytes()); + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = void 0; + } + this.display(); } }; - exports.BinaryReader = BinaryReader; -} }); + exports.UploadProgress = UploadProgress; + /** + * Uploads a cache archive directly to Azure Blob Storage using the Azure SDK. + * This function will display progress information to the console. Concurrency of the + * upload is determined by the calling functions. + * + * @param signedUploadURL + * @param archivePath + * @param options + * @returns + */ + function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + var _a; + const blobClient = new storage_blob_1.BlobClient(signedUploadURL); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); + const uploadOptions = { + blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, + concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + maxSingleShotSize: 128 * 1024 * 1024, + onProgress: uploadProgress.onProgress() + }; + try { + uploadProgress.startDisplayTimer(); + core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); + if (response._response.status >= 400) throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); + return response; + } catch (error) { + core.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error.message}`); + throw error; + } finally { + uploadProgress.stopDisplayTimer(); + } + }); + } +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/assert.js -var require_assert = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/assert.js"(exports) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/requestUtils.js +var require_requestUtils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0; - /** - * assert that condition is true or throw error (with message) - */ - function assert(condition, msg) { - if (!condition) throw new Error(msg); + exports.isSuccessStatusCode = isSuccessStatusCode; + exports.isServerErrorStatusCode = isServerErrorStatusCode; + exports.isRetryableStatusCode = isRetryableStatusCode; + exports.retry = retry; + exports.retryTypedResponse = retryTypedResponse; + exports.retryHttpClientResponse = retryHttpClientResponse; + const core = __importStar(require_core()); + const http_client_1 = require_lib(); + const constants_1 = require_constants$5(); + function isSuccessStatusCode(statusCode) { + if (!statusCode) return false; + return statusCode >= 200 && statusCode < 300; } - exports.assert = assert; - /** - * assert that value cannot exist = type `never`. throw runtime error if it does. - */ - function assertNever(value, msg) { - throw new Error(msg !== null && msg !== void 0 ? msg : "Unexpected object: " + value); + function isServerErrorStatusCode(statusCode) { + if (!statusCode) return true; + return statusCode >= 500; } - exports.assertNever = assertNever; - const FLOAT32_MAX = 34028234663852886e22, FLOAT32_MIN = -34028234663852886e22, UINT32_MAX = 4294967295, INT32_MAX = 2147483647, INT32_MIN = -2147483648; - function assertInt32(arg) { - if (typeof arg !== "number") throw new Error("invalid int 32: " + typeof arg); - if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN) throw new Error("invalid int 32: " + arg); + function isRetryableStatusCode(statusCode) { + if (!statusCode) return false; + return [ + http_client_1.HttpCodes.BadGateway, + http_client_1.HttpCodes.ServiceUnavailable, + http_client_1.HttpCodes.GatewayTimeout + ].includes(statusCode); } - exports.assertInt32 = assertInt32; - function assertUInt32(arg) { - if (typeof arg !== "number") throw new Error("invalid uint 32: " + typeof arg); - if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0) throw new Error("invalid uint 32: " + arg); + function sleep(milliseconds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); + }); } - exports.assertUInt32 = assertUInt32; - function assertFloat32(arg) { - if (typeof arg !== "number") throw new Error("invalid float 32: " + typeof arg); - if (!Number.isFinite(arg)) return; - if (arg > FLOAT32_MAX || arg < FLOAT32_MIN) throw new Error("invalid float 32: " + arg); + function retry(name_1, method_1, getStatusCode_1) { + return __awaiter(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { + let errorMessage = ""; + let attempt = 1; + while (attempt <= maxAttempts) { + let response = void 0; + let statusCode = void 0; + let isRetryable = false; + try { + response = yield method(); + } catch (error) { + if (onError) response = onError(error); + isRetryable = true; + errorMessage = error.message; + } + if (response) { + statusCode = getStatusCode(response); + if (!isServerErrorStatusCode(statusCode)) return response; + } + if (statusCode) { + isRetryable = isRetryableStatusCode(statusCode); + errorMessage = `Cache service responded with ${statusCode}`; + } + core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + if (!isRetryable) { + core.debug(`${name} - Error is not retryable`); + break; + } + yield sleep(delay); + attempt++; + } + throw Error(`${name} failed: ${errorMessage}`); + }); } - exports.assertFloat32 = assertFloat32; -} }); + function retryTypedResponse(name_1, method_1) { + return __awaiter(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { + return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay, (error) => { + if (error instanceof http_client_1.HttpClientError) return { + statusCode: error.statusCode, + result: null, + headers: {}, + error + }; + else return; + }); + }); + } + function retryHttpClientResponse(name_1, method_1) { + return __awaiter(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { + return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay); + }); + } +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-writer.js -var require_binary_writer = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-writer.js"(exports) { +//#region node_modules/.deno/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist/index.js +var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.BinaryWriter = exports.binaryWriteOptions = void 0; - const pb_long_1$5 = require_pb_long(); - const goog_varint_1 = require_goog_varint(); - const assert_1$7 = require_assert(); - const defaultsWrite$1 = { - writeUnknownFields: true, - writerFactory: () => new BinaryWriter() - }; + const listenersMap = /* @__PURE__ */ new WeakMap(); + const abortedMap = /* @__PURE__ */ new WeakMap(); /** - * Make options for writing binary data form partial options. + * An aborter instance implements AbortSignal interface, can abort HTTP requests. + * + * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. + * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation + * cannot or will not ever be cancelled. + * + * @example + * Abort without timeout + * ```ts + * await doAsyncWork(AbortSignal.none); + * ``` */ - function binaryWriteOptions(options) { - return options ? Object.assign(Object.assign({}, defaultsWrite$1), options) : defaultsWrite$1; - } - exports.binaryWriteOptions = binaryWriteOptions; - var BinaryWriter = class { - constructor(textEncoder) { + var AbortSignal = class AbortSignal { + constructor() { /** - * Previous fork states. + * onabort event listener. */ - this.stack = []; - this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder(); - this.chunks = []; - this.buf = []; + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); } /** - * Return all bytes written and reset this writer. + * Status of whether aborted or not. + * + * @readonly */ - finish() { - this.chunks.push(new Uint8Array(this.buf)); - let len = 0; - for (let i = 0; i < this.chunks.length; i++) len += this.chunks[i].length; - let bytes = new Uint8Array(len); - let offset = 0; - for (let i = 0; i < this.chunks.length; i++) { - bytes.set(this.chunks[i], offset); - offset += this.chunks[i].length; - } - this.chunks = []; - return bytes; + get aborted() { + if (!abortedMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); + return abortedMap.get(this); } /** - * Start a new fork for length-delimited data like a message - * or a packed repeated field. + * Creates a new AbortSignal instance that will never be aborted. * - * Must be joined later with `join()`. + * @readonly */ - fork() { - this.stack.push({ - chunks: this.chunks, - buf: this.buf - }); - this.chunks = []; - this.buf = []; - return this; + static get none() { + return new AbortSignal(); } /** - * Join the last fork. Write its length and bytes, then - * return to the previous state. + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added */ - join() { - let chunk = this.finish(); - let prev = this.stack.pop(); - if (!prev) throw new Error("invalid state, fork stack empty"); - this.chunks = prev.chunks; - this.buf = prev.buf; - this.uint32(chunk.byteLength); - return this.raw(chunk); + addEventListener(_type, listener) { + if (!listenersMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); + listenersMap.get(this).push(listener); } /** - * Writes a tag (field number and wire type). - * - * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`. + * Remove "abort" event listener, only support "abort" event. * - * Generated code should compute the tag ahead of time and call `uint32()`. + * @param _type - Only support "abort" event + * @param listener - The listener to be removed */ - tag(fieldNo, type) { - return this.uint32((fieldNo << 3 | type) >>> 0); + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) listeners.splice(index, 1); } /** - * Write a chunk of raw bytes. + * Dispatches a synthetic event to the AbortSignal. */ - raw(chunk) { - if (this.buf.length) { - this.chunks.push(new Uint8Array(this.buf)); - this.buf = []; - } - this.chunks.push(chunk); - return this; + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); } - /** - * Write a `uint32` value, an unsigned 32 bit varint. - */ - uint32(value) { - assert_1$7.assertUInt32(value); - while (value > 127) { - this.buf.push(value & 127 | 128); - value = value >>> 7; - } - this.buf.push(value); - return this; + }; + /** + * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. + * Will try to trigger abort event for all linked AbortSignal nodes. + * + * - If there is a timeout, the timer will be cancelled. + * - If aborted is true, nothing will happen. + * + * @internal + */ + function abortSignal(signal) { + if (signal.aborted) return; + if (signal.onabort) signal.onabort.call(signal); + const listeners = listenersMap.get(signal); + if (listeners) listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + abortedMap.set(signal, true); + } + /** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` + */ + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; } - /** - * Write a `int32` value, a signed 32 bit varint. - */ - int32(value) { - assert_1$7.assertInt32(value); - goog_varint_1.varint32write(value, this.buf); - return this; + }; + /** + * An AbortController provides an AbortSignal and the associated controls to signal + * that an asynchronous operation should be aborted. + * + * @example + * Abort an operation when another event fires + * ```ts + * const controller = new AbortController(); + * const signal = controller.signal; + * doAsyncWork(signal); + * button.addEventListener('click', () => controller.abort()); + * ``` + * + * @example + * Share aborter cross multiple operations in 30s + * ```ts + * // Upload the same data to 2 different data centers at the same time, + * // abort another when any of them is finished + * const controller = AbortController.withTimeout(30 * 1000); + * doAsyncWork(controller.signal).then(controller.abort); + * doAsyncWork(controller.signal).then(controller.abort); + *``` + * + * @example + * Cascaded aborting + * ```ts + * // All operations can't take more than 30 seconds + * const aborter = Aborter.timeout(30 * 1000); + * + * // Following 2 operations can't take more than 25 seconds + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * ``` + */ + var AbortController = class { + constructor(parentSignals) { + this._signal = new AbortSignal(); + if (!parentSignals) return; + if (!Array.isArray(parentSignals)) parentSignals = arguments; + for (const parentSignal of parentSignals) if (parentSignal.aborted) this.abort(); + else parentSignal.addEventListener("abort", () => { + this.abort(); + }); } /** - * Write a `bool` value, a variant. + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly */ - bool(value) { - this.buf.push(value ? 1 : 0); - return this; + get signal() { + return this._signal; } /** - * Write a `bytes` value, length-delimited arbitrary data. + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. */ - bytes(value) { - this.uint32(value.byteLength); - return this.raw(value); + abort() { + abortSignal(this._signal); } /** - * Write a `string` value, length-delimited data converted to UTF-8 text. + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. */ - string(value) { - let chunk = this.textEncoder.encode(value); - this.uint32(chunk.byteLength); - return this.raw(chunk); + static timeout(ms) { + const signal = new AbortSignal(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") timer.unref(); + return signal; } - /** - * Write a `float` value, 32-bit floating point number. - */ - float(value) { - assert_1$7.assertFloat32(value); - let chunk = new Uint8Array(4); - new DataView(chunk.buffer).setFloat32(0, value, true); - return this.raw(chunk); + }; + exports.AbortController = AbortController; + exports.AbortError = AbortError; + exports.AbortSignal = AbortSignal; +})); + +//#endregion +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/downloadUtils.js +var require_downloadUtils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - /** - * Write a `double` value, a 64-bit floating point number. - */ - double(value) { - let chunk = new Uint8Array(8); - new DataView(chunk.buffer).setFloat64(0, value, true); - return this.raw(chunk); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DownloadProgress = void 0; + exports.downloadCacheHttpClient = downloadCacheHttpClient; + exports.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports.downloadCacheStorageSDK = downloadCacheStorageSDK; + const core = __importStar(require_core()); + const http_client_1 = require_lib(); + const storage_blob_1 = require_commonjs$2(); + const buffer = __importStar(__require("buffer")); + const fs$1 = __importStar(__require("fs")); + const stream = __importStar(__require("stream")); + const util = __importStar(__require("util")); + const utils = __importStar(require_cacheUtils()); + const constants_1 = require_constants$5(); + const requestUtils_1 = require_requestUtils(); + const abort_controller_1 = require_dist(); + /** + * Pipes the body of a HTTP response to a stream + * + * @param response the HTTP response + * @param output the writable stream + */ + function pipeResponseToStream(response, output) { + return __awaiter(this, void 0, void 0, function* () { + yield util.promisify(stream.pipeline)(response.message, output); + }); + } + /** + * Class for tracking the download state and displaying stats. + */ + var DownloadProgress = class { + constructor(contentLength) { + this.contentLength = contentLength; + this.segmentIndex = 0; + this.segmentSize = 0; + this.segmentOffset = 0; + this.receivedBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); } /** - * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer. + * Progress to the next segment. Only call this method when the previous segment + * is complete. + * + * @param segmentSize the length of the next segment */ - fixed32(value) { - assert_1$7.assertUInt32(value); - let chunk = new Uint8Array(4); - new DataView(chunk.buffer).setUint32(0, value, true); - return this.raw(chunk); + nextSegment(segmentSize) { + this.segmentOffset = this.segmentOffset + this.segmentSize; + this.segmentIndex = this.segmentIndex + 1; + this.segmentSize = segmentSize; + this.receivedBytes = 0; + core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** - * Write a `sfixed32` value, a signed, fixed-length 32-bit integer. + * Sets the number of bytes received for the current segment. + * + * @param receivedBytes the number of bytes received */ - sfixed32(value) { - assert_1$7.assertInt32(value); - let chunk = new Uint8Array(4); - new DataView(chunk.buffer).setInt32(0, value, true); - return this.raw(chunk); + setReceivedBytes(receivedBytes) { + this.receivedBytes = receivedBytes; } /** - * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint. + * Returns the total number of bytes transferred. */ - sint32(value) { - assert_1$7.assertInt32(value); - value = (value << 1 ^ value >> 31) >>> 0; - goog_varint_1.varint32write(value, this.buf); - return this; + getTransferredBytes() { + return this.segmentOffset + this.receivedBytes; } /** - * Write a `fixed64` value, a signed, fixed-length 64-bit integer. + * Returns true if the download is complete. */ - sfixed64(value) { - let chunk = new Uint8Array(8); - let view = new DataView(chunk.buffer); - let long = pb_long_1$5.PbLong.from(value); - view.setInt32(0, long.lo, true); - view.setInt32(4, long.hi, true); - return this.raw(chunk); + isDone() { + return this.getTransferredBytes() === this.contentLength; } /** - * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer. + * Prints the current download stats. Once the download completes, this will print one + * last line and then stop. */ - fixed64(value) { - let chunk = new Uint8Array(8); - let view = new DataView(chunk.buffer); - let long = pb_long_1$5.PbULong.from(value); - view.setInt32(0, long.lo, true); - view.setInt32(4, long.hi, true); - return this.raw(chunk); + display() { + if (this.displayedComplete) return; + const transferredBytes = this.segmentOffset + this.receivedBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); + core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + if (this.isDone()) this.displayedComplete = true; } /** - * Write a `int64` value, a signed 64-bit varint. + * Returns a function used to handle TransferProgressEvents. */ - int64(value) { - let long = pb_long_1$5.PbLong.from(value); - goog_varint_1.varint64write(long.lo, long.hi, this.buf); - return this; + onProgress() { + return (progress) => { + this.setReceivedBytes(progress.loadedBytes); + }; } /** - * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint. + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write */ - sint64(value) { - let long = pb_long_1$5.PbLong.from(value), sign = long.hi >> 31, lo = long.lo << 1 ^ sign, hi = (long.hi << 1 | long.lo >>> 31) ^ sign; - goog_varint_1.varint64write(lo, hi, this.buf); - return this; + startDisplayTimer(delayInMs = 1e3) { + const displayCallback = () => { + this.display(); + if (!this.isDone()) this.timeoutHandle = setTimeout(displayCallback, delayInMs); + }; + this.timeoutHandle = setTimeout(displayCallback, delayInMs); } /** - * Write a `uint64` value, an unsigned 64-bit varint. + * Stops the timer that displays the stats. As this typically indicates the download + * is complete, this will display one last line, unless the last line has already + * been written. */ - uint64(value) { - let long = pb_long_1$5.PbULong.from(value); - goog_varint_1.varint64write(long.lo, long.hi, this.buf); - return this; + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = void 0; + } + this.display(); } }; - exports.BinaryWriter = BinaryWriter; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-format-contract.js -var require_json_format_contract = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-format-contract.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0; - const defaultsWrite = { - emitDefaultValues: false, - enumAsInteger: false, - useProtoFieldName: false, - prettySpaces: 0 - }, defaultsRead = { ignoreUnknownFields: false }; - /** - * Make options for reading JSON data from partial options. - */ - function jsonReadOptions(options) { - return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead; - } - exports.jsonReadOptions = jsonReadOptions; - /** - * Make options for writing JSON data from partial options. - */ - function jsonWriteOptions(options) { - return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite; - } - exports.jsonWriteOptions = jsonWriteOptions; - /** - * Merges JSON write or read options. Later values override earlier values. Type registries are merged. - */ - function mergeJsonOptions(a, b) { - var _a$2, _b$1; - let c = Object.assign(Object.assign({}, a), b); - c.typeRegistry = [...(_a$2 = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a$2 !== void 0 ? _a$2 : [], ...(_b$1 = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b$1 !== void 0 ? _b$1 : []]; - return c; - } - exports.mergeJsonOptions = mergeJsonOptions; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type-contract.js -var require_message_type_contract = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type-contract.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.MESSAGE_TYPE = void 0; - /** - * The symbol used as a key on message objects to store the message type. - * - * Note that this is an experimental feature - it is here to stay, but - * implementation details may change without notice. - */ - exports.MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type"); -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/lower-camel-case.js -var require_lower_camel_case = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/lower-camel-case.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.lowerCamelCase = void 0; - /** - * Converts snake_case to lowerCamelCase. - * - * Should behave like protoc: - * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118 - */ - function lowerCamelCase(snakeCase) { - let capNext = false; - const sb = []; - for (let i = 0; i < snakeCase.length; i++) { - let next = snakeCase.charAt(i); - if (next == "_") capNext = true; - else if (/\d/.test(next)) { - sb.push(next); - capNext = true; - } else if (capNext) { - sb.push(next.toUpperCase()); - capNext = false; - } else if (i == 0) sb.push(next.toLowerCase()); - else sb.push(next); - } - return sb.join(""); - } - exports.lowerCamelCase = lowerCamelCase; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-info.js -var require_reflection_info$1 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-info.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0; - const lower_camel_case_1$1 = require_lower_camel_case(); - /** - * Scalar value types. This is a subset of field types declared by protobuf - * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE - * are omitted, but the numerical values are identical. - */ - var ScalarType; - (function(ScalarType$1) { - ScalarType$1[ScalarType$1["DOUBLE"] = 1] = "DOUBLE"; - ScalarType$1[ScalarType$1["FLOAT"] = 2] = "FLOAT"; - ScalarType$1[ScalarType$1["INT64"] = 3] = "INT64"; - ScalarType$1[ScalarType$1["UINT64"] = 4] = "UINT64"; - ScalarType$1[ScalarType$1["INT32"] = 5] = "INT32"; - ScalarType$1[ScalarType$1["FIXED64"] = 6] = "FIXED64"; - ScalarType$1[ScalarType$1["FIXED32"] = 7] = "FIXED32"; - ScalarType$1[ScalarType$1["BOOL"] = 8] = "BOOL"; - ScalarType$1[ScalarType$1["STRING"] = 9] = "STRING"; - ScalarType$1[ScalarType$1["BYTES"] = 12] = "BYTES"; - ScalarType$1[ScalarType$1["UINT32"] = 13] = "UINT32"; - ScalarType$1[ScalarType$1["SFIXED32"] = 15] = "SFIXED32"; - ScalarType$1[ScalarType$1["SFIXED64"] = 16] = "SFIXED64"; - ScalarType$1[ScalarType$1["SINT32"] = 17] = "SINT32"; - ScalarType$1[ScalarType$1["SINT64"] = 18] = "SINT64"; - })(ScalarType = exports.ScalarType || (exports.ScalarType = {})); - /** - * JavaScript representation of 64 bit integral types. Equivalent to the - * field option "jstype". - * - * By default, protobuf-ts represents 64 bit types as `bigint`. - * - * You can change the default behaviour by enabling the plugin parameter - * `long_type_string`, which will represent 64 bit types as `string`. - * - * Alternatively, you can change the behaviour for individual fields - * with the field option "jstype": - * - * ```protobuf - * uint64 my_field = 1 [jstype = JS_STRING]; - * uint64 other_field = 2 [jstype = JS_NUMBER]; - * ``` - */ - var LongType; - (function(LongType$1) { - /** - * Use JavaScript `bigint`. - * - * Field option `[jstype = JS_NORMAL]`. - */ - LongType$1[LongType$1["BIGINT"] = 0] = "BIGINT"; - /** - * Use JavaScript `string`. - * - * Field option `[jstype = JS_STRING]`. - */ - LongType$1[LongType$1["STRING"] = 1] = "STRING"; - /** - * Use JavaScript `number`. - * - * Large values will loose precision. - * - * Field option `[jstype = JS_NUMBER]`. - */ - LongType$1[LongType$1["NUMBER"] = 2] = "NUMBER"; - })(LongType = exports.LongType || (exports.LongType = {})); - /** - * Protobuf 2.1.0 introduced packed repeated fields. - * Setting the field option `[packed = true]` enables packing. - * - * In proto3, all repeated fields are packed by default. - * Setting the field option `[packed = false]` disables packing. - * - * Packed repeated fields are encoded with a single tag, - * then a length-delimiter, then the element values. - * - * Unpacked repeated fields are encoded with a tag and - * value for each element. - * - * `bytes` and `string` cannot be packed. - */ - var RepeatType; - (function(RepeatType$1) { - /** - * The field is not repeated. - */ - RepeatType$1[RepeatType$1["NO"] = 0] = "NO"; - /** - * The field is repeated and should be packed. - * Invalid for `bytes` and `string`, they cannot be packed. - */ - RepeatType$1[RepeatType$1["PACKED"] = 1] = "PACKED"; - /** - * The field is repeated but should not be packed. - * The only valid repeat type for repeated `bytes` and `string`. - */ - RepeatType$1[RepeatType$1["UNPACKED"] = 2] = "UNPACKED"; - })(RepeatType = exports.RepeatType || (exports.RepeatType = {})); - /** - * Turns PartialFieldInfo into FieldInfo. - */ - function normalizeFieldInfo(field) { - var _a$2, _b$1, _c$1, _d$1; - field.localName = (_a$2 = field.localName) !== null && _a$2 !== void 0 ? _a$2 : lower_camel_case_1$1.lowerCamelCase(field.name); - field.jsonName = (_b$1 = field.jsonName) !== null && _b$1 !== void 0 ? _b$1 : lower_camel_case_1$1.lowerCamelCase(field.name); - field.repeat = (_c$1 = field.repeat) !== null && _c$1 !== void 0 ? _c$1 : RepeatType.NO; - field.opt = (_d$1 = field.opt) !== null && _d$1 !== void 0 ? _d$1 : field.repeat ? false : field.oneof ? false : field.kind == "message"; - return field; - } - exports.normalizeFieldInfo = normalizeFieldInfo; - /** - * Read custom field options from a generated message type. - * - * @deprecated use readFieldOption() - */ - function readFieldOptions(messageType, fieldName, extensionName, extensionType) { - var _a$2; - const options = (_a$2 = messageType.fields.find((m$1, i) => m$1.localName == fieldName || i == fieldName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; - return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; - } - exports.readFieldOptions = readFieldOptions; - function readFieldOption(messageType, fieldName, extensionName, extensionType) { - var _a$2; - const options = (_a$2 = messageType.fields.find((m$1, i) => m$1.localName == fieldName || i == fieldName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; - if (!options) return void 0; - const optionVal = options[extensionName]; - if (optionVal === void 0) return optionVal; - return extensionType ? extensionType.fromJson(optionVal) : optionVal; - } - exports.readFieldOption = readFieldOption; - function readMessageOption(messageType, extensionName, extensionType) { - const options = messageType.options; - const optionVal = options[extensionName]; - if (optionVal === void 0) return optionVal; - return extensionType ? extensionType.fromJson(optionVal) : optionVal; - } - exports.readMessageOption = readMessageOption; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/oneof.js -var require_oneof = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/oneof.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0; - /** - * Is the given value a valid oneof group? - * - * We represent protobuf `oneof` as algebraic data types (ADT) in generated - * code. But when working with messages of unknown type, the ADT does not - * help us. - * - * This type guard checks if the given object adheres to the ADT rules, which - * are as follows: - * - * 1) Must be an object. - * - * 2) Must have a "oneofKind" discriminator property. - * - * 3) If "oneofKind" is `undefined`, no member field is selected. The object - * must not have any other properties. - * - * 4) If "oneofKind" is a `string`, the member field with this name is - * selected. - * - * 5) If a member field is selected, the object must have a second property - * with this name. The property must not be `undefined`. - * - * 6) No extra properties are allowed. The object has either one property - * (no selection) or two properties (selection). - * - */ - function isOneofGroup(any) { - if (typeof any != "object" || any === null || !any.hasOwnProperty("oneofKind")) return false; - switch (typeof any.oneofKind) { - case "string": - if (any[any.oneofKind] === void 0) return false; - return Object.keys(any).length == 2; - case "undefined": return Object.keys(any).length == 1; - default: return false; - } - } - exports.isOneofGroup = isOneofGroup; - /** - * Returns the value of the given field in a oneof group. - */ - function getOneofValue(oneof, kind) { - return oneof[kind]; - } - exports.getOneofValue = getOneofValue; - function setOneofValue(oneof, kind, value) { - if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; - oneof.oneofKind = kind; - if (value !== void 0) oneof[kind] = value; - } - exports.setOneofValue = setOneofValue; - function setUnknownOneofValue(oneof, kind, value) { - if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; - oneof.oneofKind = kind; - if (value !== void 0 && kind !== void 0) oneof[kind] = value; - } - exports.setUnknownOneofValue = setUnknownOneofValue; + exports.DownloadProgress = DownloadProgress; /** - * Removes the selected field in a oneof group. - * - * Note that the recommended way to modify a oneof group is to set - * a new object: + * Download the cache using the Actions toolkit http-client * - * ```ts - * message.result = { oneofKind: undefined }; - * ``` + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved */ - function clearOneofValue(oneof) { - if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; - oneof.oneofKind = void 0; + function downloadCacheHttpClient(archiveLocation, archivePath) { + return __awaiter(this, void 0, void 0, function* () { + const writeStream = fs$1.createWriteStream(archivePath); + const httpClient = new http_client_1.HttpClient("actions/cache"); + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter(this, void 0, void 0, function* () { + return httpClient.get(archiveLocation); + })); + downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { + downloadResponse.message.destroy(); + core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + }); + yield pipeResponseToStream(downloadResponse, writeStream); + const contentLengthHeader = downloadResponse.message.headers["content-length"]; + if (contentLengthHeader) { + const expectedLength = parseInt(contentLengthHeader); + const actualLength = utils.getArchiveFileSizeInBytes(archivePath); + if (actualLength !== expectedLength) throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); + } else core.debug("Unable to validate download, no Content-Length header"); + }); } - exports.clearOneofValue = clearOneofValue; /** - * Returns the selected value of the given oneof group. - * - * Not that the recommended way to access a oneof group is to check - * the "oneofKind" property and let TypeScript narrow down the union - * type for you: - * - * ```ts - * if (message.result.oneofKind === "error") { - * message.result.error; // string - * } - * ``` + * Download the cache using the Actions toolkit http-client concurrently * - * In the rare case you just need the value, and do not care about - * which protobuf field is selected, you can use this function - * for convenience. + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved */ - function getSelectedOneofValue(oneof) { - if (oneof.oneofKind === void 0) return void 0; - return oneof[oneof.oneofKind]; - } - exports.getSelectedOneofValue = getSelectedOneofValue; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-type-check.js -var require_reflection_type_check = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-type-check.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ReflectionTypeCheck = void 0; - const reflection_info_1$11 = require_reflection_info$1(); - const oneof_1$1 = require_oneof(); - var ReflectionTypeCheck = class { - constructor(info) { - var _a$2; - this.fields = (_a$2 = info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; - } - prepare() { - if (this.data) return; - const req$1 = [], known = [], oneofs = []; - for (let field of this.fields) if (field.oneof) { - if (!oneofs.includes(field.oneof)) { - oneofs.push(field.oneof); - req$1.push(field.oneof); - known.push(field.oneof); - } - } else { - known.push(field.localName); - switch (field.kind) { - case "scalar": - case "enum": - if (!field.opt || field.repeat) req$1.push(field.localName); - break; - case "message": - if (field.repeat) req$1.push(field.localName); - break; - case "map": - req$1.push(field.localName); - break; + function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + var _a; + const archiveDescriptor = yield fs$1.promises.open(archivePath, "w"); + const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { + socketTimeout: options.timeoutInMs, + keepAlive: true + }); + try { + const lengthHeader = (yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter(this, void 0, void 0, function* () { + return yield httpClient.request("HEAD", archiveLocation, null, {}); + }))).message.headers["content-length"]; + if (lengthHeader === void 0 || lengthHeader === null) throw new Error("Content-Length not found on blob response"); + const length = parseInt(lengthHeader); + if (Number.isNaN(length)) throw new Error(`Could not interpret Content-Length: ${length}`); + const downloads = []; + const blockSize = 4 * 1024 * 1024; + for (let offset = 0; offset < length; offset += blockSize) { + const count = Math.min(blockSize, length - offset); + downloads.push({ + offset, + promiseGetter: () => __awaiter(this, void 0, void 0, function* () { + return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); + }) + }); } - } - this.data = { - req: req$1, - known, - oneofs: Object.values(oneofs) - }; - } - /** - * Is the argument a valid message as specified by the - * reflection information? - * - * Checks all field types recursively. The `depth` - * specifies how deep into the structure the check will be. - * - * With a depth of 0, only the presence of fields - * is checked. - * - * With a depth of 1 or more, the field types are checked. - * - * With a depth of 2 or more, the members of map, repeated - * and message fields are checked. - * - * Message fields will be checked recursively with depth - 1. - * - * The number of map entries / repeated values being checked - * is < depth. - */ - is(message, depth, allowExcessProperties = false) { - if (depth < 0) return true; - if (message === null || message === void 0 || typeof message != "object") return false; - this.prepare(); - let keys = Object.keys(message), data = this.data; - if (keys.length < data.req.length || data.req.some((n) => !keys.includes(n))) return false; - if (!allowExcessProperties) { - if (keys.some((k) => !data.known.includes(k))) return false; - } - if (depth < 1) return true; - for (const name of data.oneofs) { - const group = message[name]; - if (!oneof_1$1.isOneofGroup(group)) return false; - if (group.oneofKind === void 0) continue; - const field = this.fields.find((f) => f.localName === group.oneofKind); - if (!field) return false; - if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth)) return false; - } - for (const field of this.fields) { - if (field.oneof !== void 0) continue; - if (!this.field(message[field.localName], field, allowExcessProperties, depth)) return false; - } - return true; - } - field(arg, field, allowExcessProperties, depth) { - let repeated = field.repeat; - switch (field.kind) { - case "scalar": - if (arg === void 0) return field.opt; - if (repeated) return this.scalars(arg, field.T, depth, field.L); - return this.scalar(arg, field.T, field.L); - case "enum": - if (arg === void 0) return field.opt; - if (repeated) return this.scalars(arg, reflection_info_1$11.ScalarType.INT32, depth); - return this.scalar(arg, reflection_info_1$11.ScalarType.INT32); - case "message": - if (arg === void 0) return true; - if (repeated) return this.messages(arg, field.T(), allowExcessProperties, depth); - return this.message(arg, field.T(), allowExcessProperties, depth); - case "map": - if (typeof arg != "object" || arg === null) return false; - if (depth < 2) return true; - if (!this.mapKeys(arg, field.K, depth)) return false; - switch (field.V.kind) { - case "scalar": return this.scalars(Object.values(arg), field.V.T, depth, field.V.L); - case "enum": return this.scalars(Object.values(arg), reflection_info_1$11.ScalarType.INT32, depth); - case "message": return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth); - } - break; - } - return true; - } - message(arg, type, allowExcessProperties, depth) { - if (allowExcessProperties) return type.isAssignable(arg, depth); - return type.is(arg, depth); - } - messages(arg, type, allowExcessProperties, depth) { - if (!Array.isArray(arg)) return false; - if (depth < 2) return true; - if (allowExcessProperties) { - for (let i = 0; i < arg.length && i < depth; i++) if (!type.isAssignable(arg[i], depth - 1)) return false; - } else for (let i = 0; i < arg.length && i < depth; i++) if (!type.is(arg[i], depth - 1)) return false; - return true; - } - scalar(arg, type, longType) { - let argType = typeof arg; - switch (type) { - case reflection_info_1$11.ScalarType.UINT64: - case reflection_info_1$11.ScalarType.FIXED64: - case reflection_info_1$11.ScalarType.INT64: - case reflection_info_1$11.ScalarType.SFIXED64: - case reflection_info_1$11.ScalarType.SINT64: switch (longType) { - case reflection_info_1$11.LongType.BIGINT: return argType == "bigint"; - case reflection_info_1$11.LongType.NUMBER: return argType == "number" && !isNaN(arg); - default: return argType == "string"; + downloads.reverse(); + let actives = 0; + let bytesDownloaded = 0; + const progress = new DownloadProgress(length); + progress.startDisplayTimer(); + const progressFn = progress.onProgress(); + const activeDownloads = []; + let nextDownload; + const waitAndWrite = () => __awaiter(this, void 0, void 0, function* () { + const segment = yield Promise.race(Object.values(activeDownloads)); + yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); + actives--; + delete activeDownloads[segment.offset]; + bytesDownloaded += segment.count; + progressFn({ loadedBytes: bytesDownloaded }); + }); + while (nextDownload = downloads.pop()) { + activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); + actives++; + if (actives >= ((_a = options.downloadConcurrency) !== null && _a !== void 0 ? _a : 10)) yield waitAndWrite(); } - case reflection_info_1$11.ScalarType.BOOL: return argType == "boolean"; - case reflection_info_1$11.ScalarType.STRING: return argType == "string"; - case reflection_info_1$11.ScalarType.BYTES: return arg instanceof Uint8Array; - case reflection_info_1$11.ScalarType.DOUBLE: - case reflection_info_1$11.ScalarType.FLOAT: return argType == "number" && !isNaN(arg); - default: return argType == "number" && Number.isInteger(arg); + while (actives > 0) yield waitAndWrite(); + } finally { + httpClient.dispose(); + yield archiveDescriptor.close(); } - } - scalars(arg, type, depth, longType) { - if (!Array.isArray(arg)) return false; - if (depth < 2) return true; - if (Array.isArray(arg)) { - for (let i = 0; i < arg.length && i < depth; i++) if (!this.scalar(arg[i], type, longType)) return false; + }); + } + function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { + return __awaiter(this, void 0, void 0, function* () { + const retries = 5; + let failures = 0; + while (true) try { + const result = yield promiseWithTimeout(3e4, downloadSegment(httpClient, archiveLocation, offset, count)); + if (typeof result === "string") throw new Error("downloadSegmentRetry failed due to timeout"); + return result; + } catch (err) { + if (failures >= retries) throw err; + failures++; } - return true; - } - mapKeys(map, type, depth) { - let keys = Object.keys(map); - switch (type) { - case reflection_info_1$11.ScalarType.INT32: - case reflection_info_1$11.ScalarType.FIXED32: - case reflection_info_1$11.ScalarType.SFIXED32: - case reflection_info_1$11.ScalarType.SINT32: - case reflection_info_1$11.ScalarType.UINT32: return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); - case reflection_info_1$11.ScalarType.BOOL: return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); - default: return this.scalars(keys, type, depth, reflection_info_1$11.LongType.STRING); + }); + } + function downloadSegment(httpClient, archiveLocation, offset, count) { + return __awaiter(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter(this, void 0, void 0, function* () { + return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); + })); + if (!partRes.readBodyBuffer) throw new Error("Expected HttpClientResponse to implement readBodyBuffer"); + return { + offset, + count, + buffer: yield partRes.readBodyBuffer() + }; + }); + } + /** + * Download the cache using the Azure Storage SDK. Only call this method if the + * URL points to an Azure Storage endpoint. + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + * @param options the download options with the defaults set + */ + function downloadCacheStorageSDK(archiveLocation, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + var _a; + const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { tryTimeoutInMs: options.timeoutInMs } }); + const contentLength = (_a = (yield client.getProperties()).contentLength) !== null && _a !== void 0 ? _a : -1; + if (contentLength < 0) { + core.debug("Unable to determine content length, downloading file with http-client..."); + yield downloadCacheHttpClient(archiveLocation, archivePath); + } else { + const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); + const downloadProgress = new DownloadProgress(contentLength); + const fd = fs$1.openSync(archivePath, "w"); + try { + downloadProgress.startDisplayTimer(); + const controller = new abort_controller_1.AbortController(); + const abortSignal = controller.signal; + while (!downloadProgress.isDone()) { + const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; + const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); + downloadProgress.nextSegment(segmentSize); + const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 36e5, client.downloadToBuffer(segmentStart, segmentSize, { + abortSignal, + concurrency: options.downloadConcurrency, + onProgress: downloadProgress.onProgress() + })); + if (result === "timeout") { + controller.abort(); + throw new Error("Aborting cache download as the download time exceeded the timeout."); + } else if (Buffer.isBuffer(result)) fs$1.writeFileSync(fd, result); + } + } finally { + downloadProgress.stopDisplayTimer(); + fs$1.closeSync(fd); + } } - } - }; - exports.ReflectionTypeCheck = ReflectionTypeCheck; -} }); + }); + } + const promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, void 0, function* () { + let timeoutHandle; + const timeoutPromise = new Promise((resolve) => { + timeoutHandle = setTimeout(() => resolve("timeout"), timeoutMs); + }); + return Promise.race([promise, timeoutPromise]).then((result) => { + clearTimeout(timeoutHandle); + return result; + }); + }); +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-long-convert.js -var require_reflection_long_convert = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-long-convert.js"(exports) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/options.js +var require_options = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); Object.defineProperty(exports, "__esModule", { value: true }); - exports.reflectionLongConvert = void 0; - const reflection_info_1$10 = require_reflection_info$1(); + exports.getUploadOptions = getUploadOptions; + exports.getDownloadOptions = getDownloadOptions; + const core = __importStar(require_core()); /** - * Utility method to convert a PbLong or PbUlong to a JavaScript - * representation during runtime. + * Returns a copy of the upload options with defaults filled in. * - * Works with generated field information, `undefined` is equivalent - * to `STRING`. + * @param copy the original upload options */ - function reflectionLongConvert(long, type) { - switch (type) { - case reflection_info_1$10.LongType.BIGINT: return long.toBigInt(); - case reflection_info_1$10.LongType.NUMBER: return long.toNumber(); - default: return long.toString(); + function getUploadOptions(copy) { + const result = { + useAzureSdk: false, + uploadConcurrency: 4, + uploadChunkSize: 32 * 1024 * 1024 + }; + if (copy) { + if (typeof copy.useAzureSdk === "boolean") result.useAzureSdk = copy.useAzureSdk; + if (typeof copy.uploadConcurrency === "number") result.uploadConcurrency = copy.uploadConcurrency; + if (typeof copy.uploadChunkSize === "number") result.uploadChunkSize = copy.uploadChunkSize; } + /** + * Add env var overrides + */ + result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; + result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; + core.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core.debug(`Upload chunk size: ${result.uploadChunkSize}`); + return result; } - exports.reflectionLongConvert = reflectionLongConvert; -} }); + /** + * Returns a copy of the download options with defaults filled in. + * + * @param copy the original download options + */ + function getDownloadOptions(copy) { + const result = { + useAzureSdk: false, + concurrentBlobDownloads: true, + downloadConcurrency: 8, + timeoutInMs: 3e4, + segmentTimeoutInMs: 6e5, + lookupOnly: false + }; + if (copy) { + if (typeof copy.useAzureSdk === "boolean") result.useAzureSdk = copy.useAzureSdk; + if (typeof copy.concurrentBlobDownloads === "boolean") result.concurrentBlobDownloads = copy.concurrentBlobDownloads; + if (typeof copy.downloadConcurrency === "number") result.downloadConcurrency = copy.downloadConcurrency; + if (typeof copy.timeoutInMs === "number") result.timeoutInMs = copy.timeoutInMs; + if (typeof copy.segmentTimeoutInMs === "number") result.segmentTimeoutInMs = copy.segmentTimeoutInMs; + if (typeof copy.lookupOnly === "boolean") result.lookupOnly = copy.lookupOnly; + } + const segmentDownloadTimeoutMins = process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]; + if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; + core.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core.debug(`Download concurrency: ${result.downloadConcurrency}`); + core.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core.debug(`Lookup only: ${result.lookupOnly}`); + return result; + } +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-reader.js -var require_reflection_json_reader = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-reader.js"(exports) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/config.js +var require_config = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.ReflectionJsonReader = void 0; - const json_typings_1$2 = require_json_typings(); - const base64_1$2 = require_base64(); - const reflection_info_1$9 = require_reflection_info$1(); - const pb_long_1$4 = require_pb_long(); - const assert_1$6 = require_assert(); - const reflection_long_convert_1$2 = require_reflection_long_convert(); + exports.isGhes = isGhes; + exports.getCacheServiceVersion = getCacheServiceVersion; + exports.getCacheServiceURL = getCacheServiceURL; + function isGhes() { + const hostname = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com").hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === "GITHUB.COM"; + const isGheHost = hostname.endsWith(".GHE.COM"); + const isLocalHost = hostname.endsWith(".LOCALHOST"); + return !isGitHubHost && !isGheHost && !isLocalHost; + } + function getCacheServiceVersion() { + if (isGhes()) return "v1"; + return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; + } + function getCacheServiceURL() { + const version = getCacheServiceVersion(); + switch (version) { + case "v1": return process.env["ACTIONS_CACHE_URL"] || process.env["ACTIONS_RESULTS_URL"] || ""; + case "v2": return process.env["ACTIONS_RESULTS_URL"] || ""; + default: throw new Error(`Unsupported cache service version: ${version}`); + } + } +})); + +//#endregion +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/package.json +var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + "name": "@actions/cache", + "version": "5.0.5", + "preview": true, + "description": "Actions cache lib", + "keywords": [ + "github", + "actions", + "cache" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/cache", + "license": "MIT", + "main": "lib/cache.js", + "types": "lib/cache.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": ["lib", "!.DS_Store"], + "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/cache" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "bugs": { "url": "https://github.com/actions/toolkit/issues" }, + "dependencies": { + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.1", + "@protobuf-ts/runtime-rpc": "^2.11.1", + "@actions/http-client": "^3.0.2", + "@actions/io": "^2.0.0", + "@azure/abort-controller": "^1.1.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", + "semver": "^6.3.1" + }, + "devDependencies": { + "@types/node": "^24.1.0", + "@types/semver": "^6.0.0", + "@protobuf-ts/plugin": "^2.9.4", + "typescript": "^5.2.2" + }, + "overrides": { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" + } + }; +})); + +//#endregion +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/shared/user-agent.js +var require_user_agent = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getUserAgentString = getUserAgentString; + const packageJson = require_package(); /** - * Reads proto3 messages in canonical JSON format using reflection information. - * - * https://developers.google.com/protocol-buffers/docs/proto3#json + * Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package */ - var ReflectionJsonReader = class { - constructor(info) { - this.info = info; - } - prepare() { - var _a$2; - if (this.fMap === void 0) { - this.fMap = {}; - const fieldsInput = (_a$2 = this.info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; - for (const field of fieldsInput) { - this.fMap[field.name] = field; - this.fMap[field.jsonName] = field; - this.fMap[field.localName] = field; - } + function getUserAgentString() { + return `@actions/cache-${packageJson.version}`; + } +})); + +//#endregion +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/cacheHttpClient.js +var require_cacheHttpClient = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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]; } - } - assert(condition, fieldName, jsonValue) { - if (!condition) { - let what = json_typings_1$2.typeofJsonValue(jsonValue); - if (what == "number" || what == "boolean") what = jsonValue.toString(); - throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`); + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - /** - * Reads a message from canonical JSON format into the target message. - * - * Repeated fields are appended. Map entries are added, overwriting - * existing keys. - * - * If a message field is already present, it will be merged with the - * new data. - */ - read(input, message, options) { - this.prepare(); - const oneofsHandled = []; - for (const [jsonKey, jsonValue] of Object.entries(input)) { - const field = this.fMap[jsonKey]; - if (!field) { - if (!options.ignoreUnknownFields) throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`); - continue; + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } - const localName = field.localName; - let target; - if (field.oneof) { - if (jsonValue === null && (field.kind !== "enum" || field.T()[0] !== "google.protobuf.NullValue")) continue; - if (oneofsHandled.includes(field.oneof)) throw new Error(`Multiple members of the oneof group "${field.oneof}" of ${this.info.typeName} are present in JSON.`); - oneofsHandled.push(field.oneof); - target = message[field.oneof] = { oneofKind: localName }; - } else target = message; - if (field.kind == "map") { - if (jsonValue === null) continue; - this.assert(json_typings_1$2.isJsonObject(jsonValue), field.name, jsonValue); - const fieldObj = target[localName]; - for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { - this.assert(jsonObjValue !== null, field.name + " map value", null); - let val; - switch (field.V.kind) { - case "message": - val = field.V.T().internalJsonRead(jsonObjValue, options); - break; - case "enum": - val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val === false) continue; - break; - case "scalar": - val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); - break; - } - this.assert(val !== void 0, field.name + " map value", jsonObjValue); - let key = jsonObjKey; - if (field.K == reflection_info_1$9.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; - key = this.scalar(key, field.K, reflection_info_1$9.LongType.STRING, field.name).toString(); - fieldObj[key] = val; - } - } else if (field.repeat) { - if (jsonValue === null) continue; - this.assert(Array.isArray(jsonValue), field.name, jsonValue); - const fieldArr = target[localName]; - for (const jsonItem of jsonValue) { - this.assert(jsonItem !== null, field.name, null); - let val; - switch (field.kind) { - case "message": - val = field.T().internalJsonRead(jsonItem, options); - break; - case "enum": - val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val === false) continue; - break; - case "scalar": - val = this.scalar(jsonItem, field.T, field.L, field.name); - break; - } - this.assert(val !== void 0, field.name, jsonValue); - fieldArr.push(val); - } - } else switch (field.kind) { - case "message": - if (jsonValue === null && field.T().typeName != "google.protobuf.Value") { - this.assert(field.oneof === void 0, field.name + " (oneof member)", null); - continue; - } - target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]); - break; - case "enum": - if (jsonValue === null) continue; - let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val === false) continue; - target[localName] = val; - break; - case "scalar": - if (jsonValue === null) continue; - target[localName] = this.scalar(jsonValue, field.T, field.L, field.name); - break; + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } } - } - /** - * Returns `false` for unrecognized string representations. - * - * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). - */ - enum(type, json$1, fieldName, ignoreUnknownFields) { - if (type[0] == "google.protobuf.NullValue") assert_1$6.assert(json$1 === null || json$1 === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`); - if (json$1 === null) return 0; - switch (typeof json$1) { - case "number": - assert_1$6.assert(Number.isInteger(json$1), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json$1}.`); - return json$1; - case "string": - let localEnumName = json$1; - if (type[2] && json$1.substring(0, type[2].length) === type[2]) localEnumName = json$1.substring(type[2].length); - let enumNumber = type[1][localEnumName]; - if (typeof enumNumber === "undefined" && ignoreUnknownFields) return false; - assert_1$6.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json$1}".`); - return enumNumber; + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - assert_1$6.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json$1}".`); - } - scalar(json$1, type, longType, fieldName) { - let e; - try { - switch (type) { - case reflection_info_1$9.ScalarType.DOUBLE: - case reflection_info_1$9.ScalarType.FLOAT: - if (json$1 === null) return 0; - if (json$1 === "NaN") return Number.NaN; - if (json$1 === "Infinity") return Number.POSITIVE_INFINITY; - if (json$1 === "-Infinity") return Number.NEGATIVE_INFINITY; - if (json$1 === "") { - e = "empty string"; - break; - } - if (typeof json$1 == "string" && json$1.trim().length !== json$1.length) { - e = "extra whitespace"; - break; - } - if (typeof json$1 != "string" && typeof json$1 != "number") break; - let float = Number(json$1); - if (Number.isNaN(float)) { - e = "not a number"; - break; - } - if (!Number.isFinite(float)) { - e = "too large or small"; - break; - } - if (type == reflection_info_1$9.ScalarType.FLOAT) assert_1$6.assertFloat32(float); - return float; - case reflection_info_1$9.ScalarType.INT32: - case reflection_info_1$9.ScalarType.FIXED32: - case reflection_info_1$9.ScalarType.SFIXED32: - case reflection_info_1$9.ScalarType.SINT32: - case reflection_info_1$9.ScalarType.UINT32: - if (json$1 === null) return 0; - let int32; - if (typeof json$1 == "number") int32 = json$1; - else if (json$1 === "") e = "empty string"; - else if (typeof json$1 == "string") if (json$1.trim().length !== json$1.length) e = "extra whitespace"; - else int32 = Number(json$1); - if (int32 === void 0) break; - if (type == reflection_info_1$9.ScalarType.UINT32) assert_1$6.assertUInt32(int32); - else assert_1$6.assertInt32(int32); - return int32; - case reflection_info_1$9.ScalarType.INT64: - case reflection_info_1$9.ScalarType.SFIXED64: - case reflection_info_1$9.ScalarType.SINT64: - if (json$1 === null) return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbLong.ZERO, longType); - if (typeof json$1 != "number" && typeof json$1 != "string") break; - return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbLong.from(json$1), longType); - case reflection_info_1$9.ScalarType.FIXED64: - case reflection_info_1$9.ScalarType.UINT64: - if (json$1 === null) return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbULong.ZERO, longType); - if (typeof json$1 != "number" && typeof json$1 != "string") break; - return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbULong.from(json$1), longType); - case reflection_info_1$9.ScalarType.BOOL: - if (json$1 === null) return false; - if (typeof json$1 !== "boolean") break; - return json$1; - case reflection_info_1$9.ScalarType.STRING: - if (json$1 === null) return ""; - if (typeof json$1 !== "string") { - e = "extra whitespace"; - break; - } - try { - encodeURIComponent(json$1); - } catch (e$1) { - e$1 = "invalid UTF8"; - break; - } - return json$1; - case reflection_info_1$9.ScalarType.BYTES: - if (json$1 === null || json$1 === "") return new Uint8Array(0); - if (typeof json$1 !== "string") break; - return base64_1$2.base64decode(json$1); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getCacheEntry = getCacheEntry; + exports.downloadCache = downloadCache; + exports.reserveCache = reserveCache; + exports.saveCache = saveCache; + const core = __importStar(require_core()); + const http_client_1 = require_lib(); + const auth_1 = require_auth(); + const fs = __importStar(__require("fs")); + const url_1 = __require("url"); + const utils = __importStar(require_cacheUtils()); + const uploadUtils_1 = require_uploadUtils(); + const downloadUtils_1 = require_downloadUtils(); + const options_1 = require_options(); + const requestUtils_1 = require_requestUtils(); + const config_1 = require_config(); + const user_agent_1 = require_user_agent(); + function getCacheApiUrl(resource) { + const baseUrl = (0, config_1.getCacheServiceURL)(); + if (!baseUrl) throw new Error("Cache Service Url not found, unable to restore cache."); + const url = `${baseUrl}_apis/artifactcache/${resource}`; + core.debug(`Resource Url: ${url}`); + return url; + } + function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; + } + function getRequestOptions() { + return { headers: { Accept: createAcceptHeader("application/json", "6.0-preview.1") } }; + } + function createHttpClient() { + const token = process.env["ACTIONS_RUNTIME_TOKEN"] || ""; + const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); + return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); + } + function getCacheEntry(keys, paths, options) { + return __awaiter(this, void 0, void 0, function* () { + const httpClient = createHttpClient(); + const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter(this, void 0, void 0, function* () { + return httpClient.getJson(getCacheApiUrl(resource)); + })); + if (response.statusCode === 204) { + if (core.isDebug()) yield printCachesListForDiagnostics(keys[0], httpClient, version); + return null; + } + if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) throw new Error(`Cache service responded with ${response.statusCode}`); + const cacheResult = response.result; + const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; + if (!cacheDownloadUrl) throw new Error("Cache not found."); + core.setSecret(cacheDownloadUrl); + core.debug(`Cache Result:`); + core.debug(JSON.stringify(cacheResult)); + return cacheResult; + }); + } + function printCachesListForDiagnostics(key, httpClient, version) { + return __awaiter(this, void 0, void 0, function* () { + const resource = `caches?key=${encodeURIComponent(key)}`; + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter(this, void 0, void 0, function* () { + return httpClient.getJson(getCacheApiUrl(resource)); + })); + if (response.statusCode === 200) { + const cacheListResult = response.result; + const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; + if (totalCount && totalCount > 0) { + core.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`); + for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) core.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } - } catch (error) { - e = error.message; } - this.assert(false, fieldName + (e ? " - " + e : ""), json$1); + }); + } + function downloadCache(archiveLocation, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + const archiveUrl = new url_1.URL(archiveLocation); + const downloadOptions = (0, options_1.getDownloadOptions)(options); + if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) if (downloadOptions.useAzureSdk) yield (0, downloadUtils_1.downloadCacheStorageSDK)(archiveLocation, archivePath, downloadOptions); + else if (downloadOptions.concurrentBlobDownloads) yield (0, downloadUtils_1.downloadCacheHttpClientConcurrent)(archiveLocation, archivePath, downloadOptions); + else yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); + else yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); + }); + } + function reserveCache(key, paths, options) { + return __awaiter(this, void 0, void 0, function* () { + const httpClient = createHttpClient(); + const reserveCacheRequest = { + key, + version: utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive), + cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize + }; + return yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); + })); + }); + } + function getContentRange(start, end) { + return `bytes ${start}-${end}/*`; + } + function uploadChunk(httpClient, resourceUrl, openStream, start, end) { + return __awaiter(this, void 0, void 0, function* () { + core.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + const additionalHeaders = { + "Content-Type": "application/octet-stream", + "Content-Range": getContentRange(start, end) + }; + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { + return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); + })); + if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); + }); + } + function uploadFile(httpClient, cacheId, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + const fileSize = utils.getArchiveFileSizeInBytes(archivePath); + const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); + const fd = fs.openSync(archivePath, "r"); + const uploadOptions = (0, options_1.getUploadOptions)(options); + const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); + const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); + const parallelUploads = [...new Array(concurrency).keys()]; + core.debug("Awaiting all uploads"); + let offset = 0; + try { + yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { + while (offset < fileSize) { + const chunkSize = Math.min(fileSize - offset, maxChunkSize); + const start = offset; + const end = offset + chunkSize - 1; + offset += maxChunkSize; + yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, { + fd, + start, + end, + autoClose: false + }).on("error", (error) => { + throw new Error(`Cache upload failed because file read failed with ${error.message}`); + }), start, end); + } + }))); + } finally { + fs.closeSync(fd); + } + }); + } + function commitCache(httpClient, cacheId, filesize) { + return __awaiter(this, void 0, void 0, function* () { + const commitCacheRequest = { size: filesize }; + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); + })); + }); + } + function saveCache(cacheId, archivePath, signedUploadURL, options) { + return __awaiter(this, void 0, void 0, function* () { + if ((0, options_1.getUploadOptions)(options).useAzureSdk) { + if (!signedUploadURL) throw new Error("Azure Storage SDK can only be used when a signed URL is provided."); + yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); + } else { + const httpClient = createHttpClient(); + core.debug("Upload cache"); + yield uploadFile(httpClient, cacheId, archivePath, options); + core.debug("Commiting cache"); + const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); + core.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); + if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); + core.info("Cache saved successfully"); + } + }); + } +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js +var require_json_typings = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isJsonObject = exports.typeofJsonValue = void 0; + /** + * Get the type of a JSON value. + * Distinguishes between array, null and object. + */ + function typeofJsonValue(value) { + let t = typeof value; + if (t == "object") { + if (Array.isArray(value)) return "array"; + if (value === null) return "null"; } - }; - exports.ReflectionJsonReader = ReflectionJsonReader; -} }); + return t; + } + exports.typeofJsonValue = typeofJsonValue; + /** + * Is this a JSON object (instead of an array or null)? + */ + function isJsonObject(value) { + return value !== null && typeof value == "object" && !Array.isArray(value); + } + exports.isJsonObject = isJsonObject; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-writer.js -var require_reflection_json_writer = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-writer.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/base64.js +var require_base64 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.ReflectionJsonWriter = void 0; - const base64_1$1 = require_base64(); - const pb_long_1$3 = require_pb_long(); - const reflection_info_1$8 = require_reflection_info$1(); - const assert_1$5 = require_assert(); + exports.base64encode = exports.base64decode = void 0; + let encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + let decTable = []; + for (let i = 0; i < encTable.length; i++) decTable[encTable[i].charCodeAt(0)] = i; + decTable["-".charCodeAt(0)] = encTable.indexOf("+"); + decTable["_".charCodeAt(0)] = encTable.indexOf("/"); /** - * Writes proto3 messages in canonical JSON format using reflection - * information. + * Decodes a base64 string to a byte array. * - * https://developers.google.com/protocol-buffers/docs/proto3#json + * - ignores white-space, including line breaks and tabs + * - allows inner padding (can decode concatenated base64 strings) + * - does not require padding + * - understands base64url encoding: + * "-" instead of "+", + * "_" instead of "/", + * no padding */ - var ReflectionJsonWriter = class { - constructor(info) { - var _a$2; - this.fields = (_a$2 = info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; - } - /** - * Converts the message to a JSON object, based on the field descriptors. - */ - write(message, options) { - const json$1 = {}, source = message; - for (const field of this.fields) { - if (!field.oneof) { - let jsonValue$1 = this.field(field, source[field.localName], options); - if (jsonValue$1 !== void 0) json$1[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue$1; - continue; - } - const group = source[field.oneof]; - if (group.oneofKind !== field.localName) continue; - const opt = field.kind == "scalar" || field.kind == "enum" ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options; - let jsonValue = this.field(field, group[field.localName], opt); - assert_1$5.assert(jsonValue !== void 0); - json$1[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + function base64decode(base64Str) { + let es = base64Str.length * 3 / 4; + if (base64Str[base64Str.length - 2] == "=") es -= 2; + else if (base64Str[base64Str.length - 1] == "=") es -= 1; + let bytes = new Uint8Array(es), bytePos = 0, groupPos = 0, b, p = 0; + for (let i = 0; i < base64Str.length; i++) { + b = decTable[base64Str.charCodeAt(i)]; + if (b === void 0) switch (base64Str[i]) { + case "=": groupPos = 0; + case "\n": + case "\r": + case " ": + case " ": continue; + default: throw Error(`invalid base64 string.`); } - return json$1; - } - field(field, value, options) { - let jsonValue = void 0; - if (field.kind == "map") { - assert_1$5.assert(typeof value == "object" && value !== null); - const jsonObj = {}; - switch (field.V.kind) { - case "scalar": - for (const [entryKey, entryValue] of Object.entries(value)) { - const val = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1$5.assert(val !== void 0); - jsonObj[entryKey.toString()] = val; - } - break; - case "message": - const messageType = field.V.T(); - for (const [entryKey, entryValue] of Object.entries(value)) { - const val = this.message(messageType, entryValue, field.name, options); - assert_1$5.assert(val !== void 0); - jsonObj[entryKey.toString()] = val; - } - break; - case "enum": - const enumInfo = field.V.T(); - for (const [entryKey, entryValue] of Object.entries(value)) { - assert_1$5.assert(entryValue === void 0 || typeof entryValue == "number"); - const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1$5.assert(val !== void 0); - jsonObj[entryKey.toString()] = val; - } - break; - } - if (options.emitDefaultValues || Object.keys(jsonObj).length > 0) jsonValue = jsonObj; - } else if (field.repeat) { - assert_1$5.assert(Array.isArray(value)); - const jsonArr = []; - switch (field.kind) { - case "scalar": - for (let i = 0; i < value.length; i++) { - const val = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1$5.assert(val !== void 0); - jsonArr.push(val); - } - break; - case "enum": - const enumInfo = field.T(); - for (let i = 0; i < value.length; i++) { - assert_1$5.assert(value[i] === void 0 || typeof value[i] == "number"); - const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1$5.assert(val !== void 0); - jsonArr.push(val); - } - break; - case "message": - const messageType = field.T(); - for (let i = 0; i < value.length; i++) { - const val = this.message(messageType, value[i], field.name, options); - assert_1$5.assert(val !== void 0); - jsonArr.push(val); - } - break; - } - if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues) jsonValue = jsonArr; - } else switch (field.kind) { - case "scalar": - jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues); + switch (groupPos) { + case 0: + p = b; + groupPos = 1; break; - case "enum": - jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger); + case 1: + bytes[bytePos++] = p << 2 | (b & 48) >> 4; + p = b; + groupPos = 2; break; - case "message": - jsonValue = this.message(field.T(), value, field.name, options); + case 2: + bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2; + p = b; + groupPos = 3; + break; + case 3: + bytes[bytePos++] = (p & 3) << 6 | b; + groupPos = 0; break; } - return jsonValue; } - /** - * Returns `null` as the default for google.protobuf.NullValue. - */ - enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) { - if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional ? void 0 : null; - if (value === void 0) { - assert_1$5.assert(optional); - return void 0; + if (groupPos == 1) throw Error(`invalid base64 string.`); + return bytes.subarray(0, bytePos); + } + exports.base64decode = base64decode; + /** + * Encodes a byte array to a base64 string. + * Adds padding at the end. + * Does not insert newlines. + */ + function base64encode(bytes) { + let base64 = "", groupPos = 0, b, p = 0; + for (let i = 0; i < bytes.length; i++) { + b = bytes[i]; + switch (groupPos) { + case 0: + base64 += encTable[b >> 2]; + p = (b & 3) << 4; + groupPos = 1; + break; + case 1: + base64 += encTable[p | b >> 4]; + p = (b & 15) << 2; + groupPos = 2; + break; + case 2: + base64 += encTable[p | b >> 6]; + base64 += encTable[b & 63]; + groupPos = 0; + break; } - if (value === 0 && !emitDefaultValues && !optional) return void 0; - assert_1$5.assert(typeof value == "number"); - assert_1$5.assert(Number.isInteger(value)); - if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; - if (type[2]) return type[2] + type[1][value]; - return type[1][value]; - } - message(type, value, fieldName, options) { - if (value === void 0) return options.emitDefaultValues ? null : void 0; - return type.internalJsonWrite(value, options); } - scalar(type, value, fieldName, optional, emitDefaultValues) { - if (value === void 0) { - assert_1$5.assert(optional); - return void 0; - } - const ed = emitDefaultValues || optional; - switch (type) { - case reflection_info_1$8.ScalarType.INT32: - case reflection_info_1$8.ScalarType.SFIXED32: - case reflection_info_1$8.ScalarType.SINT32: - if (value === 0) return ed ? 0 : void 0; - assert_1$5.assertInt32(value); - return value; - case reflection_info_1$8.ScalarType.FIXED32: - case reflection_info_1$8.ScalarType.UINT32: - if (value === 0) return ed ? 0 : void 0; - assert_1$5.assertUInt32(value); - return value; - case reflection_info_1$8.ScalarType.FLOAT: assert_1$5.assertFloat32(value); - case reflection_info_1$8.ScalarType.DOUBLE: - if (value === 0) return ed ? 0 : void 0; - assert_1$5.assert(typeof value == "number"); - if (Number.isNaN(value)) return "NaN"; - if (value === Number.POSITIVE_INFINITY) return "Infinity"; - if (value === Number.NEGATIVE_INFINITY) return "-Infinity"; - return value; - case reflection_info_1$8.ScalarType.STRING: - if (value === "") return ed ? "" : void 0; - assert_1$5.assert(typeof value == "string"); - return value; - case reflection_info_1$8.ScalarType.BOOL: - if (value === false) return ed ? false : void 0; - assert_1$5.assert(typeof value == "boolean"); - return value; - case reflection_info_1$8.ScalarType.UINT64: - case reflection_info_1$8.ScalarType.FIXED64: - assert_1$5.assert(typeof value == "number" || typeof value == "string" || typeof value == "bigint"); - let ulong = pb_long_1$3.PbULong.from(value); - if (ulong.isZero() && !ed) return void 0; - return ulong.toString(); - case reflection_info_1$8.ScalarType.INT64: - case reflection_info_1$8.ScalarType.SFIXED64: - case reflection_info_1$8.ScalarType.SINT64: - assert_1$5.assert(typeof value == "number" || typeof value == "string" || typeof value == "bigint"); - let long = pb_long_1$3.PbLong.from(value); - if (long.isZero() && !ed) return void 0; - return long.toString(); - case reflection_info_1$8.ScalarType.BYTES: - assert_1$5.assert(value instanceof Uint8Array); - if (!value.byteLength) return ed ? "" : void 0; - return base64_1$1.base64encode(value); - } + if (groupPos) { + base64 += encTable[p]; + base64 += "="; + if (groupPos == 1) base64 += "="; } - }; - exports.ReflectionJsonWriter = ReflectionJsonWriter; -} }); + return base64; + } + exports.base64encode = base64encode; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js -var require_reflection_scalar_default = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js +var require_protobufjs_utf8 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.reflectionScalarDefault = void 0; - const reflection_info_1$7 = require_reflection_info$1(); - const reflection_long_convert_1$1 = require_reflection_long_convert(); - const pb_long_1$2 = require_pb_long(); + exports.utf8read = void 0; + const fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk); /** - * Creates the default value for a scalar type. + * @deprecated This function will no longer be exported with the next major + * release, since protobuf-ts has switch to TextDecoder API. If you need this + * function, please migrate to @protobufjs/utf8. For context, see + * https://github.com/timostamm/protobuf-ts/issues/184 + * + * Reads UTF8 bytes as a string. + * + * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40) + * + * Copyright (c) 2016, Daniel Wirtz */ - function reflectionScalarDefault(type, longType = reflection_info_1$7.LongType.STRING) { - switch (type) { - case reflection_info_1$7.ScalarType.BOOL: return false; - case reflection_info_1$7.ScalarType.UINT64: - case reflection_info_1$7.ScalarType.FIXED64: return reflection_long_convert_1$1.reflectionLongConvert(pb_long_1$2.PbULong.ZERO, longType); - case reflection_info_1$7.ScalarType.INT64: - case reflection_info_1$7.ScalarType.SFIXED64: - case reflection_info_1$7.ScalarType.SINT64: return reflection_long_convert_1$1.reflectionLongConvert(pb_long_1$2.PbLong.ZERO, longType); - case reflection_info_1$7.ScalarType.DOUBLE: - case reflection_info_1$7.ScalarType.FLOAT: return 0; - case reflection_info_1$7.ScalarType.BYTES: return new Uint8Array(0); - case reflection_info_1$7.ScalarType.STRING: return ""; - default: return 0; + function utf8read(bytes) { + if (bytes.length < 1) return ""; + let pos = 0, parts = [], chunk = [], i = 0, t; + let len = bytes.length; + while (pos < len) { + t = bytes[pos++]; + if (t < 128) chunk[i++] = t; + else if (t > 191 && t < 224) chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 65536; + chunk[i++] = 55296 + (t >> 10); + chunk[i++] = 56320 + (t & 1023); + } else chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63; + if (i > 8191) { + parts.push(fromCharCodes(chunk)); + i = 0; + } + } + if (parts.length) { + if (i) parts.push(fromCharCodes(chunk.slice(0, i))); + return parts.join(""); } + return fromCharCodes(chunk.slice(0, i)); } - exports.reflectionScalarDefault = reflectionScalarDefault; -} }); + exports.utf8read = utf8read; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-reader.js -var require_reflection_binary_reader = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-reader.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js +var require_binary_format_contract = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.ReflectionBinaryReader = void 0; - const binary_format_contract_1$2 = require_binary_format_contract(); - const reflection_info_1$6 = require_reflection_info$1(); - const reflection_long_convert_1 = require_reflection_long_convert(); - const reflection_scalar_default_1$2 = require_reflection_scalar_default(); + exports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0; + (function(UnknownFieldHandler) { + /** + * The symbol used to store unknown fields for a message. + * The property must conform to `UnknownFieldContainer`. + */ + UnknownFieldHandler.symbol = Symbol.for("protobuf-ts/unknown"); + /** + * Store an unknown field during binary read directly on the message. + * This method is compatible with `BinaryReadOptions.readUnknownField`. + */ + UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => { + (is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = []).push({ + no: fieldNo, + wireType, + data + }); + }; + /** + * Write unknown fields stored for the message to the writer. + * This method is compatible with `BinaryWriteOptions.writeUnknownFields`. + */ + UnknownFieldHandler.onWrite = (typeName, message, writer) => { + for (let { no, wireType, data } of UnknownFieldHandler.list(message)) writer.tag(no, wireType).raw(data); + }; + /** + * List unknown fields stored for the message. + * Note that there may be multiples fields with the same number. + */ + UnknownFieldHandler.list = (message, fieldNo) => { + if (is(message)) { + let all = message[UnknownFieldHandler.symbol]; + return fieldNo ? all.filter((uf) => uf.no == fieldNo) : all; + } + return []; + }; + /** + * Returns the last unknown field by field number. + */ + UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0]; + const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]); + })(exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {})); /** - * Reads proto3 messages in binary format using reflection information. - * - * https://developers.google.com/protocol-buffers/docs/encoding + * Merges binary write or read options. Later values override earlier values. */ - var ReflectionBinaryReader = class { - constructor(info) { - this.info = info; - } - prepare() { - var _a$2; - if (!this.fieldNoToField) { - const fieldsInput = (_a$2 = this.info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; - this.fieldNoToField = new Map(fieldsInput.map((field) => [field.no, field])); - } - } + function mergeBinaryOptions(a, b) { + return Object.assign(Object.assign({}, a), b); + } + exports.mergeBinaryOptions = mergeBinaryOptions; + (function(WireType) { /** - * Reads a message from binary format into the target message. - * - * Repeated fields are appended. Map entries are added, overwriting - * existing keys. + * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum + */ + WireType[WireType["Varint"] = 0] = "Varint"; + /** + * Used for fixed64, sfixed64, double. + * Always 8 bytes with little-endian byte order. + */ + WireType[WireType["Bit64"] = 1] = "Bit64"; + /** + * Used for string, bytes, embedded messages, packed repeated fields * - * If a message field is already present, it will be merged with the - * new data. + * Only repeated numeric types (types which use the varint, 32-bit, + * or 64-bit wire types) can be packed. In proto3, such fields are + * packed by default. */ - read(reader, message, options, length) { - this.prepare(); - const end = length === void 0 ? reader.len : reader.pos + length; - while (reader.pos < end) { - const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo); - if (!field) { - let u = options.readUnknownField; - if (u == "throw") throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? binary_format_contract_1$2.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d$1); - continue; - } - let target = message, repeated = field.repeat, localName = field.localName; - if (field.oneof) { - target = target[field.oneof]; - if (target.oneofKind !== localName) target = message[field.oneof] = { oneofKind: localName }; - } - switch (field.kind) { - case "scalar": - case "enum": - let T = field.kind == "enum" ? reflection_info_1$6.ScalarType.INT32 : field.T; - let L = field.kind == "scalar" ? field.L : void 0; - if (repeated) { - let arr = target[localName]; - if (wireType == binary_format_contract_1$2.WireType.LengthDelimited && T != reflection_info_1$6.ScalarType.STRING && T != reflection_info_1$6.ScalarType.BYTES) { - let e = reader.uint32() + reader.pos; - while (reader.pos < e) arr.push(this.scalar(reader, T, L)); - } else arr.push(this.scalar(reader, T, L)); - } else target[localName] = this.scalar(reader, T, L); - break; - case "message": - if (repeated) { - let arr = target[localName]; - let msg = field.T().internalBinaryRead(reader, reader.uint32(), options); - arr.push(msg); - } else target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]); - break; - case "map": - let [mapKey, mapVal] = this.mapEntry(field, reader, options); - target[localName][mapKey] = mapVal; - break; - } - } - } + WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited"; /** - * Read a map field, expecting key field = 1, value field = 2 + * Used for groups + * @deprecated */ - mapEntry(field, reader, options) { - let length = reader.uint32(); - let end = reader.pos + length; - let key = void 0; - let val = void 0; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - if (field.K == reflection_info_1$6.ScalarType.BOOL) key = reader.bool().toString(); - else key = this.scalar(reader, field.K, reflection_info_1$6.LongType.STRING); - break; - case 2: - switch (field.V.kind) { - case "scalar": - val = this.scalar(reader, field.V.T, field.V.L); - break; - case "enum": - val = reader.int32(); - break; - case "message": - val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); - break; - } - break; - default: throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`); - } - } - if (key === void 0) { - let keyRaw = reflection_scalar_default_1$2.reflectionScalarDefault(field.K); - key = field.K == reflection_info_1$6.ScalarType.BOOL ? keyRaw.toString() : keyRaw; + WireType[WireType["StartGroup"] = 3] = "StartGroup"; + /** + * Used for groups + * @deprecated + */ + WireType[WireType["EndGroup"] = 4] = "EndGroup"; + /** + * Used for fixed32, sfixed32, float. + * Always 4 bytes with little-endian byte order. + */ + WireType[WireType["Bit32"] = 5] = "Bit32"; + })(exports.WireType || (exports.WireType = {})); +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js +var require_goog_varint = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0; + /** + * Read a 64 bit varint as two JS numbers. + * + * Returns tuple: + * [0]: low bits + * [0]: high bits + * + * Copyright 2008 Google Inc. All rights reserved. + * + * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175 + */ + function varint64read() { + let lowBits = 0; + let highBits = 0; + for (let shift = 0; shift < 28; shift += 7) { + let b = this.buf[this.pos++]; + lowBits |= (b & 127) << shift; + if ((b & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; } - if (val === void 0) switch (field.V.kind) { - case "scalar": - val = reflection_scalar_default_1$2.reflectionScalarDefault(field.V.T, field.V.L); - break; - case "enum": - val = 0; - break; - case "message": - val = field.V.T().create(); - break; + } + let middleByte = this.buf[this.pos++]; + lowBits |= (middleByte & 15) << 28; + highBits = (middleByte & 112) >> 4; + if ((middleByte & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; + } + for (let shift = 3; shift <= 31; shift += 7) { + let b = this.buf[this.pos++]; + highBits |= (b & 127) << shift; + if ((b & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; } - return [key, val]; } - scalar(reader, type, longType) { - switch (type) { - case reflection_info_1$6.ScalarType.INT32: return reader.int32(); - case reflection_info_1$6.ScalarType.STRING: return reader.string(); - case reflection_info_1$6.ScalarType.BOOL: return reader.bool(); - case reflection_info_1$6.ScalarType.DOUBLE: return reader.double(); - case reflection_info_1$6.ScalarType.FLOAT: return reader.float(); - case reflection_info_1$6.ScalarType.INT64: return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType); - case reflection_info_1$6.ScalarType.UINT64: return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType); - case reflection_info_1$6.ScalarType.FIXED64: return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType); - case reflection_info_1$6.ScalarType.FIXED32: return reader.fixed32(); - case reflection_info_1$6.ScalarType.BYTES: return reader.bytes(); - case reflection_info_1$6.ScalarType.UINT32: return reader.uint32(); - case reflection_info_1$6.ScalarType.SFIXED32: return reader.sfixed32(); - case reflection_info_1$6.ScalarType.SFIXED64: return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType); - case reflection_info_1$6.ScalarType.SINT32: return reader.sint32(); - case reflection_info_1$6.ScalarType.SINT64: return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType); + throw new Error("invalid varint"); + } + exports.varint64read = varint64read; + /** + * Write a 64 bit varint, given as two JS numbers, to the given bytes array. + * + * Copyright 2008 Google Inc. All rights reserved. + * + * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344 + */ + function varint64write(lo, hi, bytes) { + for (let i = 0; i < 28; i = i + 7) { + const shift = lo >>> i; + const hasNext = !(shift >>> 7 == 0 && hi == 0); + const byte = (hasNext ? shift | 128 : shift) & 255; + bytes.push(byte); + if (!hasNext) return; + } + const splitBits = lo >>> 28 & 15 | (hi & 7) << 4; + const hasMoreBits = !(hi >> 3 == 0); + bytes.push((hasMoreBits ? splitBits | 128 : splitBits) & 255); + if (!hasMoreBits) return; + for (let i = 3; i < 31; i = i + 7) { + const shift = hi >>> i; + const hasNext = !(shift >>> 7 == 0); + const byte = (hasNext ? shift | 128 : shift) & 255; + bytes.push(byte); + if (!hasNext) return; + } + bytes.push(hi >>> 31 & 1); + } + exports.varint64write = varint64write; + const TWO_PWR_32_DBL = 65536 * 65536; + /** + * Parse decimal string of 64 bit integer value as two JS numbers. + * + * Returns tuple: + * [0]: minus sign? + * [1]: low bits + * [2]: high bits + * + * Copyright 2008 Google Inc. + */ + function int64fromString(dec) { + let minus = dec[0] == "-"; + if (minus) dec = dec.slice(1); + const base = 1e6; + let lowBits = 0; + let highBits = 0; + function add1e6digit(begin, end) { + const digit1e6 = Number(dec.slice(begin, end)); + highBits *= base; + lowBits = lowBits * base + digit1e6; + if (lowBits >= TWO_PWR_32_DBL) { + highBits = highBits + (lowBits / TWO_PWR_32_DBL | 0); + lowBits = lowBits % TWO_PWR_32_DBL; } } - }; - exports.ReflectionBinaryReader = ReflectionBinaryReader; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-writer.js -var require_reflection_binary_writer = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-writer.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ReflectionBinaryWriter = void 0; - const binary_format_contract_1$1 = require_binary_format_contract(); - const reflection_info_1$5 = require_reflection_info$1(); - const assert_1$4 = require_assert(); - const pb_long_1$1 = require_pb_long(); + add1e6digit(-24, -18); + add1e6digit(-18, -12); + add1e6digit(-12, -6); + add1e6digit(-6); + return [ + minus, + lowBits, + highBits + ]; + } + exports.int64fromString = int64fromString; /** - * Writes proto3 messages in binary format using reflection information. + * Format 64 bit integer value (as two JS numbers) to decimal string. * - * https://developers.google.com/protocol-buffers/docs/encoding + * Copyright 2008 Google Inc. */ - var ReflectionBinaryWriter = class { - constructor(info) { - this.info = info; + function int64toString(bitsLow, bitsHigh) { + if (bitsHigh >>> 0 <= 2097151) return "" + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0)); + let low = bitsLow & 16777215; + let mid = (bitsLow >>> 24 | bitsHigh << 8) >>> 0 & 16777215; + let high = bitsHigh >> 16 & 65535; + let digitA = low + mid * 6777216 + high * 6710656; + let digitB = mid + high * 8147497; + let digitC = high * 2; + let base = 1e7; + if (digitA >= base) { + digitB += Math.floor(digitA / base); + digitA %= base; } - prepare() { - if (!this.fields) { - const fieldsInput = this.info.fields ? this.info.fields.concat() : []; - this.fields = fieldsInput.sort((a, b) => a.no - b.no); - } + if (digitB >= base) { + digitC += Math.floor(digitB / base); + digitB %= base; } - /** - * Writes the message to binary format. - */ - write(message, writer, options) { - this.prepare(); - for (const field of this.fields) { - let value, emitDefault, repeated = field.repeat, localName = field.localName; - if (field.oneof) { - const group = message[field.oneof]; - if (group.oneofKind !== localName) continue; - value = group[localName]; - emitDefault = true; - } else { - value = message[localName]; - emitDefault = false; - } - switch (field.kind) { - case "scalar": - case "enum": - let T = field.kind == "enum" ? reflection_info_1$5.ScalarType.INT32 : field.T; - if (repeated) { - assert_1$4.assert(Array.isArray(value)); - if (repeated == reflection_info_1$5.RepeatType.PACKED) this.packed(writer, T, field.no, value); - else for (const item of value) this.scalar(writer, T, field.no, item, true); - } else if (value === void 0) assert_1$4.assert(field.opt); - else this.scalar(writer, T, field.no, value, emitDefault || field.opt); - break; - case "message": - if (repeated) { - assert_1$4.assert(Array.isArray(value)); - for (const item of value) this.message(writer, options, field.T(), field.no, item); - } else this.message(writer, options, field.T(), field.no, value); - break; - case "map": - assert_1$4.assert(typeof value == "object" && value !== null); - for (const [key, val] of Object.entries(value)) this.mapEntry(writer, options, field, key, val); - break; - } - } - let u = options.writeUnknownFields; - if (u !== false) (u === true ? binary_format_contract_1$1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer); + function decimalFrom1e7(digit1e7, needLeadingZeros) { + let partial = digit1e7 ? String(digit1e7) : ""; + if (needLeadingZeros) return "0000000".slice(partial.length) + partial; + return partial; } - mapEntry(writer, options, field, key, value) { - writer.tag(field.no, binary_format_contract_1$1.WireType.LengthDelimited); - writer.fork(); - let keyValue = key; - switch (field.K) { - case reflection_info_1$5.ScalarType.INT32: - case reflection_info_1$5.ScalarType.FIXED32: - case reflection_info_1$5.ScalarType.UINT32: - case reflection_info_1$5.ScalarType.SFIXED32: - case reflection_info_1$5.ScalarType.SINT32: - keyValue = Number.parseInt(key); - break; - case reflection_info_1$5.ScalarType.BOOL: - assert_1$4.assert(key == "true" || key == "false"); - keyValue = key == "true"; - break; + return decimalFrom1e7(digitC, 0) + decimalFrom1e7(digitB, digitC) + decimalFrom1e7(digitA, 1); + } + exports.int64toString = int64toString; + /** + * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)` + * + * Copyright 2008 Google Inc. All rights reserved. + * + * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144 + */ + function varint32write(value, bytes) { + if (value >= 0) { + while (value > 127) { + bytes.push(value & 127 | 128); + value = value >>> 7; } - this.scalar(writer, field.K, 1, keyValue, true); - switch (field.V.kind) { - case "scalar": - this.scalar(writer, field.V.T, 2, value, true); - break; - case "enum": - this.scalar(writer, reflection_info_1$5.ScalarType.INT32, 2, value, true); - break; - case "message": - this.message(writer, options, field.V.T(), 2, value); - break; + bytes.push(value); + } else { + for (let i = 0; i < 9; i++) { + bytes.push(value & 127 | 128); + value = value >> 7; } - writer.join(); + bytes.push(1); } - message(writer, options, handler, fieldNo, value) { - if (value === void 0) return; - handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1$1.WireType.LengthDelimited).fork(), options); - writer.join(); + } + exports.varint32write = varint32write; + /** + * Read an unsigned 32 bit varint. + * + * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220 + */ + function varint32read() { + let b = this.buf[this.pos++]; + let result = b & 127; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 127) << 7; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 127) << 14; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 127) << 21; + if ((b & 128) == 0) { + this.assertBounds(); + return result; } + b = this.buf[this.pos++]; + result |= (b & 15) << 28; + for (let readBytes = 5; (b & 128) !== 0 && readBytes < 10; readBytes++) b = this.buf[this.pos++]; + if ((b & 128) != 0) throw new Error("invalid varint"); + this.assertBounds(); + return result >>> 0; + } + exports.varint32read = varint32read; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js +var require_pb_long = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PbLong = exports.PbULong = exports.detectBi = void 0; + const goog_varint_1 = require_goog_varint(); + let BI; + function detectBi() { + const dv = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8)); + BI = globalThis.BigInt !== void 0 && typeof dv.getBigInt64 === "function" && typeof dv.getBigUint64 === "function" && typeof dv.setBigInt64 === "function" && typeof dv.setBigUint64 === "function" ? { + MIN: BigInt("-9223372036854775808"), + MAX: BigInt("9223372036854775807"), + UMIN: BigInt("0"), + UMAX: BigInt("18446744073709551615"), + C: BigInt, + V: dv + } : void 0; + } + exports.detectBi = detectBi; + detectBi(); + function assertBi(bi) { + if (!bi) throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support"); + } + const RE_DECIMAL_STR = /^-?[0-9]+$/; + const TWO_PWR_32_DBL = 4294967296; + const HALF_2_PWR_32 = 2147483648; + var SharedPbLong = class { /** - * Write a single scalar value. + * Create a new instance with the given bits. */ - scalar(writer, type, fieldNo, value, emitDefault) { - let [wireType, method, isDefault] = this.scalarInfo(type, value); - if (!isDefault || emitDefault) { - writer.tag(fieldNo, wireType); - writer[method](value); - } + constructor(lo, hi) { + this.lo = lo | 0; + this.hi = hi | 0; } /** - * Write an array of scalar values in packed format. + * Is this instance equal to 0? */ - packed(writer, type, fieldNo, value) { - if (!value.length) return; - assert_1$4.assert(type !== reflection_info_1$5.ScalarType.BYTES && type !== reflection_info_1$5.ScalarType.STRING); - writer.tag(fieldNo, binary_format_contract_1$1.WireType.LengthDelimited); - writer.fork(); - let [, method] = this.scalarInfo(type); - for (let i = 0; i < value.length; i++) writer[method](value[i]); - writer.join(); + isZero() { + return this.lo == 0 && this.hi == 0; } /** - * Get information for writing a scalar value. - * - * Returns tuple: - * [0]: appropriate WireType - * [1]: name of the appropriate method of IBinaryWriter - * [2]: whether the given value is a default value - * - * If argument `value` is omitted, [2] is always false. + * Convert to a native number. */ - scalarInfo(type, value) { - let t = binary_format_contract_1$1.WireType.Varint; - let m$1; - let i = value === void 0; - let d$1 = value === 0; - switch (type) { - case reflection_info_1$5.ScalarType.INT32: - m$1 = "int32"; - break; - case reflection_info_1$5.ScalarType.STRING: - d$1 = i || !value.length; - t = binary_format_contract_1$1.WireType.LengthDelimited; - m$1 = "string"; - break; - case reflection_info_1$5.ScalarType.BOOL: - d$1 = value === false; - m$1 = "bool"; - break; - case reflection_info_1$5.ScalarType.UINT32: - m$1 = "uint32"; - break; - case reflection_info_1$5.ScalarType.DOUBLE: - t = binary_format_contract_1$1.WireType.Bit64; - m$1 = "double"; - break; - case reflection_info_1$5.ScalarType.FLOAT: - t = binary_format_contract_1$1.WireType.Bit32; - m$1 = "float"; - break; - case reflection_info_1$5.ScalarType.INT64: - d$1 = i || pb_long_1$1.PbLong.from(value).isZero(); - m$1 = "int64"; - break; - case reflection_info_1$5.ScalarType.UINT64: - d$1 = i || pb_long_1$1.PbULong.from(value).isZero(); - m$1 = "uint64"; - break; - case reflection_info_1$5.ScalarType.FIXED64: - d$1 = i || pb_long_1$1.PbULong.from(value).isZero(); - t = binary_format_contract_1$1.WireType.Bit64; - m$1 = "fixed64"; - break; - case reflection_info_1$5.ScalarType.BYTES: - d$1 = i || !value.byteLength; - t = binary_format_contract_1$1.WireType.LengthDelimited; - m$1 = "bytes"; - break; - case reflection_info_1$5.ScalarType.FIXED32: - t = binary_format_contract_1$1.WireType.Bit32; - m$1 = "fixed32"; - break; - case reflection_info_1$5.ScalarType.SFIXED32: - t = binary_format_contract_1$1.WireType.Bit32; - m$1 = "sfixed32"; - break; - case reflection_info_1$5.ScalarType.SFIXED64: - d$1 = i || pb_long_1$1.PbLong.from(value).isZero(); - t = binary_format_contract_1$1.WireType.Bit64; - m$1 = "sfixed64"; - break; - case reflection_info_1$5.ScalarType.SINT32: - m$1 = "sint32"; - break; - case reflection_info_1$5.ScalarType.SINT64: - d$1 = i || pb_long_1$1.PbLong.from(value).isZero(); - m$1 = "sint64"; - break; - } - return [ - t, - m$1, - i || d$1 - ]; + toNumber() { + let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0); + if (!Number.isSafeInteger(result)) throw new Error("cannot convert to safe number"); + return result; } }; - exports.ReflectionBinaryWriter = ReflectionBinaryWriter; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-create.js -var require_reflection_create = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-create.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.reflectionCreate = void 0; - const reflection_scalar_default_1$1 = require_reflection_scalar_default(); - const message_type_contract_1$3 = require_message_type_contract(); /** - * Creates an instance of the generic message, using the field - * information. + * 64-bit unsigned integer as two 32-bit values. + * Converts between `string`, `number` and `bigint` representations. */ - function reflectionCreate(type) { + var PbULong = class PbULong extends SharedPbLong { /** - * This ternary can be removed in the next major version. - * The `Object.create()` code path utilizes a new `messagePrototype` - * property on the `IMessageType` which has this same `MESSAGE_TYPE` - * non-enumerable property on it. Doing it this way means that we only - * pay the cost of `Object.defineProperty()` once per `IMessageType` - * class of once per "instance". The falsy code path is only provided - * for backwards compatibility in cases where the runtime library is - * updated without also updating the generated code. + * Create instance from a `string`, `number` or `bigint`. */ - const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, message_type_contract_1$3.MESSAGE_TYPE, { value: type }); - for (let field of type.fields) { - let name = field.localName; - if (field.opt) continue; - if (field.oneof) msg[field.oneof] = { oneofKind: void 0 }; - else if (field.repeat) msg[name] = []; - else switch (field.kind) { - case "scalar": - msg[name] = reflection_scalar_default_1$1.reflectionScalarDefault(field.T, field.L); - break; - case "enum": - msg[name] = 0; - break; - case "map": - msg[name] = {}; - break; + static from(value) { + if (BI) switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + if (value == "") throw new Error("string is no integer"); + value = BI.C(value); + case "number": + if (value === 0) return this.ZERO; + value = BI.C(value); + case "bigint": + if (!value) return this.ZERO; + if (value < BI.UMIN) throw new Error("signed value for ulong"); + if (value > BI.UMAX) throw new Error("ulong too large"); + BI.V.setBigUint64(0, value, true); + return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true)); + } + else switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + value = value.trim(); + if (!RE_DECIMAL_STR.test(value)) throw new Error("string is no integer"); + let [minus, lo, hi] = goog_varint_1.int64fromString(value); + if (minus) throw new Error("signed value for ulong"); + return new PbULong(lo, hi); + case "number": + if (value == 0) return this.ZERO; + if (!Number.isSafeInteger(value)) throw new Error("number is no integer"); + if (value < 0) throw new Error("signed value for ulong"); + return new PbULong(value, value / TWO_PWR_32_DBL); } + throw new Error("unknown value " + typeof value); } - return msg; - } - exports.reflectionCreate = reflectionCreate; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-merge-partial.js -var require_reflection_merge_partial = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-merge-partial.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.reflectionMergePartial = void 0; + /** + * Convert to decimal string. + */ + toString() { + return BI ? this.toBigInt().toString() : goog_varint_1.int64toString(this.lo, this.hi); + } + /** + * Convert to native bigint. + */ + toBigInt() { + assertBi(BI); + BI.V.setInt32(0, this.lo, true); + BI.V.setInt32(4, this.hi, true); + return BI.V.getBigUint64(0, true); + } + }; + exports.PbULong = PbULong; /** - * Copy partial data into the target message. - * - * If a singular scalar or enum field is present in the source, it - * replaces the field in the target. - * - * If a singular message field is present in the source, it is merged - * with the target field by calling mergePartial() of the responsible - * message type. - * - * If a repeated field is present in the source, its values replace - * all values in the target array, removing extraneous values. - * Repeated message fields are copied, not merged. - * - * If a map field is present in the source, entries are added to the - * target map, replacing entries with the same key. Entries that only - * exist in the target remain. Entries with message values are copied, - * not merged. - * - * Note that this function differs from protobuf merge semantics, - * which appends repeated fields. + * ulong 0 singleton. */ - function reflectionMergePartial(info, target, source) { - let fieldValue, input = source, output; - for (let field of info.fields) { - let name = field.localName; - if (field.oneof) { - const group = input[field.oneof]; - if ((group === null || group === void 0 ? void 0 : group.oneofKind) == void 0) continue; - fieldValue = group[name]; - output = target[field.oneof]; - output.oneofKind = group.oneofKind; - if (fieldValue == void 0) { - delete output[name]; - continue; - } - } else { - fieldValue = input[name]; - output = target; - if (fieldValue == void 0) continue; + PbULong.ZERO = new PbULong(0, 0); + /** + * 64-bit signed integer as two 32-bit values. + * Converts between `string`, `number` and `bigint` representations. + */ + var PbLong = class PbLong extends SharedPbLong { + /** + * Create instance from a `string`, `number` or `bigint`. + */ + static from(value) { + if (BI) switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + if (value == "") throw new Error("string is no integer"); + value = BI.C(value); + case "number": + if (value === 0) return this.ZERO; + value = BI.C(value); + case "bigint": + if (!value) return this.ZERO; + if (value < BI.MIN) throw new Error("signed long too small"); + if (value > BI.MAX) throw new Error("signed long too large"); + BI.V.setBigInt64(0, value, true); + return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true)); } - if (field.repeat) output[name].length = fieldValue.length; - switch (field.kind) { - case "scalar": - case "enum": - if (field.repeat) for (let i = 0; i < fieldValue.length; i++) output[name][i] = fieldValue[i]; - else output[name] = fieldValue; - break; - case "message": - let T = field.T(); - if (field.repeat) for (let i = 0; i < fieldValue.length; i++) output[name][i] = T.create(fieldValue[i]); - else if (output[name] === void 0) output[name] = T.create(fieldValue); - else T.mergePartial(output[name], fieldValue); - break; - case "map": - switch (field.V.kind) { - case "scalar": - case "enum": - Object.assign(output[name], fieldValue); - break; - case "message": - let T$1 = field.V.T(); - for (let k of Object.keys(fieldValue)) output[name][k] = T$1.create(fieldValue[k]); - break; - } - break; + else switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + value = value.trim(); + if (!RE_DECIMAL_STR.test(value)) throw new Error("string is no integer"); + let [minus, lo, hi] = goog_varint_1.int64fromString(value); + if (minus) { + if (hi > HALF_2_PWR_32 || hi == HALF_2_PWR_32 && lo != 0) throw new Error("signed long too small"); + } else if (hi >= HALF_2_PWR_32) throw new Error("signed long too large"); + let pbl = new PbLong(lo, hi); + return minus ? pbl.negate() : pbl; + case "number": + if (value == 0) return this.ZERO; + if (!Number.isSafeInteger(value)) throw new Error("number is no integer"); + return value > 0 ? new PbLong(value, value / TWO_PWR_32_DBL) : new PbLong(-value, -value / TWO_PWR_32_DBL).negate(); } + throw new Error("unknown value " + typeof value); } - } - exports.reflectionMergePartial = reflectionMergePartial; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-equals.js -var require_reflection_equals = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-equals.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.reflectionEquals = void 0; - const reflection_info_1$4 = require_reflection_info$1(); - /** - * Determines whether two message of the same type have the same field values. - * Checks for deep equality, traversing repeated fields, oneof groups, maps - * and messages recursively. - * Will also return true if both messages are `undefined`. - */ - function reflectionEquals(info, a, b) { - if (a === b) return true; - if (!a || !b) return false; - for (let field of info.fields) { - let localName = field.localName; - let val_a = field.oneof ? a[field.oneof][localName] : a[localName]; - let val_b = field.oneof ? b[field.oneof][localName] : b[localName]; - switch (field.kind) { - case "enum": - case "scalar": - let t = field.kind == "enum" ? reflection_info_1$4.ScalarType.INT32 : field.T; - if (!(field.repeat ? repeatedPrimitiveEq(t, val_a, val_b) : primitiveEq(t, val_a, val_b))) return false; - break; - case "map": - if (!(field.V.kind == "message" ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b)) : repeatedPrimitiveEq(field.V.kind == "enum" ? reflection_info_1$4.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b)))) return false; - break; - case "message": - let T = field.T(); - if (!(field.repeat ? repeatedMsgEq(T, val_a, val_b) : T.equals(val_a, val_b))) return false; - break; + /** + * Do we have a minus sign? + */ + isNegative() { + return (this.hi & HALF_2_PWR_32) !== 0; + } + /** + * Negate two's complement. + * Invert all the bits and add one to the result. + */ + negate() { + let hi = ~this.hi, lo = this.lo; + if (lo) lo = ~lo + 1; + else hi += 1; + return new PbLong(lo, hi); + } + /** + * Convert to decimal string. + */ + toString() { + if (BI) return this.toBigInt().toString(); + if (this.isNegative()) { + let n = this.negate(); + return "-" + goog_varint_1.int64toString(n.lo, n.hi); } + return goog_varint_1.int64toString(this.lo, this.hi); } - return true; - } - exports.reflectionEquals = reflectionEquals; - const objectValues = Object.values; - function primitiveEq(type, a, b) { - if (a === b) return true; - if (type !== reflection_info_1$4.ScalarType.BYTES) return false; - let ba = a; - let bb = b; - if (ba.length !== bb.length) return false; - for (let i = 0; i < ba.length; i++) if (ba[i] != bb[i]) return false; - return true; - } - function repeatedPrimitiveEq(type, a, b) { - if (a.length !== b.length) return false; - for (let i = 0; i < a.length; i++) if (!primitiveEq(type, a[i], b[i])) return false; - return true; - } - function repeatedMsgEq(type, a, b) { - if (a.length !== b.length) return false; - for (let i = 0; i < a.length; i++) if (!type.equals(a[i], b[i])) return false; - return true; - } -} }); + /** + * Convert to native bigint. + */ + toBigInt() { + assertBi(BI); + BI.V.setInt32(0, this.lo, true); + BI.V.setInt32(4, this.hi, true); + return BI.V.getBigInt64(0, true); + } + }; + exports.PbLong = PbLong; + /** + * long 0 singleton. + */ + PbLong.ZERO = new PbLong(0, 0); +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type.js -var require_message_type = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/binary-reader.js +var require_binary_reader = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.MessageType = void 0; - const message_type_contract_1$2 = require_message_type_contract(); - const reflection_info_1$3 = require_reflection_info$1(); - const reflection_type_check_1$1 = require_reflection_type_check(); - const reflection_json_reader_1$1 = require_reflection_json_reader(); - const reflection_json_writer_1$1 = require_reflection_json_writer(); - const reflection_binary_reader_1$1 = require_reflection_binary_reader(); - const reflection_binary_writer_1$1 = require_reflection_binary_writer(); - const reflection_create_1$1 = require_reflection_create(); - const reflection_merge_partial_1$1 = require_reflection_merge_partial(); - const json_typings_1$1 = require_json_typings(); - const json_format_contract_1$1 = require_json_format_contract(); - const reflection_equals_1$1 = require_reflection_equals(); - const binary_writer_1$1 = require_binary_writer(); - const binary_reader_1$1 = require_binary_reader(); - const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})); + exports.BinaryReader = exports.binaryReadOptions = void 0; + const binary_format_contract_1 = require_binary_format_contract(); + const pb_long_1 = require_pb_long(); + const goog_varint_1 = require_goog_varint(); + const defaultsRead = { + readUnknownField: true, + readerFactory: (bytes) => new BinaryReader(bytes) + }; /** - * This standard message type provides reflection-based - * operations to work with a message. + * Make options for reading binary data form partial options. */ - var MessageType = class { - constructor(name, fields, options) { - this.defaultCheckDepth = 16; - this.typeName = name; - this.fields = fields.map(reflection_info_1$3.normalizeFieldInfo); - this.options = options !== null && options !== void 0 ? options : {}; - this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, baseDescriptors), { [message_type_contract_1$2.MESSAGE_TYPE]: { value: this } })); - this.refTypeCheck = new reflection_type_check_1$1.ReflectionTypeCheck(this); - this.refJsonReader = new reflection_json_reader_1$1.ReflectionJsonReader(this); - this.refJsonWriter = new reflection_json_writer_1$1.ReflectionJsonWriter(this); - this.refBinReader = new reflection_binary_reader_1$1.ReflectionBinaryReader(this); - this.refBinWriter = new reflection_binary_writer_1$1.ReflectionBinaryWriter(this); + function binaryReadOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead; + } + exports.binaryReadOptions = binaryReadOptions; + var BinaryReader = class { + constructor(buf, textDecoder) { + this.varint64 = goog_varint_1.varint64read; + /** + * Read a `uint32` field, an unsigned 32 bit varint. + */ + this.uint32 = goog_varint_1.varint32read; + this.buf = buf; + this.len = buf.length; + this.pos = 0; + this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder("utf-8", { + fatal: true, + ignoreBOM: true + }); } - create(value) { - let message = reflection_create_1$1.reflectionCreate(this); - if (value !== void 0) reflection_merge_partial_1$1.reflectionMergePartial(this, message, value); - return message; + /** + * Reads a tag - field number and wire type. + */ + tag() { + let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7; + if (fieldNo <= 0 || wireType < 0 || wireType > 5) throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType); + return [fieldNo, wireType]; } /** - * Clone the message. - * - * Unknown fields are discarded. + * Skip one element on the wire and return the skipped data. + * Supports WireType.StartGroup since v2.0.0-alpha.23. */ - clone(message) { - let copy$1 = this.create(); - reflection_merge_partial_1$1.reflectionMergePartial(this, copy$1, message); - return copy$1; + skip(wireType) { + let start = this.pos; + switch (wireType) { + case binary_format_contract_1.WireType.Varint: + while (this.buf[this.pos++] & 128); + break; + case binary_format_contract_1.WireType.Bit64: this.pos += 4; + case binary_format_contract_1.WireType.Bit32: + this.pos += 4; + break; + case binary_format_contract_1.WireType.LengthDelimited: + let len = this.uint32(); + this.pos += len; + break; + case binary_format_contract_1.WireType.StartGroup: + let t; + while ((t = this.tag()[1]) !== binary_format_contract_1.WireType.EndGroup) this.skip(t); + break; + default: throw new Error("cant skip wire type " + wireType); + } + this.assertBounds(); + return this.buf.subarray(start, this.pos); } /** - * Determines whether two message of the same type have the same field values. - * Checks for deep equality, traversing repeated fields, oneof groups, maps - * and messages recursively. - * Will also return true if both messages are `undefined`. + * Throws error if position in byte array is out of range. */ - equals(a, b) { - return reflection_equals_1$1.reflectionEquals(this, a, b); + assertBounds() { + if (this.pos > this.len) throw new RangeError("premature EOF"); } /** - * Is the given value assignable to our message type - * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)? + * Read a `int32` field, a signed 32 bit varint. */ - is(arg, depth = this.defaultCheckDepth) { - return this.refTypeCheck.is(arg, depth, false); + int32() { + return this.uint32() | 0; } /** - * Is the given value assignable to our message type, - * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)? + * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint. */ - isAssignable(arg, depth = this.defaultCheckDepth) { - return this.refTypeCheck.is(arg, depth, true); + sint32() { + let zze = this.uint32(); + return zze >>> 1 ^ -(zze & 1); } /** - * Copy partial data into the target message. + * Read a `int64` field, a signed 64-bit varint. */ - mergePartial(target, source) { - reflection_merge_partial_1$1.reflectionMergePartial(this, target, source); + int64() { + return new pb_long_1.PbLong(...this.varint64()); } /** - * Create a new message from binary format. + * Read a `uint64` field, an unsigned 64-bit varint. */ - fromBinary(data, options) { - let opt = binary_reader_1$1.binaryReadOptions(options); - return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt); + uint64() { + return new pb_long_1.PbULong(...this.varint64()); } /** - * Read a new message from a JSON value. + * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint. */ - fromJson(json$1, options) { - return this.internalJsonRead(json$1, json_format_contract_1$1.jsonReadOptions(options)); + sint64() { + let [lo, hi] = this.varint64(); + let s = -(lo & 1); + lo = (lo >>> 1 | (hi & 1) << 31) ^ s; + hi = hi >>> 1 ^ s; + return new pb_long_1.PbLong(lo, hi); } /** - * Read a new message from a JSON string. - * This is equivalent to `T.fromJson(JSON.parse(json))`. + * Read a `bool` field, a variant. */ - fromJsonString(json$1, options) { - let value = JSON.parse(json$1); - return this.fromJson(value, options); + bool() { + let [lo, hi] = this.varint64(); + return lo !== 0 || hi !== 0; } /** - * Write the message to canonical JSON value. + * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer. */ - toJson(message, options) { - return this.internalJsonWrite(message, json_format_contract_1$1.jsonWriteOptions(options)); + fixed32() { + return this.view.getUint32((this.pos += 4) - 4, true); } /** - * Convert the message to canonical JSON string. - * This is equivalent to `JSON.stringify(T.toJson(t))` + * Read a `sfixed32` field, a signed, fixed-length 32-bit integer. */ - toJsonString(message, options) { - var _a$2; - let value = this.toJson(message, options); - return JSON.stringify(value, null, (_a$2 = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a$2 !== void 0 ? _a$2 : 0); + sfixed32() { + return this.view.getInt32((this.pos += 4) - 4, true); } /** - * Write the message to binary format. + * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer. */ - toBinary(message, options) { - let opt = binary_writer_1$1.binaryWriteOptions(options); - return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish(); + fixed64() { + return new pb_long_1.PbULong(this.sfixed32(), this.sfixed32()); } /** - * This is an internal method. If you just want to read a message from - * JSON, use `fromJson()` or `fromJsonString()`. - * - * Reads JSON value and merges the fields into the target - * according to protobuf rules. If the target is omitted, - * a new instance is created first. + * Read a `fixed64` field, a signed, fixed-length 64-bit integer. */ - internalJsonRead(json$1, options, target) { - if (json$1 !== null && typeof json$1 == "object" && !Array.isArray(json$1)) { - let message = target !== null && target !== void 0 ? target : this.create(); - this.refJsonReader.read(json$1, message, options); - return message; - } - throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1$1.typeofJsonValue(json$1)}.`); + sfixed64() { + return new pb_long_1.PbLong(this.sfixed32(), this.sfixed32()); } /** - * This is an internal method. If you just want to write a message - * to JSON, use `toJson()` or `toJsonString(). - * - * Writes JSON value and returns it. + * Read a `float` field, 32-bit floating point number. */ - internalJsonWrite(message, options) { - return this.refJsonWriter.write(message, options); + float() { + return this.view.getFloat32((this.pos += 4) - 4, true); } /** - * This is an internal method. If you just want to write a message - * in binary format, use `toBinary()`. - * - * Serializes the message in binary format and appends it to the given - * writer. Returns passed writer. + * Read a `double` field, a 64-bit floating point number. */ - internalBinaryWrite(message, writer, options) { - this.refBinWriter.write(message, writer, options); - return writer; + double() { + return this.view.getFloat64((this.pos += 8) - 8, true); } /** - * This is an internal method. If you just want to read a message from - * binary data, use `fromBinary()`. - * - * Reads data from binary format and merges the fields into - * the target according to protobuf rules. If the target is - * omitted, a new instance is created first. + * Read a `bytes` field, length-delimited arbitrary data. */ - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(); - this.refBinReader.read(reader, message, options, length); - return message; + bytes() { + let len = this.uint32(); + let start = this.pos; + this.pos += len; + this.assertBounds(); + return this.buf.subarray(start, start + len); + } + /** + * Read a `string` field, length-delimited data converted to UTF-8 text. + */ + string() { + return this.textDecoder.decode(this.bytes()); } }; - exports.MessageType = MessageType; -} }); + exports.BinaryReader = BinaryReader; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-contains-message-type.js -var require_reflection_contains_message_type = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-contains-message-type.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/assert.js +var require_assert = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.containsMessageType = void 0; - const message_type_contract_1$1 = require_message_type_contract(); + exports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0; /** - * Check if the provided object is a proto message. - * - * Note that this is an experimental feature - it is here to stay, but - * implementation details may change without notice. + * assert that condition is true or throw error (with message) */ - function containsMessageType(msg) { - return msg[message_type_contract_1$1.MESSAGE_TYPE] != null; + function assert(condition, msg) { + if (!condition) throw new Error(msg); } - exports.containsMessageType = containsMessageType; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/enum-object.js -var require_enum_object = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/enum-object.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0; + exports.assert = assert; /** - * Is this a lookup object generated by Typescript, for a Typescript enum - * generated by protobuf-ts? - * - * - No `const enum` (enum must not be inlined, we need reverse mapping). - * - No string enum (we need int32 for protobuf). - * - Must have a value for 0 (otherwise, we would need to support custom default values). + * assert that value cannot exist = type `never`. throw runtime error if it does. */ - function isEnumObject(arg) { - if (typeof arg != "object" || arg === null) return false; - if (!arg.hasOwnProperty(0)) return false; - for (let k of Object.keys(arg)) { - let num = parseInt(k); - if (!Number.isNaN(num)) { - let nam = arg[num]; - if (nam === void 0) return false; - if (arg[nam] !== num) return false; - } else { - let num$1 = arg[k]; - if (num$1 === void 0) return false; - if (typeof num$1 !== "number") return false; - if (arg[num$1] === void 0) return false; - } - } - return true; + function assertNever(value, msg) { + throw new Error(msg !== null && msg !== void 0 ? msg : "Unexpected object: " + value); } - exports.isEnumObject = isEnumObject; - /** - * Lists all values of a Typescript enum, as an array of objects with a "name" - * property and a "number" property. - * - * Note that it is possible that a number appears more than once, because it is - * possible to have aliases in an enum. - * - * Throws if the enum does not adhere to the rules of enums generated by - * protobuf-ts. See `isEnumObject()`. - */ - function listEnumValues(enumObject) { - if (!isEnumObject(enumObject)) throw new Error("not a typescript enum object"); - let values = []; - for (let [name, number] of Object.entries(enumObject)) if (typeof number == "number") values.push({ - name, - number - }); - return values; + exports.assertNever = assertNever; + const FLOAT32_MAX = 34028234663852886e22, FLOAT32_MIN = -34028234663852886e22, UINT32_MAX = 4294967295, INT32_MAX = 2147483647, INT32_MIN = -2147483648; + function assertInt32(arg) { + if (typeof arg !== "number") throw new Error("invalid int 32: " + typeof arg); + if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN) throw new Error("invalid int 32: " + arg); } - exports.listEnumValues = listEnumValues; - /** - * Lists the names of a Typescript enum. - * - * Throws if the enum does not adhere to the rules of enums generated by - * protobuf-ts. See `isEnumObject()`. - */ - function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val) => val.name); + exports.assertInt32 = assertInt32; + function assertUInt32(arg) { + if (typeof arg !== "number") throw new Error("invalid uint 32: " + typeof arg); + if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0) throw new Error("invalid uint 32: " + arg); } - exports.listEnumNames = listEnumNames; - /** - * Lists the numbers of a Typescript enum. - * - * Throws if the enum does not adhere to the rules of enums generated by - * protobuf-ts. See `isEnumObject()`. - */ - function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); + exports.assertUInt32 = assertUInt32; + function assertFloat32(arg) { + if (typeof arg !== "number") throw new Error("invalid float 32: " + typeof arg); + if (!Number.isFinite(arg)) return; + if (arg > FLOAT32_MAX || arg < FLOAT32_MIN) throw new Error("invalid float 32: " + arg); } - exports.listEnumNumbers = listEnumNumbers; -} }); + exports.assertFloat32 = assertFloat32; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs$1 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports) { - // webpack verbose output hints that this should be useful +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/binary-writer.js +var require_binary_writer = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - var json_typings_1 = require_json_typings(); - Object.defineProperty(exports, "typeofJsonValue", { - enumerable: true, - get: function() { - return json_typings_1.typeofJsonValue; - } - }); - Object.defineProperty(exports, "isJsonObject", { - enumerable: true, - get: function() { - return json_typings_1.isJsonObject; - } - }); - var base64_1 = require_base64(); - Object.defineProperty(exports, "base64decode", { - enumerable: true, - get: function() { - return base64_1.base64decode; - } - }); - Object.defineProperty(exports, "base64encode", { - enumerable: true, - get: function() { - return base64_1.base64encode; - } - }); - var protobufjs_utf8_1 = require_protobufjs_utf8(); - Object.defineProperty(exports, "utf8read", { - enumerable: true, - get: function() { - return protobufjs_utf8_1.utf8read; - } - }); - var binary_format_contract_1 = require_binary_format_contract(); - Object.defineProperty(exports, "WireType", { - enumerable: true, - get: function() { - return binary_format_contract_1.WireType; - } - }); - Object.defineProperty(exports, "mergeBinaryOptions", { - enumerable: true, - get: function() { - return binary_format_contract_1.mergeBinaryOptions; - } - }); - Object.defineProperty(exports, "UnknownFieldHandler", { - enumerable: true, - get: function() { - return binary_format_contract_1.UnknownFieldHandler; - } - }); - var binary_reader_1 = require_binary_reader(); - Object.defineProperty(exports, "BinaryReader", { - enumerable: true, - get: function() { - return binary_reader_1.BinaryReader; - } - }); - Object.defineProperty(exports, "binaryReadOptions", { - enumerable: true, - get: function() { - return binary_reader_1.binaryReadOptions; - } - }); - var binary_writer_1 = require_binary_writer(); - Object.defineProperty(exports, "BinaryWriter", { - enumerable: true, - get: function() { - return binary_writer_1.BinaryWriter; - } - }); - Object.defineProperty(exports, "binaryWriteOptions", { - enumerable: true, - get: function() { - return binary_writer_1.binaryWriteOptions; - } - }); - var pb_long_1 = require_pb_long(); - Object.defineProperty(exports, "PbLong", { - enumerable: true, - get: function() { - return pb_long_1.PbLong; - } - }); - Object.defineProperty(exports, "PbULong", { - enumerable: true, - get: function() { - return pb_long_1.PbULong; - } - }); - var json_format_contract_1 = require_json_format_contract(); - Object.defineProperty(exports, "jsonReadOptions", { - enumerable: true, - get: function() { - return json_format_contract_1.jsonReadOptions; - } - }); - Object.defineProperty(exports, "jsonWriteOptions", { - enumerable: true, - get: function() { - return json_format_contract_1.jsonWriteOptions; - } - }); - Object.defineProperty(exports, "mergeJsonOptions", { - enumerable: true, - get: function() { - return json_format_contract_1.mergeJsonOptions; - } - }); - var message_type_contract_1 = require_message_type_contract(); - Object.defineProperty(exports, "MESSAGE_TYPE", { - enumerable: true, - get: function() { - return message_type_contract_1.MESSAGE_TYPE; - } - }); - var message_type_1 = require_message_type(); - Object.defineProperty(exports, "MessageType", { - enumerable: true, - get: function() { - return message_type_1.MessageType; - } - }); - var reflection_info_1$2 = require_reflection_info$1(); - Object.defineProperty(exports, "ScalarType", { - enumerable: true, - get: function() { - return reflection_info_1$2.ScalarType; - } - }); - Object.defineProperty(exports, "LongType", { - enumerable: true, - get: function() { - return reflection_info_1$2.LongType; - } - }); - Object.defineProperty(exports, "RepeatType", { - enumerable: true, - get: function() { - return reflection_info_1$2.RepeatType; - } - }); - Object.defineProperty(exports, "normalizeFieldInfo", { - enumerable: true, - get: function() { - return reflection_info_1$2.normalizeFieldInfo; - } - }); - Object.defineProperty(exports, "readFieldOptions", { - enumerable: true, - get: function() { - return reflection_info_1$2.readFieldOptions; - } - }); - Object.defineProperty(exports, "readFieldOption", { - enumerable: true, - get: function() { - return reflection_info_1$2.readFieldOption; - } - }); - Object.defineProperty(exports, "readMessageOption", { - enumerable: true, - get: function() { - return reflection_info_1$2.readMessageOption; - } - }); - var reflection_type_check_1 = require_reflection_type_check(); - Object.defineProperty(exports, "ReflectionTypeCheck", { - enumerable: true, - get: function() { - return reflection_type_check_1.ReflectionTypeCheck; - } - }); - var reflection_create_1 = require_reflection_create(); - Object.defineProperty(exports, "reflectionCreate", { - enumerable: true, - get: function() { - return reflection_create_1.reflectionCreate; - } - }); - var reflection_scalar_default_1 = require_reflection_scalar_default(); - Object.defineProperty(exports, "reflectionScalarDefault", { - enumerable: true, - get: function() { - return reflection_scalar_default_1.reflectionScalarDefault; - } - }); - var reflection_merge_partial_1 = require_reflection_merge_partial(); - Object.defineProperty(exports, "reflectionMergePartial", { - enumerable: true, - get: function() { - return reflection_merge_partial_1.reflectionMergePartial; + exports.BinaryWriter = exports.binaryWriteOptions = void 0; + const pb_long_1 = require_pb_long(); + const goog_varint_1 = require_goog_varint(); + const assert_1 = require_assert(); + const defaultsWrite = { + writeUnknownFields: true, + writerFactory: () => new BinaryWriter() + }; + /** + * Make options for writing binary data form partial options. + */ + function binaryWriteOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite; + } + exports.binaryWriteOptions = binaryWriteOptions; + var BinaryWriter = class { + constructor(textEncoder) { + /** + * Previous fork states. + */ + this.stack = []; + this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder(); + this.chunks = []; + this.buf = []; } - }); - var reflection_equals_1 = require_reflection_equals(); - Object.defineProperty(exports, "reflectionEquals", { - enumerable: true, - get: function() { - return reflection_equals_1.reflectionEquals; + /** + * Return all bytes written and reset this writer. + */ + finish() { + this.chunks.push(new Uint8Array(this.buf)); + let len = 0; + for (let i = 0; i < this.chunks.length; i++) len += this.chunks[i].length; + let bytes = new Uint8Array(len); + let offset = 0; + for (let i = 0; i < this.chunks.length; i++) { + bytes.set(this.chunks[i], offset); + offset += this.chunks[i].length; + } + this.chunks = []; + return bytes; } - }); - var reflection_binary_reader_1 = require_reflection_binary_reader(); - Object.defineProperty(exports, "ReflectionBinaryReader", { - enumerable: true, - get: function() { - return reflection_binary_reader_1.ReflectionBinaryReader; + /** + * Start a new fork for length-delimited data like a message + * or a packed repeated field. + * + * Must be joined later with `join()`. + */ + fork() { + this.stack.push({ + chunks: this.chunks, + buf: this.buf + }); + this.chunks = []; + this.buf = []; + return this; } - }); - var reflection_binary_writer_1 = require_reflection_binary_writer(); - Object.defineProperty(exports, "ReflectionBinaryWriter", { - enumerable: true, - get: function() { - return reflection_binary_writer_1.ReflectionBinaryWriter; + /** + * Join the last fork. Write its length and bytes, then + * return to the previous state. + */ + join() { + let chunk = this.finish(); + let prev = this.stack.pop(); + if (!prev) throw new Error("invalid state, fork stack empty"); + this.chunks = prev.chunks; + this.buf = prev.buf; + this.uint32(chunk.byteLength); + return this.raw(chunk); } - }); - var reflection_json_reader_1 = require_reflection_json_reader(); - Object.defineProperty(exports, "ReflectionJsonReader", { - enumerable: true, - get: function() { - return reflection_json_reader_1.ReflectionJsonReader; + /** + * Writes a tag (field number and wire type). + * + * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`. + * + * Generated code should compute the tag ahead of time and call `uint32()`. + */ + tag(fieldNo, type) { + return this.uint32((fieldNo << 3 | type) >>> 0); } - }); - var reflection_json_writer_1 = require_reflection_json_writer(); - Object.defineProperty(exports, "ReflectionJsonWriter", { - enumerable: true, - get: function() { - return reflection_json_writer_1.ReflectionJsonWriter; + /** + * Write a chunk of raw bytes. + */ + raw(chunk) { + if (this.buf.length) { + this.chunks.push(new Uint8Array(this.buf)); + this.buf = []; + } + this.chunks.push(chunk); + return this; } - }); - var reflection_contains_message_type_1 = require_reflection_contains_message_type(); - Object.defineProperty(exports, "containsMessageType", { - enumerable: true, - get: function() { - return reflection_contains_message_type_1.containsMessageType; + /** + * Write a `uint32` value, an unsigned 32 bit varint. + */ + uint32(value) { + assert_1.assertUInt32(value); + while (value > 127) { + this.buf.push(value & 127 | 128); + value = value >>> 7; + } + this.buf.push(value); + return this; } - }); - var oneof_1 = require_oneof(); - Object.defineProperty(exports, "isOneofGroup", { - enumerable: true, - get: function() { - return oneof_1.isOneofGroup; + /** + * Write a `int32` value, a signed 32 bit varint. + */ + int32(value) { + assert_1.assertInt32(value); + goog_varint_1.varint32write(value, this.buf); + return this; } - }); - Object.defineProperty(exports, "setOneofValue", { - enumerable: true, - get: function() { - return oneof_1.setOneofValue; + /** + * Write a `bool` value, a variant. + */ + bool(value) { + this.buf.push(value ? 1 : 0); + return this; } - }); - Object.defineProperty(exports, "getOneofValue", { - enumerable: true, - get: function() { - return oneof_1.getOneofValue; + /** + * Write a `bytes` value, length-delimited arbitrary data. + */ + bytes(value) { + this.uint32(value.byteLength); + return this.raw(value); } - }); - Object.defineProperty(exports, "clearOneofValue", { - enumerable: true, - get: function() { - return oneof_1.clearOneofValue; + /** + * Write a `string` value, length-delimited data converted to UTF-8 text. + */ + string(value) { + let chunk = this.textEncoder.encode(value); + this.uint32(chunk.byteLength); + return this.raw(chunk); } - }); - Object.defineProperty(exports, "getSelectedOneofValue", { - enumerable: true, - get: function() { - return oneof_1.getSelectedOneofValue; + /** + * Write a `float` value, 32-bit floating point number. + */ + float(value) { + assert_1.assertFloat32(value); + let chunk = new Uint8Array(4); + new DataView(chunk.buffer).setFloat32(0, value, true); + return this.raw(chunk); } - }); - var enum_object_1 = require_enum_object(); - Object.defineProperty(exports, "listEnumValues", { - enumerable: true, - get: function() { - return enum_object_1.listEnumValues; + /** + * Write a `double` value, a 64-bit floating point number. + */ + double(value) { + let chunk = new Uint8Array(8); + new DataView(chunk.buffer).setFloat64(0, value, true); + return this.raw(chunk); } - }); - Object.defineProperty(exports, "listEnumNames", { - enumerable: true, - get: function() { - return enum_object_1.listEnumNames; + /** + * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer. + */ + fixed32(value) { + assert_1.assertUInt32(value); + let chunk = new Uint8Array(4); + new DataView(chunk.buffer).setUint32(0, value, true); + return this.raw(chunk); } - }); - Object.defineProperty(exports, "listEnumNumbers", { - enumerable: true, - get: function() { - return enum_object_1.listEnumNumbers; + /** + * Write a `sfixed32` value, a signed, fixed-length 32-bit integer. + */ + sfixed32(value) { + assert_1.assertInt32(value); + let chunk = new Uint8Array(4); + new DataView(chunk.buffer).setInt32(0, value, true); + return this.raw(chunk); } - }); - Object.defineProperty(exports, "isEnumObject", { - enumerable: true, - get: function() { - return enum_object_1.isEnumObject; + /** + * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint. + */ + sint32(value) { + assert_1.assertInt32(value); + value = (value << 1 ^ value >> 31) >>> 0; + goog_varint_1.varint32write(value, this.buf); + return this; } - }); - var lower_camel_case_1 = require_lower_camel_case(); - Object.defineProperty(exports, "lowerCamelCase", { - enumerable: true, - get: function() { - return lower_camel_case_1.lowerCamelCase; + /** + * Write a `fixed64` value, a signed, fixed-length 64-bit integer. + */ + sfixed64(value) { + let chunk = new Uint8Array(8); + let view = new DataView(chunk.buffer); + let long = pb_long_1.PbLong.from(value); + view.setInt32(0, long.lo, true); + view.setInt32(4, long.hi, true); + return this.raw(chunk); } - }); - var assert_1$3 = require_assert(); - Object.defineProperty(exports, "assert", { - enumerable: true, - get: function() { - return assert_1$3.assert; + /** + * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer. + */ + fixed64(value) { + let chunk = new Uint8Array(8); + let view = new DataView(chunk.buffer); + let long = pb_long_1.PbULong.from(value); + view.setInt32(0, long.lo, true); + view.setInt32(4, long.hi, true); + return this.raw(chunk); } - }); - Object.defineProperty(exports, "assertNever", { - enumerable: true, - get: function() { - return assert_1$3.assertNever; + /** + * Write a `int64` value, a signed 64-bit varint. + */ + int64(value) { + let long = pb_long_1.PbLong.from(value); + goog_varint_1.varint64write(long.lo, long.hi, this.buf); + return this; } - }); - Object.defineProperty(exports, "assertInt32", { - enumerable: true, - get: function() { - return assert_1$3.assertInt32; + /** + * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint. + */ + sint64(value) { + let long = pb_long_1.PbLong.from(value), sign = long.hi >> 31, lo = long.lo << 1 ^ sign, hi = (long.hi << 1 | long.lo >>> 31) ^ sign; + goog_varint_1.varint64write(lo, hi, this.buf); + return this; } - }); - Object.defineProperty(exports, "assertUInt32", { - enumerable: true, - get: function() { - return assert_1$3.assertUInt32; + /** + * Write a `uint64` value, an unsigned 64-bit varint. + */ + uint64(value) { + let long = pb_long_1.PbULong.from(value); + goog_varint_1.varint64write(long.lo, long.hi, this.buf); + return this; } - }); - Object.defineProperty(exports, "assertFloat32", { - enumerable: true, - get: function() { - return assert_1$3.assertFloat32; + }; + exports.BinaryWriter = BinaryWriter; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/json-format-contract.js +var require_json_format_contract = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0; + const defaultsWrite = { + emitDefaultValues: false, + enumAsInteger: false, + useProtoFieldName: false, + prettySpaces: 0 + }, defaultsRead = { ignoreUnknownFields: false }; + /** + * Make options for reading JSON data from partial options. + */ + function jsonReadOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead; + } + exports.jsonReadOptions = jsonReadOptions; + /** + * Make options for writing JSON data from partial options. + */ + function jsonWriteOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite; + } + exports.jsonWriteOptions = jsonWriteOptions; + /** + * Merges JSON write or read options. Later values override earlier values. Type registries are merged. + */ + function mergeJsonOptions(a, b) { + var _a, _b; + let c = Object.assign(Object.assign({}, a), b); + c.typeRegistry = [...(_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : [], ...(_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : []]; + return c; + } + exports.mergeJsonOptions = mergeJsonOptions; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/message-type-contract.js +var require_message_type_contract = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MESSAGE_TYPE = void 0; + /** + * The symbol used as a key on message objects to store the message type. + * + * Note that this is an experimental feature - it is here to stay, but + * implementation details may change without notice. + */ + exports.MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type"); +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/lower-camel-case.js +var require_lower_camel_case = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.lowerCamelCase = void 0; + /** + * Converts snake_case to lowerCamelCase. + * + * Should behave like protoc: + * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118 + */ + function lowerCamelCase(snakeCase) { + let capNext = false; + const sb = []; + for (let i = 0; i < snakeCase.length; i++) { + let next = snakeCase.charAt(i); + if (next == "_") capNext = true; + else if (/\d/.test(next)) { + sb.push(next); + capNext = true; + } else if (capNext) { + sb.push(next.toUpperCase()); + capNext = false; + } else if (i == 0) sb.push(next.toLowerCase()); + else sb.push(next); } - }); -} }); + return sb.join(""); + } + exports.lowerCamelCase = lowerCamelCase; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js -var require_reflection_info = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-info.js +var require_reflection_info$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0; - const runtime_1$7 = require_commonjs$1(); + exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0; + const lower_camel_case_1 = require_lower_camel_case(); + (function(ScalarType) { + ScalarType[ScalarType["DOUBLE"] = 1] = "DOUBLE"; + ScalarType[ScalarType["FLOAT"] = 2] = "FLOAT"; + ScalarType[ScalarType["INT64"] = 3] = "INT64"; + ScalarType[ScalarType["UINT64"] = 4] = "UINT64"; + ScalarType[ScalarType["INT32"] = 5] = "INT32"; + ScalarType[ScalarType["FIXED64"] = 6] = "FIXED64"; + ScalarType[ScalarType["FIXED32"] = 7] = "FIXED32"; + ScalarType[ScalarType["BOOL"] = 8] = "BOOL"; + ScalarType[ScalarType["STRING"] = 9] = "STRING"; + ScalarType[ScalarType["BYTES"] = 12] = "BYTES"; + ScalarType[ScalarType["UINT32"] = 13] = "UINT32"; + ScalarType[ScalarType["SFIXED32"] = 15] = "SFIXED32"; + ScalarType[ScalarType["SFIXED64"] = 16] = "SFIXED64"; + ScalarType[ScalarType["SINT32"] = 17] = "SINT32"; + ScalarType[ScalarType["SINT64"] = 18] = "SINT64"; + })(exports.ScalarType || (exports.ScalarType = {})); + (function(LongType) { + /** + * Use JavaScript `bigint`. + * + * Field option `[jstype = JS_NORMAL]`. + */ + LongType[LongType["BIGINT"] = 0] = "BIGINT"; + /** + * Use JavaScript `string`. + * + * Field option `[jstype = JS_STRING]`. + */ + LongType[LongType["STRING"] = 1] = "STRING"; + /** + * Use JavaScript `number`. + * + * Large values will loose precision. + * + * Field option `[jstype = JS_NUMBER]`. + */ + LongType[LongType["NUMBER"] = 2] = "NUMBER"; + })(exports.LongType || (exports.LongType = {})); /** - * Turns PartialMethodInfo into MethodInfo. + * Protobuf 2.1.0 introduced packed repeated fields. + * Setting the field option `[packed = true]` enables packing. + * + * In proto3, all repeated fields are packed by default. + * Setting the field option `[packed = false]` disables packing. + * + * Packed repeated fields are encoded with a single tag, + * then a length-delimiter, then the element values. + * + * Unpacked repeated fields are encoded with a tag and + * value for each element. + * + * `bytes` and `string` cannot be packed. */ - function normalizeMethodInfo(method, service) { - var _a$2, _b$1, _c$1; - let m$1 = method; - m$1.service = service; - m$1.localName = (_a$2 = m$1.localName) !== null && _a$2 !== void 0 ? _a$2 : runtime_1$7.lowerCamelCase(m$1.name); - m$1.serverStreaming = !!m$1.serverStreaming; - m$1.clientStreaming = !!m$1.clientStreaming; - m$1.options = (_b$1 = m$1.options) !== null && _b$1 !== void 0 ? _b$1 : {}; - m$1.idempotency = (_c$1 = m$1.idempotency) !== null && _c$1 !== void 0 ? _c$1 : void 0; - return m$1; + var RepeatType; + (function(RepeatType) { + /** + * The field is not repeated. + */ + RepeatType[RepeatType["NO"] = 0] = "NO"; + /** + * The field is repeated and should be packed. + * Invalid for `bytes` and `string`, they cannot be packed. + */ + RepeatType[RepeatType["PACKED"] = 1] = "PACKED"; + /** + * The field is repeated but should not be packed. + * The only valid repeat type for repeated `bytes` and `string`. + */ + RepeatType[RepeatType["UNPACKED"] = 2] = "UNPACKED"; + })(RepeatType = exports.RepeatType || (exports.RepeatType = {})); + /** + * Turns PartialFieldInfo into FieldInfo. + */ + function normalizeFieldInfo(field) { + var _a, _b, _c, _d; + field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lower_camel_case_1.lowerCamelCase(field.name); + field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lower_camel_case_1.lowerCamelCase(field.name); + field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO; + field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : field.repeat ? false : field.oneof ? false : field.kind == "message"; + return field; } - exports.normalizeMethodInfo = normalizeMethodInfo; + exports.normalizeFieldInfo = normalizeFieldInfo; /** - * Read custom method options from a generated service client. + * Read custom field options from a generated message type. * - * @deprecated use readMethodOption() + * @deprecated use readFieldOption() */ - function readMethodOptions(service, methodName, extensionName, extensionType) { - var _a$2; - const options = (_a$2 = service.methods.find((m$1, i) => m$1.localName === methodName || i === methodName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; + function readFieldOptions(messageType, fieldName, extensionName, extensionType) { + var _a; + const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options; return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; } - exports.readMethodOptions = readMethodOptions; - function readMethodOption(service, methodName, extensionName, extensionType) { - var _a$2; - const options = (_a$2 = service.methods.find((m$1, i) => m$1.localName === methodName || i === methodName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; - if (!options) return void 0; + exports.readFieldOptions = readFieldOptions; + function readFieldOption(messageType, fieldName, extensionName, extensionType) { + var _a; + const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options; + if (!options) return; const optionVal = options[extensionName]; if (optionVal === void 0) return optionVal; return extensionType ? extensionType.fromJson(optionVal) : optionVal; } - exports.readMethodOption = readMethodOption; - function readServiceOption(service, extensionName, extensionType) { - const options = service.options; - if (!options) return void 0; - const optionVal = options[extensionName]; + exports.readFieldOption = readFieldOption; + function readMessageOption(messageType, extensionName, extensionType) { + const optionVal = messageType.options[extensionName]; if (optionVal === void 0) return optionVal; return extensionType ? extensionType.fromJson(optionVal) : optionVal; } - exports.readServiceOption = readServiceOption; -} }); + exports.readMessageOption = readMessageOption; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/oneof.js +var require_oneof = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0; + /** + * Is the given value a valid oneof group? + * + * We represent protobuf `oneof` as algebraic data types (ADT) in generated + * code. But when working with messages of unknown type, the ADT does not + * help us. + * + * This type guard checks if the given object adheres to the ADT rules, which + * are as follows: + * + * 1) Must be an object. + * + * 2) Must have a "oneofKind" discriminator property. + * + * 3) If "oneofKind" is `undefined`, no member field is selected. The object + * must not have any other properties. + * + * 4) If "oneofKind" is a `string`, the member field with this name is + * selected. + * + * 5) If a member field is selected, the object must have a second property + * with this name. The property must not be `undefined`. + * + * 6) No extra properties are allowed. The object has either one property + * (no selection) or two properties (selection). + * + */ + function isOneofGroup(any) { + if (typeof any != "object" || any === null || !any.hasOwnProperty("oneofKind")) return false; + switch (typeof any.oneofKind) { + case "string": + if (any[any.oneofKind] === void 0) return false; + return Object.keys(any).length == 2; + case "undefined": return Object.keys(any).length == 1; + default: return false; + } + } + exports.isOneofGroup = isOneofGroup; + /** + * Returns the value of the given field in a oneof group. + */ + function getOneofValue(oneof, kind) { + return oneof[kind]; + } + exports.getOneofValue = getOneofValue; + function setOneofValue(oneof, kind, value) { + if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; + oneof.oneofKind = kind; + if (value !== void 0) oneof[kind] = value; + } + exports.setOneofValue = setOneofValue; + function setUnknownOneofValue(oneof, kind, value) { + if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; + oneof.oneofKind = kind; + if (value !== void 0 && kind !== void 0) oneof[kind] = value; + } + exports.setUnknownOneofValue = setUnknownOneofValue; + /** + * Removes the selected field in a oneof group. + * + * Note that the recommended way to modify a oneof group is to set + * a new object: + * + * ```ts + * message.result = { oneofKind: undefined }; + * ``` + */ + function clearOneofValue(oneof) { + if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; + oneof.oneofKind = void 0; + } + exports.clearOneofValue = clearOneofValue; + /** + * Returns the selected value of the given oneof group. + * + * Not that the recommended way to access a oneof group is to check + * the "oneofKind" property and let TypeScript narrow down the union + * type for you: + * + * ```ts + * if (message.result.oneofKind === "error") { + * message.result.error; // string + * } + * ``` + * + * In the rare case you just need the value, and do not care about + * which protobuf field is selected, you can use this function + * for convenience. + */ + function getSelectedOneofValue(oneof) { + if (oneof.oneofKind === void 0) return; + return oneof[oneof.oneofKind]; + } + exports.getSelectedOneofValue = getSelectedOneofValue; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js -var require_service_type = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-type-check.js +var require_reflection_type_check = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.ServiceType = void 0; - const reflection_info_1$1 = require_reflection_info(); - var ServiceType = class { - constructor(typeName, methods, options) { - this.typeName = typeName; - this.methods = methods.map((i) => reflection_info_1$1.normalizeMethodInfo(i, this)); - this.options = options !== null && options !== void 0 ? options : {}; + exports.ReflectionTypeCheck = void 0; + const reflection_info_1 = require_reflection_info$1(); + const oneof_1 = require_oneof(); + var ReflectionTypeCheck = class { + constructor(info) { + var _a; + this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : []; } - }; - exports.ServiceType = ServiceType; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js -var require_rpc_error = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RpcError = void 0; - /** - * An error that occurred while calling a RPC method. - */ - var RpcError = class extends Error { - constructor(message, code = "UNKNOWN", meta) { - super(message); - this.name = "RpcError"; - Object.setPrototypeOf(this, new.target.prototype); - this.code = code; - this.meta = meta !== null && meta !== void 0 ? meta : {}; + prepare() { + if (this.data) return; + const req = [], known = [], oneofs = []; + for (let field of this.fields) if (field.oneof) { + if (!oneofs.includes(field.oneof)) { + oneofs.push(field.oneof); + req.push(field.oneof); + known.push(field.oneof); + } + } else { + known.push(field.localName); + switch (field.kind) { + case "scalar": + case "enum": + if (!field.opt || field.repeat) req.push(field.localName); + break; + case "message": + if (field.repeat) req.push(field.localName); + break; + case "map": + req.push(field.localName); + break; + } + } + this.data = { + req, + known, + oneofs: Object.values(oneofs) + }; } - toString() { - const l = [this.name + ": " + this.message]; - if (this.code) { - l.push(""); - l.push("Code: " + this.code); + /** + * Is the argument a valid message as specified by the + * reflection information? + * + * Checks all field types recursively. The `depth` + * specifies how deep into the structure the check will be. + * + * With a depth of 0, only the presence of fields + * is checked. + * + * With a depth of 1 or more, the field types are checked. + * + * With a depth of 2 or more, the members of map, repeated + * and message fields are checked. + * + * Message fields will be checked recursively with depth - 1. + * + * The number of map entries / repeated values being checked + * is < depth. + */ + is(message, depth, allowExcessProperties = false) { + if (depth < 0) return true; + if (message === null || message === void 0 || typeof message != "object") return false; + this.prepare(); + let keys = Object.keys(message), data = this.data; + if (keys.length < data.req.length || data.req.some((n) => !keys.includes(n))) return false; + if (!allowExcessProperties) { + if (keys.some((k) => !data.known.includes(k))) return false; } - if (this.serviceName && this.methodName) l.push("Method: " + this.serviceName + "/" + this.methodName); - let m$1 = Object.entries(this.meta); - if (m$1.length) { - l.push(""); - l.push("Meta:"); - for (let [k, v] of m$1) l.push(` ${k}: ${v}`); + if (depth < 1) return true; + for (const name of data.oneofs) { + const group = message[name]; + if (!oneof_1.isOneofGroup(group)) return false; + if (group.oneofKind === void 0) continue; + const field = this.fields.find((f) => f.localName === group.oneofKind); + if (!field) return false; + if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth)) return false; + } + for (const field of this.fields) { + if (field.oneof !== void 0) continue; + if (!this.field(message[field.localName], field, allowExcessProperties, depth)) return false; + } + return true; + } + field(arg, field, allowExcessProperties, depth) { + let repeated = field.repeat; + switch (field.kind) { + case "scalar": + if (arg === void 0) return field.opt; + if (repeated) return this.scalars(arg, field.T, depth, field.L); + return this.scalar(arg, field.T, field.L); + case "enum": + if (arg === void 0) return field.opt; + if (repeated) return this.scalars(arg, reflection_info_1.ScalarType.INT32, depth); + return this.scalar(arg, reflection_info_1.ScalarType.INT32); + case "message": + if (arg === void 0) return true; + if (repeated) return this.messages(arg, field.T(), allowExcessProperties, depth); + return this.message(arg, field.T(), allowExcessProperties, depth); + case "map": + if (typeof arg != "object" || arg === null) return false; + if (depth < 2) return true; + if (!this.mapKeys(arg, field.K, depth)) return false; + switch (field.V.kind) { + case "scalar": return this.scalars(Object.values(arg), field.V.T, depth, field.V.L); + case "enum": return this.scalars(Object.values(arg), reflection_info_1.ScalarType.INT32, depth); + case "message": return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth); + } + break; + } + return true; + } + message(arg, type, allowExcessProperties, depth) { + if (allowExcessProperties) return type.isAssignable(arg, depth); + return type.is(arg, depth); + } + messages(arg, type, allowExcessProperties, depth) { + if (!Array.isArray(arg)) return false; + if (depth < 2) return true; + if (allowExcessProperties) { + for (let i = 0; i < arg.length && i < depth; i++) if (!type.isAssignable(arg[i], depth - 1)) return false; + } else for (let i = 0; i < arg.length && i < depth; i++) if (!type.is(arg[i], depth - 1)) return false; + return true; + } + scalar(arg, type, longType) { + let argType = typeof arg; + switch (type) { + case reflection_info_1.ScalarType.UINT64: + case reflection_info_1.ScalarType.FIXED64: + case reflection_info_1.ScalarType.INT64: + case reflection_info_1.ScalarType.SFIXED64: + case reflection_info_1.ScalarType.SINT64: switch (longType) { + case reflection_info_1.LongType.BIGINT: return argType == "bigint"; + case reflection_info_1.LongType.NUMBER: return argType == "number" && !isNaN(arg); + default: return argType == "string"; + } + case reflection_info_1.ScalarType.BOOL: return argType == "boolean"; + case reflection_info_1.ScalarType.STRING: return argType == "string"; + case reflection_info_1.ScalarType.BYTES: return arg instanceof Uint8Array; + case reflection_info_1.ScalarType.DOUBLE: + case reflection_info_1.ScalarType.FLOAT: return argType == "number" && !isNaN(arg); + default: return argType == "number" && Number.isInteger(arg); + } + } + scalars(arg, type, depth, longType) { + if (!Array.isArray(arg)) return false; + if (depth < 2) return true; + if (Array.isArray(arg)) { + for (let i = 0; i < arg.length && i < depth; i++) if (!this.scalar(arg[i], type, longType)) return false; + } + return true; + } + mapKeys(map, type, depth) { + let keys = Object.keys(map); + switch (type) { + case reflection_info_1.ScalarType.INT32: + case reflection_info_1.ScalarType.FIXED32: + case reflection_info_1.ScalarType.SFIXED32: + case reflection_info_1.ScalarType.SINT32: + case reflection_info_1.ScalarType.UINT32: return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); + case reflection_info_1.ScalarType.BOOL: return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); + default: return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING); } - return l.join("\n"); } }; - exports.RpcError = RpcError; -} }); + exports.ReflectionTypeCheck = ReflectionTypeCheck; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js -var require_rpc_options = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-long-convert.js +var require_reflection_long_convert = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.mergeRpcOptions = void 0; - const runtime_1$6 = require_commonjs$1(); + exports.reflectionLongConvert = void 0; + const reflection_info_1 = require_reflection_info$1(); /** - * Merges custom RPC options with defaults. Returns a new instance and keeps - * the "defaults" and the "options" unmodified. - * - * Merges `RpcMetadata` "meta", overwriting values from "defaults" with - * values from "options". Does not append values to existing entries. - * - * Merges "jsonOptions", including "jsonOptions.typeRegistry", by creating - * a new array that contains types from "options.jsonOptions.typeRegistry" - * first, then types from "defaults.jsonOptions.typeRegistry". - * - * Merges "binaryOptions". - * - * Merges "interceptors" by creating a new array that contains interceptors - * from "defaults" first, then interceptors from "options". + * Utility method to convert a PbLong or PbUlong to a JavaScript + * representation during runtime. * - * Works with objects that extend `RpcOptions`, but only if the added - * properties are of type Date, primitive like string, boolean, or Array - * of primitives. If you have other property types, you have to merge them - * yourself. + * Works with generated field information, `undefined` is equivalent + * to `STRING`. */ - function mergeRpcOptions(defaults, options) { - if (!options) return defaults; - let o = {}; - copy(defaults, o); - copy(options, o); - for (let key of Object.keys(options)) { - let val = options[key]; - switch (key) { - case "jsonOptions": - o.jsonOptions = runtime_1$6.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); - break; - case "binaryOptions": - o.binaryOptions = runtime_1$6.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions); - break; - case "meta": - o.meta = {}; - copy(defaults.meta, o.meta); - copy(options.meta, o.meta); - break; - case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); - break; - } + function reflectionLongConvert(long, type) { + switch (type) { + case reflection_info_1.LongType.BIGINT: return long.toBigInt(); + case reflection_info_1.LongType.NUMBER: return long.toNumber(); + default: return long.toString(); } - return o; - } - exports.mergeRpcOptions = mergeRpcOptions; - function copy(a, into) { - if (!a) return; - let c = into; - for (let [k, v] of Object.entries(a)) if (v instanceof Date) c[k] = new Date(v.getTime()); - else if (Array.isArray(v)) c[k] = v.concat(); - else c[k] = v; } -} }); + exports.reflectionLongConvert = reflectionLongConvert; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js -var require_deferred = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-reader.js +var require_reflection_json_reader = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.Deferred = exports.DeferredState = void 0; - var DeferredState; - (function(DeferredState$1) { - DeferredState$1[DeferredState$1["PENDING"] = 0] = "PENDING"; - DeferredState$1[DeferredState$1["REJECTED"] = 1] = "REJECTED"; - DeferredState$1[DeferredState$1["RESOLVED"] = 2] = "RESOLVED"; - })(DeferredState = exports.DeferredState || (exports.DeferredState = {})); + exports.ReflectionJsonReader = void 0; + const json_typings_1 = require_json_typings(); + const base64_1 = require_base64(); + const reflection_info_1 = require_reflection_info$1(); + const pb_long_1 = require_pb_long(); + const assert_1 = require_assert(); + const reflection_long_convert_1 = require_reflection_long_convert(); /** - * A deferred promise. This is a "controller" for a promise, which lets you - * pass a promise around and reject or resolve it from the outside. + * Reads proto3 messages in canonical JSON format using reflection information. * - * Warning: This class is to be used with care. Using it can make code very - * difficult to read. It is intended for use in library code that exposes - * promises, not for regular business logic. + * https://developers.google.com/protocol-buffers/docs/proto3#json */ - var Deferred = class { - /** - * @param preventUnhandledRejectionWarning - prevents the warning - * "Unhandled Promise rejection" by adding a noop rejection handler. - * Working with calls returned from the runtime-rpc package in an - * async function usually means awaiting one call property after - * the other. This means that the "status" is not being awaited when - * an earlier await for the "headers" is rejected. This causes the - * "unhandled promise reject" warning. A more correct behaviour for - * calls might be to become aware whether at least one of the - * promises is handled and swallow the rejection warning for the - * others. - */ - constructor(preventUnhandledRejectionWarning = true) { - this._state = DeferredState.PENDING; - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - if (preventUnhandledRejectionWarning) this._promise.catch((_) => {}); + var ReflectionJsonReader = class { + constructor(info) { + this.info = info; } - /** - * Get the current state of the promise. - */ - get state() { - return this._state; + prepare() { + var _a; + if (this.fMap === void 0) { + this.fMap = {}; + const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : []; + for (const field of fieldsInput) { + this.fMap[field.name] = field; + this.fMap[field.jsonName] = field; + this.fMap[field.localName] = field; + } + } } - /** - * Get the deferred promise. - */ - get promise() { - return this._promise; + assert(condition, fieldName, jsonValue) { + if (!condition) { + let what = json_typings_1.typeofJsonValue(jsonValue); + if (what == "number" || what == "boolean") what = jsonValue.toString(); + throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`); + } } /** - * Resolve the promise. Throws if the promise is already resolved or rejected. + * Reads a message from canonical JSON format into the target message. + * + * Repeated fields are appended. Map entries are added, overwriting + * existing keys. + * + * If a message field is already present, it will be merged with the + * new data. */ - resolve(value) { - if (this.state !== DeferredState.PENDING) throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`); - this._resolve(value); - this._state = DeferredState.RESOLVED; + read(input, message, options) { + this.prepare(); + const oneofsHandled = []; + for (const [jsonKey, jsonValue] of Object.entries(input)) { + const field = this.fMap[jsonKey]; + if (!field) { + if (!options.ignoreUnknownFields) throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`); + continue; + } + const localName = field.localName; + let target; + if (field.oneof) { + if (jsonValue === null && (field.kind !== "enum" || field.T()[0] !== "google.protobuf.NullValue")) continue; + if (oneofsHandled.includes(field.oneof)) throw new Error(`Multiple members of the oneof group "${field.oneof}" of ${this.info.typeName} are present in JSON.`); + oneofsHandled.push(field.oneof); + target = message[field.oneof] = { oneofKind: localName }; + } else target = message; + if (field.kind == "map") { + if (jsonValue === null) continue; + this.assert(json_typings_1.isJsonObject(jsonValue), field.name, jsonValue); + const fieldObj = target[localName]; + for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { + this.assert(jsonObjValue !== null, field.name + " map value", null); + let val; + switch (field.V.kind) { + case "message": + val = field.V.T().internalJsonRead(jsonObjValue, options); + break; + case "enum": + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; + break; + case "scalar": + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + break; + } + this.assert(val !== void 0, field.name + " map value", jsonObjValue); + let key = jsonObjKey; + if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; + key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); + fieldObj[key] = val; + } + } else if (field.repeat) { + if (jsonValue === null) continue; + this.assert(Array.isArray(jsonValue), field.name, jsonValue); + const fieldArr = target[localName]; + for (const jsonItem of jsonValue) { + this.assert(jsonItem !== null, field.name, null); + let val; + switch (field.kind) { + case "message": + val = field.T().internalJsonRead(jsonItem, options); + break; + case "enum": + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; + break; + case "scalar": + val = this.scalar(jsonItem, field.T, field.L, field.name); + break; + } + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); + } + } else switch (field.kind) { + case "message": + if (jsonValue === null && field.T().typeName != "google.protobuf.Value") { + this.assert(field.oneof === void 0, field.name + " (oneof member)", null); + continue; + } + target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]); + break; + case "enum": + if (jsonValue === null) continue; + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; + target[localName] = val; + break; + case "scalar": + if (jsonValue === null) continue; + target[localName] = this.scalar(jsonValue, field.T, field.L, field.name); + break; + } + } } /** - * Reject the promise. Throws if the promise is already resolved or rejected. + * Returns `false` for unrecognized string representations. + * + * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). */ - reject(reason) { - if (this.state !== DeferredState.PENDING) throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`); - this._reject(reason); - this._state = DeferredState.REJECTED; + enum(type, json, fieldName, ignoreUnknownFields) { + if (type[0] == "google.protobuf.NullValue") assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`); + if (json === null) return 0; + switch (typeof json) { + case "number": + assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json}.`); + return json; + case "string": + let localEnumName = json; + if (type[2] && json.substring(0, type[2].length) === type[2]) localEnumName = json.substring(type[2].length); + let enumNumber = type[1][localEnumName]; + if (typeof enumNumber === "undefined" && ignoreUnknownFields) return false; + assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json}".`); + return enumNumber; + } + assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}".`); + } + scalar(json, type, longType, fieldName) { + let e; + try { + switch (type) { + case reflection_info_1.ScalarType.DOUBLE: + case reflection_info_1.ScalarType.FLOAT: + if (json === null) return 0; + if (json === "NaN") return NaN; + if (json === "Infinity") return Number.POSITIVE_INFINITY; + if (json === "-Infinity") return Number.NEGATIVE_INFINITY; + if (json === "") { + e = "empty string"; + break; + } + if (typeof json == "string" && json.trim().length !== json.length) { + e = "extra whitespace"; + break; + } + if (typeof json != "string" && typeof json != "number") break; + let float = Number(json); + if (Number.isNaN(float)) { + e = "not a number"; + break; + } + if (!Number.isFinite(float)) { + e = "too large or small"; + break; + } + if (type == reflection_info_1.ScalarType.FLOAT) assert_1.assertFloat32(float); + return float; + case reflection_info_1.ScalarType.INT32: + case reflection_info_1.ScalarType.FIXED32: + case reflection_info_1.ScalarType.SFIXED32: + case reflection_info_1.ScalarType.SINT32: + case reflection_info_1.ScalarType.UINT32: + if (json === null) return 0; + let int32; + if (typeof json == "number") int32 = json; + else if (json === "") e = "empty string"; + else if (typeof json == "string") if (json.trim().length !== json.length) e = "extra whitespace"; + else int32 = Number(json); + if (int32 === void 0) break; + if (type == reflection_info_1.ScalarType.UINT32) assert_1.assertUInt32(int32); + else assert_1.assertInt32(int32); + return int32; + case reflection_info_1.ScalarType.INT64: + case reflection_info_1.ScalarType.SFIXED64: + case reflection_info_1.ScalarType.SINT64: + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType); + if (typeof json != "number" && typeof json != "string") break; + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType); + case reflection_info_1.ScalarType.FIXED64: + case reflection_info_1.ScalarType.UINT64: + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType); + if (typeof json != "number" && typeof json != "string") break; + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType); + case reflection_info_1.ScalarType.BOOL: + if (json === null) return false; + if (typeof json !== "boolean") break; + return json; + case reflection_info_1.ScalarType.STRING: + if (json === null) return ""; + if (typeof json !== "string") { + e = "extra whitespace"; + break; + } + return json; + case reflection_info_1.ScalarType.BYTES: + if (json === null || json === "") return new Uint8Array(0); + if (typeof json !== "string") break; + return base64_1.base64decode(json); + } + } catch (error) { + e = error.message; + } + this.assert(false, fieldName + (e ? " - " + e : ""), json); + } + }; + exports.ReflectionJsonReader = ReflectionJsonReader; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-writer.js +var require_reflection_json_writer = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReflectionJsonWriter = void 0; + const base64_1 = require_base64(); + const pb_long_1 = require_pb_long(); + const reflection_info_1 = require_reflection_info$1(); + const assert_1 = require_assert(); + /** + * Writes proto3 messages in canonical JSON format using reflection + * information. + * + * https://developers.google.com/protocol-buffers/docs/proto3#json + */ + var ReflectionJsonWriter = class { + constructor(info) { + var _a; + this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : []; } /** - * Resolve the promise. Ignore if not pending. + * Converts the message to a JSON object, based on the field descriptors. */ - resolvePending(val) { - if (this._state === DeferredState.PENDING) this.resolve(val); + write(message, options) { + const json = {}, source = message; + for (const field of this.fields) { + if (!field.oneof) { + let jsonValue = this.field(field, source[field.localName], options); + if (jsonValue !== void 0) json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + continue; + } + const group = source[field.oneof]; + if (group.oneofKind !== field.localName) continue; + const opt = field.kind == "scalar" || field.kind == "enum" ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options; + let jsonValue = this.field(field, group[field.localName], opt); + assert_1.assert(jsonValue !== void 0); + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + } + return json; + } + field(field, value, options) { + let jsonValue = void 0; + if (field.kind == "map") { + assert_1.assert(typeof value == "object" && value !== null); + const jsonObj = {}; + switch (field.V.kind) { + case "scalar": + for (const [entryKey, entryValue] of Object.entries(value)) { + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; + } + break; + case "message": + const messageType = field.V.T(); + for (const [entryKey, entryValue] of Object.entries(value)) { + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; + } + break; + case "enum": + const enumInfo = field.V.T(); + for (const [entryKey, entryValue] of Object.entries(value)) { + assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; + } + break; + } + if (options.emitDefaultValues || Object.keys(jsonObj).length > 0) jsonValue = jsonObj; + } else if (field.repeat) { + assert_1.assert(Array.isArray(value)); + const jsonArr = []; + switch (field.kind) { + case "scalar": + for (let i = 0; i < value.length; i++) { + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); + } + break; + case "enum": + const enumInfo = field.T(); + for (let i = 0; i < value.length; i++) { + assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); + } + break; + case "message": + const messageType = field.T(); + for (let i = 0; i < value.length; i++) { + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); + } + break; + } + if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues) jsonValue = jsonArr; + } else switch (field.kind) { + case "scalar": + jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues); + break; + case "enum": + jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger); + break; + case "message": + jsonValue = this.message(field.T(), value, field.name, options); + break; + } + return jsonValue; } /** - * Reject the promise. Ignore if not pending. + * Returns `null` as the default for google.protobuf.NullValue. */ - rejectPending(reason) { - if (this._state === DeferredState.PENDING) this.reject(reason); + enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) { + if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional ? void 0 : null; + if (value === void 0) { + assert_1.assert(optional); + return; + } + if (value === 0 && !emitDefaultValues && !optional) return void 0; + assert_1.assert(typeof value == "number"); + assert_1.assert(Number.isInteger(value)); + if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; + if (type[2]) return type[2] + type[1][value]; + return type[1][value]; + } + message(type, value, fieldName, options) { + if (value === void 0) return options.emitDefaultValues ? null : void 0; + return type.internalJsonWrite(value, options); + } + scalar(type, value, fieldName, optional, emitDefaultValues) { + if (value === void 0) { + assert_1.assert(optional); + return; + } + const ed = emitDefaultValues || optional; + switch (type) { + case reflection_info_1.ScalarType.INT32: + case reflection_info_1.ScalarType.SFIXED32: + case reflection_info_1.ScalarType.SINT32: + if (value === 0) return ed ? 0 : void 0; + assert_1.assertInt32(value); + return value; + case reflection_info_1.ScalarType.FIXED32: + case reflection_info_1.ScalarType.UINT32: + if (value === 0) return ed ? 0 : void 0; + assert_1.assertUInt32(value); + return value; + case reflection_info_1.ScalarType.FLOAT: assert_1.assertFloat32(value); + case reflection_info_1.ScalarType.DOUBLE: + if (value === 0) return ed ? 0 : void 0; + assert_1.assert(typeof value == "number"); + if (Number.isNaN(value)) return "NaN"; + if (value === Number.POSITIVE_INFINITY) return "Infinity"; + if (value === Number.NEGATIVE_INFINITY) return "-Infinity"; + return value; + case reflection_info_1.ScalarType.STRING: + if (value === "") return ed ? "" : void 0; + assert_1.assert(typeof value == "string"); + return value; + case reflection_info_1.ScalarType.BOOL: + if (value === false) return ed ? false : void 0; + assert_1.assert(typeof value == "boolean"); + return value; + case reflection_info_1.ScalarType.UINT64: + case reflection_info_1.ScalarType.FIXED64: + assert_1.assert(typeof value == "number" || typeof value == "string" || typeof value == "bigint"); + let ulong = pb_long_1.PbULong.from(value); + if (ulong.isZero() && !ed) return void 0; + return ulong.toString(); + case reflection_info_1.ScalarType.INT64: + case reflection_info_1.ScalarType.SFIXED64: + case reflection_info_1.ScalarType.SINT64: + assert_1.assert(typeof value == "number" || typeof value == "string" || typeof value == "bigint"); + let long = pb_long_1.PbLong.from(value); + if (long.isZero() && !ed) return void 0; + return long.toString(); + case reflection_info_1.ScalarType.BYTES: + assert_1.assert(value instanceof Uint8Array); + if (!value.byteLength) return ed ? "" : void 0; + return base64_1.base64encode(value); + } } }; - exports.Deferred = Deferred; -} }); + exports.ReflectionJsonWriter = ReflectionJsonWriter; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js -var require_rpc_output_stream = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js +var require_reflection_scalar_default = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.RpcOutputStreamController = void 0; - const deferred_1$1 = require_deferred(); - const runtime_1$5 = require_commonjs$1(); + exports.reflectionScalarDefault = void 0; + const reflection_info_1 = require_reflection_info$1(); + const reflection_long_convert_1 = require_reflection_long_convert(); + const pb_long_1 = require_pb_long(); /** - * A `RpcOutputStream` that you control. + * Creates the default value for a scalar type. */ - var RpcOutputStreamController = class { - constructor() { - this._lis = { - nxt: [], - msg: [], - err: [], - cmp: [] - }; - this._closed = false; - this._itState = { q: [] }; - } - onNext(callback) { - return this.addLis(callback, this._lis.nxt); - } - onMessage(callback) { - return this.addLis(callback, this._lis.msg); - } - onError(callback) { - return this.addLis(callback, this._lis.err); - } - onComplete(callback) { - return this.addLis(callback, this._lis.cmp); - } - addLis(callback, list) { - list.push(callback); - return () => { - let i = list.indexOf(callback); - if (i >= 0) list.splice(i, 1); - }; - } - clearLis() { - for (let l of Object.values(this._lis)) l.splice(0, l.length); - } - /** - * Is this stream already closed by a completion or error? - */ - get closed() { - return this._closed !== false; + function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) { + switch (type) { + case reflection_info_1.ScalarType.BOOL: return false; + case reflection_info_1.ScalarType.UINT64: + case reflection_info_1.ScalarType.FIXED64: return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType); + case reflection_info_1.ScalarType.INT64: + case reflection_info_1.ScalarType.SFIXED64: + case reflection_info_1.ScalarType.SINT64: return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType); + case reflection_info_1.ScalarType.DOUBLE: + case reflection_info_1.ScalarType.FLOAT: return 0; + case reflection_info_1.ScalarType.BYTES: return new Uint8Array(0); + case reflection_info_1.ScalarType.STRING: return ""; + default: return 0; } - /** - * Emit message, close with error, or close successfully, but only one - * at a time. - * Can be used to wrap a stream by using the other stream's `onNext`. - */ - notifyNext(message, error, complete) { - runtime_1$5.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, "only one emission at a time"); - if (message) this.notifyMessage(message); - if (error) this.notifyError(error); - if (complete) this.notifyComplete(); + } + exports.reflectionScalarDefault = reflectionScalarDefault; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-reader.js +var require_reflection_binary_reader = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReflectionBinaryReader = void 0; + const binary_format_contract_1 = require_binary_format_contract(); + const reflection_info_1 = require_reflection_info$1(); + const reflection_long_convert_1 = require_reflection_long_convert(); + const reflection_scalar_default_1 = require_reflection_scalar_default(); + /** + * Reads proto3 messages in binary format using reflection information. + * + * https://developers.google.com/protocol-buffers/docs/encoding + */ + var ReflectionBinaryReader = class { + constructor(info) { + this.info = info; } - /** - * Emits a new message. Throws if stream is closed. - * - * Triggers onNext and onMessage callbacks. - */ - notifyMessage(message) { - runtime_1$5.assert(!this.closed, "stream is closed"); - this.pushIt({ - value: message, - done: false - }); - this._lis.msg.forEach((l) => l(message)); - this._lis.nxt.forEach((l) => l(message, void 0, false)); + prepare() { + var _a; + if (!this.fieldNoToField) { + const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : []; + this.fieldNoToField = new Map(fieldsInput.map((field) => [field.no, field])); + } } /** - * Closes the stream with an error. Throws if stream is closed. + * Reads a message from binary format into the target message. * - * Triggers onNext and onError callbacks. - */ - notifyError(error) { - runtime_1$5.assert(!this.closed, "stream is closed"); - this._closed = error; - this.pushIt(error); - this._lis.err.forEach((l) => l(error)); - this._lis.nxt.forEach((l) => l(void 0, error, false)); - this.clearLis(); - } - /** - * Closes the stream successfully. Throws if stream is closed. + * Repeated fields are appended. Map entries are added, overwriting + * existing keys. * - * Triggers onNext and onComplete callbacks. + * If a message field is already present, it will be merged with the + * new data. */ - notifyComplete() { - runtime_1$5.assert(!this.closed, "stream is closed"); - this._closed = true; - this.pushIt({ - value: null, - done: true - }); - this._lis.cmp.forEach((l) => l()); - this._lis.nxt.forEach((l) => l(void 0, void 0, true)); - this.clearLis(); + read(reader, message, options, length) { + this.prepare(); + const end = length === void 0 ? reader.len : reader.pos + length; + while (reader.pos < end) { + const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo); + if (!field) { + let u = options.readUnknownField; + if (u == "throw") throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? binary_format_contract_1.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d); + continue; + } + let target = message, repeated = field.repeat, localName = field.localName; + if (field.oneof) { + target = target[field.oneof]; + if (target.oneofKind !== localName) target = message[field.oneof] = { oneofKind: localName }; + } + switch (field.kind) { + case "scalar": + case "enum": + let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T; + let L = field.kind == "scalar" ? field.L : void 0; + if (repeated) { + let arr = target[localName]; + if (wireType == binary_format_contract_1.WireType.LengthDelimited && T != reflection_info_1.ScalarType.STRING && T != reflection_info_1.ScalarType.BYTES) { + let e = reader.uint32() + reader.pos; + while (reader.pos < e) arr.push(this.scalar(reader, T, L)); + } else arr.push(this.scalar(reader, T, L)); + } else target[localName] = this.scalar(reader, T, L); + break; + case "message": + if (repeated) { + let arr = target[localName]; + let msg = field.T().internalBinaryRead(reader, reader.uint32(), options); + arr.push(msg); + } else target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]); + break; + case "map": + let [mapKey, mapVal] = this.mapEntry(field, reader, options); + target[localName][mapKey] = mapVal; + break; + } + } } /** - * Creates an async iterator (that can be used with `for await {...}`) - * to consume the stream. - * - * Some things to note: - * - If an error occurs, the `for await` will throw it. - * - If an error occurred before the `for await` was started, `for await` - * will re-throw it. - * - If the stream is already complete, the `for await` will be empty. - * - If your `for await` consumes slower than the stream produces, - * for example because you are relaying messages in a slow operation, - * messages are queued. + * Read a map field, expecting key field = 1, value field = 2 */ - [Symbol.asyncIterator]() { - if (this._closed === true) this.pushIt({ - value: null, - done: true - }); - else if (this._closed !== false) this.pushIt(this._closed); - return { next: () => { - let state$1 = this._itState; - runtime_1$5.assert(state$1, "bad state"); - runtime_1$5.assert(!state$1.p, "iterator contract broken"); - let first = state$1.q.shift(); - if (first) return "value" in first ? Promise.resolve(first) : Promise.reject(first); - state$1.p = new deferred_1$1.Deferred(); - return state$1.p.promise; - } }; - } - pushIt(result) { - let state$1 = this._itState; - if (state$1.p) { - const p = state$1.p; - runtime_1$5.assert(p.state == deferred_1$1.DeferredState.PENDING, "iterator contract broken"); - "value" in result ? p.resolve(result) : p.reject(result); - delete state$1.p; - } else state$1.q.push(result); - } - }; - exports.RpcOutputStreamController = RpcOutputStreamController; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js -var require_unary_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports) { - var __awaiter$10 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + mapEntry(field, reader, options) { + let length = reader.uint32(); + let end = reader.pos + length; + let key = void 0; + let val = void 0; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + if (field.K == reflection_info_1.ScalarType.BOOL) key = reader.bool().toString(); + else key = this.scalar(reader, field.K, reflection_info_1.LongType.STRING); + break; + case 2: + switch (field.V.kind) { + case "scalar": + val = this.scalar(reader, field.V.T, field.V.L); + break; + case "enum": + val = reader.int32(); + break; + case "message": + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + break; + } + break; + default: throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`); } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + if (key === void 0) { + let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); + key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (val === void 0) switch (field.V.kind) { + case "scalar": + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + break; + case "enum": + val = 0; + break; + case "message": + val = field.V.T().create(); + break; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return [key, val]; + } + scalar(reader, type, longType) { + switch (type) { + case reflection_info_1.ScalarType.INT32: return reader.int32(); + case reflection_info_1.ScalarType.STRING: return reader.string(); + case reflection_info_1.ScalarType.BOOL: return reader.bool(); + case reflection_info_1.ScalarType.DOUBLE: return reader.double(); + case reflection_info_1.ScalarType.FLOAT: return reader.float(); + case reflection_info_1.ScalarType.INT64: return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType); + case reflection_info_1.ScalarType.UINT64: return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType); + case reflection_info_1.ScalarType.FIXED64: return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType); + case reflection_info_1.ScalarType.FIXED32: return reader.fixed32(); + case reflection_info_1.ScalarType.BYTES: return reader.bytes(); + case reflection_info_1.ScalarType.UINT32: return reader.uint32(); + case reflection_info_1.ScalarType.SFIXED32: return reader.sfixed32(); + case reflection_info_1.ScalarType.SFIXED64: return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType); + case reflection_info_1.ScalarType.SINT32: return reader.sint32(); + case reflection_info_1.ScalarType.SINT64: return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType); + } + } }; + exports.ReflectionBinaryReader = ReflectionBinaryReader; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-writer.js +var require_reflection_binary_writer = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.UnaryCall = void 0; + exports.ReflectionBinaryWriter = void 0; + const binary_format_contract_1 = require_binary_format_contract(); + const reflection_info_1 = require_reflection_info$1(); + const assert_1 = require_assert(); + const pb_long_1 = require_pb_long(); /** - * A unary RPC call. Unary means there is exactly one input message and - * exactly one output message unless an error occurred. + * Writes proto3 messages in binary format using reflection information. + * + * https://developers.google.com/protocol-buffers/docs/encoding */ - var UnaryCall = class { - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.request = request; - this.headers = headers; - this.response = response; - this.status = status; - this.trailers = trailers; + var ReflectionBinaryWriter = class { + constructor(info) { + this.info = info; + } + prepare() { + if (!this.fields) this.fields = (this.info.fields ? this.info.fields.concat() : []).sort((a, b) => a.no - b.no); } /** - * If you are only interested in the final outcome of this call, - * you can await it to receive a `FinishedUnaryCall`. + * Writes the message to binary format. */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); - } - promiseFinished() { - return __awaiter$10(this, void 0, void 0, function* () { - let [headers, response, status, trailers] = yield Promise.all([ - this.headers, - this.response, - this.status, - this.trailers - ]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - request: this.request, - headers, - response, - status, - trailers - }; - }); - } - }; - exports.UnaryCall = UnaryCall; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js -var require_server_streaming_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports) { - var __awaiter$9 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + write(message, writer, options) { + this.prepare(); + for (const field of this.fields) { + let value, emitDefault, repeated = field.repeat, localName = field.localName; + if (field.oneof) { + const group = message[field.oneof]; + if (group.oneofKind !== localName) continue; + value = group[localName]; + emitDefault = true; + } else { + value = message[localName]; + emitDefault = false; } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + switch (field.kind) { + case "scalar": + case "enum": + let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T; + if (repeated) { + assert_1.assert(Array.isArray(value)); + if (repeated == reflection_info_1.RepeatType.PACKED) this.packed(writer, T, field.no, value); + else for (const item of value) this.scalar(writer, T, field.no, item, true); + } else if (value === void 0) assert_1.assert(field.opt); + else this.scalar(writer, T, field.no, value, emitDefault || field.opt); + break; + case "message": + if (repeated) { + assert_1.assert(Array.isArray(value)); + for (const item of value) this.message(writer, options, field.T(), field.no, item); + } else this.message(writer, options, field.T(), field.no, value); + break; + case "map": + assert_1.assert(typeof value == "object" && value !== null); + for (const [key, val] of Object.entries(value)) this.mapEntry(writer, options, field, key, val); + break; } } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + let u = options.writeUnknownFields; + if (u !== false) (u === true ? binary_format_contract_1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer); + } + mapEntry(writer, options, field, key, value) { + writer.tag(field.no, binary_format_contract_1.WireType.LengthDelimited); + writer.fork(); + let keyValue = key; + switch (field.K) { + case reflection_info_1.ScalarType.INT32: + case reflection_info_1.ScalarType.FIXED32: + case reflection_info_1.ScalarType.UINT32: + case reflection_info_1.ScalarType.SFIXED32: + case reflection_info_1.ScalarType.SINT32: + keyValue = Number.parseInt(key); + break; + case reflection_info_1.ScalarType.BOOL: + assert_1.assert(key == "true" || key == "false"); + keyValue = key == "true"; + break; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ServerStreamingCall = void 0; - /** - * A server streaming RPC call. The client provides exactly one input message - * but the server may respond with 0, 1, or more messages. - */ - var ServerStreamingCall = class { - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.request = request; - this.headers = headers; - this.responses = response; - this.status = status; - this.trailers = trailers; + this.scalar(writer, field.K, 1, keyValue, true); + switch (field.V.kind) { + case "scalar": + this.scalar(writer, field.V.T, 2, value, true); + break; + case "enum": + this.scalar(writer, reflection_info_1.ScalarType.INT32, 2, value, true); + break; + case "message": + this.message(writer, options, field.V.T(), 2, value); + break; + } + writer.join(); + } + message(writer, options, handler, fieldNo, value) { + if (value === void 0) return; + handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited).fork(), options); + writer.join(); } /** - * Instead of awaiting the response status and trailers, you can - * just as well await this call itself to receive the server outcome. - * You should first setup some listeners to the `request` to - * see the actual messages the server replied with. + * Write a single scalar value. */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); - } - promiseFinished() { - return __awaiter$9(this, void 0, void 0, function* () { - let [headers, status, trailers] = yield Promise.all([ - this.headers, - this.status, - this.trailers - ]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - request: this.request, - headers, - status, - trailers - }; - }); + scalar(writer, type, fieldNo, value, emitDefault) { + let [wireType, method, isDefault] = this.scalarInfo(type, value); + if (!isDefault || emitDefault) { + writer.tag(fieldNo, wireType); + writer[method](value); + } } - }; - exports.ServerStreamingCall = ServerStreamingCall; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js -var require_client_streaming_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports) { - var __awaiter$8 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + /** + * Write an array of scalar values in packed format. + */ + packed(writer, type, fieldNo, value) { + if (!value.length) return; + assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING); + writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited); + writer.fork(); + let [, method] = this.scalarInfo(type); + for (let i = 0; i < value.length; i++) writer[method](value[i]); + writer.join(); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + /** + * Get information for writing a scalar value. + * + * Returns tuple: + * [0]: appropriate WireType + * [1]: name of the appropriate method of IBinaryWriter + * [2]: whether the given value is a default value + * + * If argument `value` is omitted, [2] is always false. + */ + scalarInfo(type, value) { + let t = binary_format_contract_1.WireType.Varint; + let m; + let i = value === void 0; + let d = value === 0; + switch (type) { + case reflection_info_1.ScalarType.INT32: + m = "int32"; + break; + case reflection_info_1.ScalarType.STRING: + d = i || !value.length; + t = binary_format_contract_1.WireType.LengthDelimited; + m = "string"; + break; + case reflection_info_1.ScalarType.BOOL: + d = value === false; + m = "bool"; + break; + case reflection_info_1.ScalarType.UINT32: + m = "uint32"; + break; + case reflection_info_1.ScalarType.DOUBLE: + t = binary_format_contract_1.WireType.Bit64; + m = "double"; + break; + case reflection_info_1.ScalarType.FLOAT: + t = binary_format_contract_1.WireType.Bit32; + m = "float"; + break; + case reflection_info_1.ScalarType.INT64: + d = i || pb_long_1.PbLong.from(value).isZero(); + m = "int64"; + break; + case reflection_info_1.ScalarType.UINT64: + d = i || pb_long_1.PbULong.from(value).isZero(); + m = "uint64"; + break; + case reflection_info_1.ScalarType.FIXED64: + d = i || pb_long_1.PbULong.from(value).isZero(); + t = binary_format_contract_1.WireType.Bit64; + m = "fixed64"; + break; + case reflection_info_1.ScalarType.BYTES: + d = i || !value.byteLength; + t = binary_format_contract_1.WireType.LengthDelimited; + m = "bytes"; + break; + case reflection_info_1.ScalarType.FIXED32: + t = binary_format_contract_1.WireType.Bit32; + m = "fixed32"; + break; + case reflection_info_1.ScalarType.SFIXED32: + t = binary_format_contract_1.WireType.Bit32; + m = "sfixed32"; + break; + case reflection_info_1.ScalarType.SFIXED64: + d = i || pb_long_1.PbLong.from(value).isZero(); + t = binary_format_contract_1.WireType.Bit64; + m = "sfixed64"; + break; + case reflection_info_1.ScalarType.SINT32: + m = "sint32"; + break; + case reflection_info_1.ScalarType.SINT64: + d = i || pb_long_1.PbLong.from(value).isZero(); + m = "sint64"; + break; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return [ + t, + m, + i || d + ]; + } }; + exports.ReflectionBinaryWriter = ReflectionBinaryWriter; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-create.js +var require_reflection_create = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.ClientStreamingCall = void 0; + exports.reflectionCreate = void 0; + const reflection_scalar_default_1 = require_reflection_scalar_default(); + const message_type_contract_1 = require_message_type_contract(); /** - * A client streaming RPC call. This means that the clients sends 0, 1, or - * more messages to the server, and the server replies with exactly one - * message. + * Creates an instance of the generic message, using the field + * information. */ - var ClientStreamingCall = class { - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.requests = request; - this.headers = headers; - this.response = response; - this.status = status; - this.trailers = trailers; - } + function reflectionCreate(type) { /** - * Instead of awaiting the response status and trailers, you can - * just as well await this call itself to receive the server outcome. - * Note that it may still be valid to send more request messages. + * This ternary can be removed in the next major version. + * The `Object.create()` code path utilizes a new `messagePrototype` + * property on the `IMessageType` which has this same `MESSAGE_TYPE` + * non-enumerable property on it. Doing it this way means that we only + * pay the cost of `Object.defineProperty()` once per `IMessageType` + * class of once per "instance". The falsy code path is only provided + * for backwards compatibility in cases where the runtime library is + * updated without also updating the generated code. */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); - } - promiseFinished() { - return __awaiter$8(this, void 0, void 0, function* () { - let [headers, response, status, trailers] = yield Promise.all([ - this.headers, - this.response, - this.status, - this.trailers - ]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - headers, - response, - status, - trailers - }; - }); + const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type }); + for (let field of type.fields) { + let name = field.localName; + if (field.opt) continue; + if (field.oneof) msg[field.oneof] = { oneofKind: void 0 }; + else if (field.repeat) msg[name] = []; + else switch (field.kind) { + case "scalar": + msg[name] = reflection_scalar_default_1.reflectionScalarDefault(field.T, field.L); + break; + case "enum": + msg[name] = 0; + break; + case "map": + msg[name] = {}; + break; + } } - }; - exports.ClientStreamingCall = ClientStreamingCall; -} }); + return msg; + } + exports.reflectionCreate = reflectionCreate; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js -var require_duplex_streaming_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports) { - var __awaiter$7 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-merge-partial.js +var require_reflection_merge_partial = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reflectionMergePartial = void 0; + /** + * Copy partial data into the target message. + * + * If a singular scalar or enum field is present in the source, it + * replaces the field in the target. + * + * If a singular message field is present in the source, it is merged + * with the target field by calling mergePartial() of the responsible + * message type. + * + * If a repeated field is present in the source, its values replace + * all values in the target array, removing extraneous values. + * Repeated message fields are copied, not merged. + * + * If a map field is present in the source, entries are added to the + * target map, replacing entries with the same key. Entries that only + * exist in the target remain. Entries with message values are copied, + * not merged. + * + * Note that this function differs from protobuf merge semantics, + * which appends repeated fields. + */ + function reflectionMergePartial(info, target, source) { + let fieldValue, input = source, output; + for (let field of info.fields) { + let name = field.localName; + if (field.oneof) { + const group = input[field.oneof]; + if ((group === null || group === void 0 ? void 0 : group.oneofKind) == void 0) continue; + fieldValue = group[name]; + output = target[field.oneof]; + output.oneofKind = group.oneofKind; + if (fieldValue == void 0) { + delete output[name]; + continue; } + } else { + fieldValue = input[name]; + output = target; + if (fieldValue == void 0) continue; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (field.repeat) output[name].length = fieldValue.length; + switch (field.kind) { + case "scalar": + case "enum": + if (field.repeat) for (let i = 0; i < fieldValue.length; i++) output[name][i] = fieldValue[i]; + else output[name] = fieldValue; + break; + case "message": + let T = field.T(); + if (field.repeat) for (let i = 0; i < fieldValue.length; i++) output[name][i] = T.create(fieldValue[i]); + else if (output[name] === void 0) output[name] = T.create(fieldValue); + else T.mergePartial(output[name], fieldValue); + break; + case "map": + switch (field.V.kind) { + case "scalar": + case "enum": + Object.assign(output[name], fieldValue); + break; + case "message": + let T = field.V.T(); + for (let k of Object.keys(fieldValue)) output[name][k] = T.create(fieldValue[k]); + break; + } + break; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + } + } + exports.reflectionMergePartial = reflectionMergePartial; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-equals.js +var require_reflection_equals = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.DuplexStreamingCall = void 0; + exports.reflectionEquals = void 0; + const reflection_info_1 = require_reflection_info$1(); /** - * A duplex streaming RPC call. This means that the clients sends an - * arbitrary amount of messages to the server, while at the same time, - * the server sends an arbitrary amount of messages to the client. + * Determines whether two message of the same type have the same field values. + * Checks for deep equality, traversing repeated fields, oneof groups, maps + * and messages recursively. + * Will also return true if both messages are `undefined`. */ - var DuplexStreamingCall = class { - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.requests = request; - this.headers = headers; - this.responses = response; - this.status = status; - this.trailers = trailers; - } - /** - * Instead of awaiting the response status and trailers, you can - * just as well await this call itself to receive the server outcome. - * Note that it may still be valid to send more request messages. - */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); - } - promiseFinished() { - return __awaiter$7(this, void 0, void 0, function* () { - let [headers, status, trailers] = yield Promise.all([ - this.headers, - this.status, - this.trailers - ]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - headers, - status, - trailers - }; - }); + function reflectionEquals(info, a, b) { + if (a === b) return true; + if (!a || !b) return false; + for (let field of info.fields) { + let localName = field.localName; + let val_a = field.oneof ? a[field.oneof][localName] : a[localName]; + let val_b = field.oneof ? b[field.oneof][localName] : b[localName]; + switch (field.kind) { + case "enum": + case "scalar": + let t = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T; + if (!(field.repeat ? repeatedPrimitiveEq(t, val_a, val_b) : primitiveEq(t, val_a, val_b))) return false; + break; + case "map": + if (!(field.V.kind == "message" ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b)) : repeatedPrimitiveEq(field.V.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b)))) return false; + break; + case "message": + let T = field.T(); + if (!(field.repeat ? repeatedMsgEq(T, val_a, val_b) : T.equals(val_a, val_b))) return false; + break; + } } - }; - exports.DuplexStreamingCall = DuplexStreamingCall; -} }); + return true; + } + exports.reflectionEquals = reflectionEquals; + const objectValues = Object.values; + function primitiveEq(type, a, b) { + if (a === b) return true; + if (type !== reflection_info_1.ScalarType.BYTES) return false; + let ba = a; + let bb = b; + if (ba.length !== bb.length) return false; + for (let i = 0; i < ba.length; i++) if (ba[i] != bb[i]) return false; + return true; + } + function repeatedPrimitiveEq(type, a, b) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) if (!primitiveEq(type, a[i], b[i])) return false; + return true; + } + function repeatedMsgEq(type, a, b) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) if (!type.equals(a[i], b[i])) return false; + return true; + } +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js -var require_test_transport = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports) { - var __awaiter$6 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/message-type.js +var require_message_type = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.TestTransport = void 0; - const rpc_error_1$1 = require_rpc_error(); - const runtime_1$4 = require_commonjs$1(); - const rpc_output_stream_1$1 = require_rpc_output_stream(); - const rpc_options_1$1 = require_rpc_options(); - const unary_call_1$1 = require_unary_call(); - const server_streaming_call_1$1 = require_server_streaming_call(); - const client_streaming_call_1$1 = require_client_streaming_call(); - const duplex_streaming_call_1$1 = require_duplex_streaming_call(); + exports.MessageType = void 0; + const message_type_contract_1 = require_message_type_contract(); + const reflection_info_1 = require_reflection_info$1(); + const reflection_type_check_1 = require_reflection_type_check(); + const reflection_json_reader_1 = require_reflection_json_reader(); + const reflection_json_writer_1 = require_reflection_json_writer(); + const reflection_binary_reader_1 = require_reflection_binary_reader(); + const reflection_binary_writer_1 = require_reflection_binary_writer(); + const reflection_create_1 = require_reflection_create(); + const reflection_merge_partial_1 = require_reflection_merge_partial(); + const json_typings_1 = require_json_typings(); + const json_format_contract_1 = require_json_format_contract(); + const reflection_equals_1 = require_reflection_equals(); + const binary_writer_1 = require_binary_writer(); + const binary_reader_1 = require_binary_reader(); + const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})); + const messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {}; /** - * Transport for testing. + * This standard message type provides reflection-based + * operations to work with a message. */ - var TestTransport = class TestTransport { + var MessageType = class { + constructor(name, fields, options) { + this.defaultCheckDepth = 16; + this.typeName = name; + this.fields = fields.map(reflection_info_1.normalizeFieldInfo); + this.options = options !== null && options !== void 0 ? options : {}; + messageTypeDescriptor.value = this; + this.messagePrototype = Object.create(null, baseDescriptors); + this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this); + this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this); + this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this); + this.refBinReader = new reflection_binary_reader_1.ReflectionBinaryReader(this); + this.refBinWriter = new reflection_binary_writer_1.ReflectionBinaryWriter(this); + } + create(value) { + let message = reflection_create_1.reflectionCreate(this); + if (value !== void 0) reflection_merge_partial_1.reflectionMergePartial(this, message, value); + return message; + } /** - * Initialize with mock data. Omitted fields have default value. + * Clone the message. + * + * Unknown fields are discarded. */ - constructor(data) { - /** - * Suppress warning / error about uncaught rejections of - * "status" and "trailers". - */ - this.suppressUncaughtRejections = true; - this.headerDelay = 10; - this.responseDelay = 50; - this.betweenResponseDelay = 10; - this.afterResponseDelay = 10; - this.data = data !== null && data !== void 0 ? data : {}; + clone(message) { + let copy = this.create(); + reflection_merge_partial_1.reflectionMergePartial(this, copy, message); + return copy; } /** - * Sent message(s) during the last operation. + * Determines whether two message of the same type have the same field values. + * Checks for deep equality, traversing repeated fields, oneof groups, maps + * and messages recursively. + * Will also return true if both messages are `undefined`. */ - get sentMessages() { - if (this.lastInput instanceof TestInputStream) return this.lastInput.sent; - else if (typeof this.lastInput == "object") return [this.lastInput.single]; - return []; + equals(a, b) { + return reflection_equals_1.reflectionEquals(this, a, b); } /** - * Sending message(s) completed? + * Is the given value assignable to our message type + * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)? */ - get sendComplete() { - if (this.lastInput instanceof TestInputStream) return this.lastInput.completed; - else if (typeof this.lastInput == "object") return true; - return false; - } - promiseHeaders() { - var _a$2; - const headers = (_a$2 = this.data.headers) !== null && _a$2 !== void 0 ? _a$2 : TestTransport.defaultHeaders; - return headers instanceof rpc_error_1$1.RpcError ? Promise.reject(headers) : Promise.resolve(headers); - } - promiseSingleResponse(method) { - if (this.data.response instanceof rpc_error_1$1.RpcError) return Promise.reject(this.data.response); - let r; - if (Array.isArray(this.data.response)) { - runtime_1$4.assert(this.data.response.length > 0); - r = this.data.response[0]; - } else if (this.data.response !== void 0) r = this.data.response; - else r = method.O.create(); - runtime_1$4.assert(method.O.is(r)); - return Promise.resolve(r); + is(arg, depth = this.defaultCheckDepth) { + return this.refTypeCheck.is(arg, depth, false); } /** - * Pushes response messages from the mock data to the output stream. - * If an error response, status or trailers are mocked, the stream is - * closed with the respective error. - * Otherwise, stream is completed successfully. - * - * The returned promise resolves when the stream is closed. It should - * not reject. If it does, code is broken. + * Is the given value assignable to our message type, + * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)? */ - streamResponses(method, stream$3, abort) { - return __awaiter$6(this, void 0, void 0, function* () { - const messages = []; - if (this.data.response === void 0) messages.push(method.O.create()); - else if (Array.isArray(this.data.response)) for (let msg of this.data.response) { - runtime_1$4.assert(method.O.is(msg)); - messages.push(msg); - } - else if (!(this.data.response instanceof rpc_error_1$1.RpcError)) { - runtime_1$4.assert(method.O.is(this.data.response)); - messages.push(this.data.response); - } - try { - yield delay(this.responseDelay, abort)(void 0); - } catch (error) { - stream$3.notifyError(error); - return; - } - if (this.data.response instanceof rpc_error_1$1.RpcError) { - stream$3.notifyError(this.data.response); - return; - } - for (let msg of messages) { - stream$3.notifyMessage(msg); - try { - yield delay(this.betweenResponseDelay, abort)(void 0); - } catch (error) { - stream$3.notifyError(error); - return; - } - } - if (this.data.status instanceof rpc_error_1$1.RpcError) { - stream$3.notifyError(this.data.status); - return; - } - if (this.data.trailers instanceof rpc_error_1$1.RpcError) { - stream$3.notifyError(this.data.trailers); - return; - } - stream$3.notifyComplete(); - }); - } - promiseStatus() { - var _a$2; - const status = (_a$2 = this.data.status) !== null && _a$2 !== void 0 ? _a$2 : TestTransport.defaultStatus; - return status instanceof rpc_error_1$1.RpcError ? Promise.reject(status) : Promise.resolve(status); + isAssignable(arg, depth = this.defaultCheckDepth) { + return this.refTypeCheck.is(arg, depth, true); } - promiseTrailers() { - var _a$2; - const trailers = (_a$2 = this.data.trailers) !== null && _a$2 !== void 0 ? _a$2 : TestTransport.defaultTrailers; - return trailers instanceof rpc_error_1$1.RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); + /** + * Copy partial data into the target message. + */ + mergePartial(target, source) { + reflection_merge_partial_1.reflectionMergePartial(this, target, source); } - maybeSuppressUncaught(...promise) { - if (this.suppressUncaughtRejections) for (let p of promise) p.catch(() => {}); + /** + * Create a new message from binary format. + */ + fromBinary(data, options) { + let opt = binary_reader_1.binaryReadOptions(options); + return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt); } - mergeOptions(options) { - return rpc_options_1$1.mergeRpcOptions({}, options); + /** + * Read a new message from a JSON value. + */ + fromJson(json, options) { + return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options)); } - unary(method, input, options) { - var _a$2; - const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_) => {}).then(delay(this.responseDelay, options.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseTrailers()); - this.maybeSuppressUncaught(statusPromise, trailersPromise); - this.lastInput = { single: input }; - return new unary_call_1$1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); + /** + * Read a new message from a JSON string. + * This is equivalent to `T.fromJson(JSON.parse(json))`. + */ + fromJsonString(json, options) { + let value = JSON.parse(json); + return this.fromJson(value, options); } - serverStreaming(method, input, options) { - var _a$2; - const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1$1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => {}).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); - this.maybeSuppressUncaught(statusPromise, trailersPromise); - this.lastInput = { single: input }; - return new server_streaming_call_1$1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise); + /** + * Write the message to canonical JSON value. + */ + toJson(message, options) { + return this.internalJsonWrite(message, json_format_contract_1.jsonWriteOptions(options)); } - clientStreaming(method, options) { - var _a$2; - const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_) => {}).then(delay(this.responseDelay, options.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseTrailers()); - this.maybeSuppressUncaught(statusPromise, trailersPromise); - this.lastInput = new TestInputStream(this.data, options.abort); - return new client_streaming_call_1$1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise); + /** + * Convert the message to canonical JSON string. + * This is equivalent to `JSON.stringify(T.toJson(t))` + */ + toJsonString(message, options) { + var _a; + let value = this.toJson(message, options); + return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0); } - duplex(method, options) { - var _a$2; - const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1$1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => {}).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); - this.maybeSuppressUncaught(statusPromise, trailersPromise); - this.lastInput = new TestInputStream(this.data, options.abort); - return new duplex_streaming_call_1$1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise); + /** + * Write the message to binary format. + */ + toBinary(message, options) { + let opt = binary_writer_1.binaryWriteOptions(options); + return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish(); } - }; - exports.TestTransport = TestTransport; - TestTransport.defaultHeaders = { responseHeader: "test" }; - TestTransport.defaultStatus = { - code: "OK", - detail: "all good" - }; - TestTransport.defaultTrailers = { responseTrailer: "test" }; - function delay(ms, abort) { - return (v) => new Promise((resolve, reject) => { - if (abort === null || abort === void 0 ? void 0 : abort.aborted) reject(new rpc_error_1$1.RpcError("user cancel", "CANCELLED")); - else { - const id = setTimeout(() => resolve(v), ms); - if (abort) abort.addEventListener("abort", (ev) => { - clearTimeout(id); - reject(new rpc_error_1$1.RpcError("user cancel", "CANCELLED")); - }); + /** + * This is an internal method. If you just want to read a message from + * JSON, use `fromJson()` or `fromJsonString()`. + * + * Reads JSON value and merges the fields into the target + * according to protobuf rules. If the target is omitted, + * a new instance is created first. + */ + internalJsonRead(json, options, target) { + if (json !== null && typeof json == "object" && !Array.isArray(json)) { + let message = target !== null && target !== void 0 ? target : this.create(); + this.refJsonReader.read(json, message, options); + return message; } - }); - } - var TestInputStream = class { - constructor(data, abort) { - this._completed = false; - this._sent = []; - this.data = data; - this.abort = abort; - } - get sent() { - return this._sent; + throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`); } - get completed() { - return this._completed; + /** + * This is an internal method. If you just want to write a message + * to JSON, use `toJson()` or `toJsonString(). + * + * Writes JSON value and returns it. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.write(message, options); } - send(message) { - if (this.data.inputMessage instanceof rpc_error_1$1.RpcError) return Promise.reject(this.data.inputMessage); - const delayMs = this.data.inputMessage === void 0 ? 10 : this.data.inputMessage; - return Promise.resolve(void 0).then(() => { - this._sent.push(message); - }).then(delay(delayMs, this.abort)); + /** + * This is an internal method. If you just want to write a message + * in binary format, use `toBinary()`. + * + * Serializes the message in binary format and appends it to the given + * writer. Returns passed writer. + */ + internalBinaryWrite(message, writer, options) { + this.refBinWriter.write(message, writer, options); + return writer; } - complete() { - if (this.data.inputComplete instanceof rpc_error_1$1.RpcError) return Promise.reject(this.data.inputComplete); - const delayMs = this.data.inputComplete === void 0 ? 10 : this.data.inputComplete; - return Promise.resolve(void 0).then(() => { - this._completed = true; - }).then(delay(delayMs, this.abort)); + /** + * This is an internal method. If you just want to read a message from + * binary data, use `fromBinary()`. + * + * Reads data from binary format and merges the fields into + * the target according to protobuf rules. If the target is + * omitted, a new instance is created first. + */ + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(); + this.refBinReader.read(reader, message, options, length); + return message; } }; -} }); + exports.MessageType = MessageType; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js -var require_rpc_interceptor = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-contains-message-type.js +var require_reflection_contains_message_type = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0; - const runtime_1$3 = require_commonjs$1(); + exports.containsMessageType = void 0; + const message_type_contract_1 = require_message_type_contract(); /** - * Creates a "stack" of of all interceptors specified in the given `RpcOptions`. - * Used by generated client implementations. - * @internal + * Check if the provided object is a proto message. + * + * Note that this is an experimental feature - it is here to stay, but + * implementation details may change without notice. */ - function stackIntercept(kind, transport, method, options, input) { - var _a$2, _b$1, _c$1, _d$1; - if (kind == "unary") { - let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt); - for (const curr of ((_a$2 = options.interceptors) !== null && _a$2 !== void 0 ? _a$2 : []).filter((i) => i.interceptUnary).reverse()) { - const next = tail; - tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt); - } - return tail(method, input, options); - } - if (kind == "serverStreaming") { - let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt); - for (const curr of ((_b$1 = options.interceptors) !== null && _b$1 !== void 0 ? _b$1 : []).filter((i) => i.interceptServerStreaming).reverse()) { - const next = tail; - tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt); - } - return tail(method, input, options); - } - if (kind == "clientStreaming") { - let tail = (mtd, opt) => transport.clientStreaming(mtd, opt); - for (const curr of ((_c$1 = options.interceptors) !== null && _c$1 !== void 0 ? _c$1 : []).filter((i) => i.interceptClientStreaming).reverse()) { - const next = tail; - tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt); - } - return tail(method, options); - } - if (kind == "duplex") { - let tail = (mtd, opt) => transport.duplex(mtd, opt); - for (const curr of ((_d$1 = options.interceptors) !== null && _d$1 !== void 0 ? _d$1 : []).filter((i) => i.interceptDuplex).reverse()) { - const next = tail; - tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt); - } - return tail(method, options); - } - runtime_1$3.assertNever(kind); + function containsMessageType(msg) { + return msg[message_type_contract_1.MESSAGE_TYPE] != null; } - exports.stackIntercept = stackIntercept; + exports.containsMessageType = containsMessageType; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/enum-object.js +var require_enum_object = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0; /** - * @deprecated replaced by `stackIntercept()`, still here to support older generated code + * Is this a lookup object generated by Typescript, for a Typescript enum + * generated by protobuf-ts? + * + * - No `const enum` (enum must not be inlined, we need reverse mapping). + * - No string enum (we need int32 for protobuf). + * - Must have a value for 0 (otherwise, we would need to support custom default values). */ - function stackUnaryInterceptors(transport, method, input, options) { - return stackIntercept("unary", transport, method, options, input); + function isEnumObject(arg) { + if (typeof arg != "object" || arg === null) return false; + if (!arg.hasOwnProperty(0)) return false; + for (let k of Object.keys(arg)) { + let num = parseInt(k); + if (!Number.isNaN(num)) { + let nam = arg[num]; + if (nam === void 0) return false; + if (arg[nam] !== num) return false; + } else { + let num = arg[k]; + if (num === void 0) return false; + if (typeof num !== "number") return false; + if (arg[num] === void 0) return false; + } + } + return true; } - exports.stackUnaryInterceptors = stackUnaryInterceptors; + exports.isEnumObject = isEnumObject; /** - * @deprecated replaced by `stackIntercept()`, still here to support older generated code + * Lists all values of a Typescript enum, as an array of objects with a "name" + * property and a "number" property. + * + * Note that it is possible that a number appears more than once, because it is + * possible to have aliases in an enum. + * + * Throws if the enum does not adhere to the rules of enums generated by + * protobuf-ts. See `isEnumObject()`. */ - function stackServerStreamingInterceptors(transport, method, input, options) { - return stackIntercept("serverStreaming", transport, method, options, input); + function listEnumValues(enumObject) { + if (!isEnumObject(enumObject)) throw new Error("not a typescript enum object"); + let values = []; + for (let [name, number] of Object.entries(enumObject)) if (typeof number == "number") values.push({ + name, + number + }); + return values; } - exports.stackServerStreamingInterceptors = stackServerStreamingInterceptors; + exports.listEnumValues = listEnumValues; /** - * @deprecated replaced by `stackIntercept()`, still here to support older generated code + * Lists the names of a Typescript enum. + * + * Throws if the enum does not adhere to the rules of enums generated by + * protobuf-ts. See `isEnumObject()`. */ - function stackClientStreamingInterceptors(transport, method, options) { - return stackIntercept("clientStreaming", transport, method, options); + function listEnumNames(enumObject) { + return listEnumValues(enumObject).map((val) => val.name); } - exports.stackClientStreamingInterceptors = stackClientStreamingInterceptors; + exports.listEnumNames = listEnumNames; /** - * @deprecated replaced by `stackIntercept()`, still here to support older generated code + * Lists the numbers of a Typescript enum. + * + * Throws if the enum does not adhere to the rules of enums generated by + * protobuf-ts. See `isEnumObject()`. */ - function stackDuplexStreamingInterceptors(transport, method, options) { - return stackIntercept("duplex", transport, method, options); + function listEnumNumbers(enumObject) { + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } - exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; -} }); + exports.listEnumNumbers = listEnumNumbers; +})); //#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js -var require_server_call_context = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/commonjs/index.js +var require_commonjs$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.ServerCallContextController = void 0; - var ServerCallContextController = class { - constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { - code: "OK", - detail: "" - }) { - this._cancelled = false; - this._listeners = []; - this.method = method; - this.headers = headers; - this.deadline = deadline; - this.trailers = {}; - this._sendRH = sendResponseHeadersFn; - this.status = defaultStatus; + var json_typings_1 = require_json_typings(); + Object.defineProperty(exports, "typeofJsonValue", { + enumerable: true, + get: function() { + return json_typings_1.typeofJsonValue; } - /** - * Set the call cancelled. - * - * Invokes all callbacks registered with onCancel() and - * sets `cancelled = true`. - */ - notifyCancelled() { - if (!this._cancelled) { - this._cancelled = true; - for (let l of this._listeners) l(); - } + }); + Object.defineProperty(exports, "isJsonObject", { + enumerable: true, + get: function() { + return json_typings_1.isJsonObject; } - /** - * Send response headers. - */ - sendResponseHeaders(data) { - this._sendRH(data); + }); + var base64_1 = require_base64(); + Object.defineProperty(exports, "base64decode", { + enumerable: true, + get: function() { + return base64_1.base64decode; } - /** - * Is the call cancelled? - * - * When the client closes the connection before the server - * is done, the call is cancelled. - * - * If you want to cancel a request on the server, throw a - * RpcError with the CANCELLED status code. - */ - get cancelled() { - return this._cancelled; + }); + Object.defineProperty(exports, "base64encode", { + enumerable: true, + get: function() { + return base64_1.base64encode; } - /** - * Add a callback for cancellation. - */ - onCancel(callback) { - const l = this._listeners; - l.push(callback); - return () => { - let i = l.indexOf(callback); - if (i >= 0) l.splice(i, 1); - }; + }); + var protobufjs_utf8_1 = require_protobufjs_utf8(); + Object.defineProperty(exports, "utf8read", { + enumerable: true, + get: function() { + return protobufjs_utf8_1.utf8read; } - }; - exports.ServerCallContextController = ServerCallContextController; -} }); - -//#endregion -//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports) { - // webpack verbose output hints that this should be useful - Object.defineProperty(exports, "__esModule", { value: true }); - var service_type_1 = require_service_type(); - Object.defineProperty(exports, "ServiceType", { + }); + var binary_format_contract_1 = require_binary_format_contract(); + Object.defineProperty(exports, "WireType", { enumerable: true, get: function() { - return service_type_1.ServiceType; + return binary_format_contract_1.WireType; } }); - var reflection_info_1 = require_reflection_info(); - Object.defineProperty(exports, "readMethodOptions", { + Object.defineProperty(exports, "mergeBinaryOptions", { enumerable: true, get: function() { - return reflection_info_1.readMethodOptions; + return binary_format_contract_1.mergeBinaryOptions; } }); - Object.defineProperty(exports, "readMethodOption", { + Object.defineProperty(exports, "UnknownFieldHandler", { enumerable: true, get: function() { - return reflection_info_1.readMethodOption; + return binary_format_contract_1.UnknownFieldHandler; } }); - Object.defineProperty(exports, "readServiceOption", { + var binary_reader_1 = require_binary_reader(); + Object.defineProperty(exports, "BinaryReader", { enumerable: true, get: function() { - return reflection_info_1.readServiceOption; + return binary_reader_1.BinaryReader; } }); - var rpc_error_1 = require_rpc_error(); - Object.defineProperty(exports, "RpcError", { + Object.defineProperty(exports, "binaryReadOptions", { enumerable: true, get: function() { - return rpc_error_1.RpcError; + return binary_reader_1.binaryReadOptions; } }); - var rpc_options_1 = require_rpc_options(); - Object.defineProperty(exports, "mergeRpcOptions", { + var binary_writer_1 = require_binary_writer(); + Object.defineProperty(exports, "BinaryWriter", { enumerable: true, get: function() { - return rpc_options_1.mergeRpcOptions; + return binary_writer_1.BinaryWriter; } }); - var rpc_output_stream_1 = require_rpc_output_stream(); - Object.defineProperty(exports, "RpcOutputStreamController", { + Object.defineProperty(exports, "binaryWriteOptions", { enumerable: true, get: function() { - return rpc_output_stream_1.RpcOutputStreamController; + return binary_writer_1.binaryWriteOptions; } }); - var test_transport_1 = require_test_transport(); - Object.defineProperty(exports, "TestTransport", { + var pb_long_1 = require_pb_long(); + Object.defineProperty(exports, "PbLong", { enumerable: true, get: function() { - return test_transport_1.TestTransport; + return pb_long_1.PbLong; } }); - var deferred_1 = require_deferred(); - Object.defineProperty(exports, "Deferred", { + Object.defineProperty(exports, "PbULong", { enumerable: true, get: function() { - return deferred_1.Deferred; + return pb_long_1.PbULong; } }); - Object.defineProperty(exports, "DeferredState", { + var json_format_contract_1 = require_json_format_contract(); + Object.defineProperty(exports, "jsonReadOptions", { enumerable: true, get: function() { - return deferred_1.DeferredState; + return json_format_contract_1.jsonReadOptions; } }); - var duplex_streaming_call_1 = require_duplex_streaming_call(); - Object.defineProperty(exports, "DuplexStreamingCall", { + Object.defineProperty(exports, "jsonWriteOptions", { enumerable: true, get: function() { - return duplex_streaming_call_1.DuplexStreamingCall; + return json_format_contract_1.jsonWriteOptions; } }); - var client_streaming_call_1 = require_client_streaming_call(); - Object.defineProperty(exports, "ClientStreamingCall", { + Object.defineProperty(exports, "mergeJsonOptions", { enumerable: true, get: function() { - return client_streaming_call_1.ClientStreamingCall; + return json_format_contract_1.mergeJsonOptions; } }); - var server_streaming_call_1 = require_server_streaming_call(); - Object.defineProperty(exports, "ServerStreamingCall", { + var message_type_contract_1 = require_message_type_contract(); + Object.defineProperty(exports, "MESSAGE_TYPE", { enumerable: true, get: function() { - return server_streaming_call_1.ServerStreamingCall; + return message_type_contract_1.MESSAGE_TYPE; } }); - var unary_call_1 = require_unary_call(); - Object.defineProperty(exports, "UnaryCall", { + var message_type_1 = require_message_type(); + Object.defineProperty(exports, "MessageType", { enumerable: true, get: function() { - return unary_call_1.UnaryCall; + return message_type_1.MessageType; } }); - var rpc_interceptor_1 = require_rpc_interceptor(); - Object.defineProperty(exports, "stackIntercept", { + var reflection_info_1 = require_reflection_info$1(); + Object.defineProperty(exports, "ScalarType", { enumerable: true, get: function() { - return rpc_interceptor_1.stackIntercept; + return reflection_info_1.ScalarType; } }); - Object.defineProperty(exports, "stackDuplexStreamingInterceptors", { + Object.defineProperty(exports, "LongType", { enumerable: true, get: function() { - return rpc_interceptor_1.stackDuplexStreamingInterceptors; + return reflection_info_1.LongType; } }); - Object.defineProperty(exports, "stackClientStreamingInterceptors", { + Object.defineProperty(exports, "RepeatType", { enumerable: true, get: function() { - return rpc_interceptor_1.stackClientStreamingInterceptors; + return reflection_info_1.RepeatType; } }); - Object.defineProperty(exports, "stackServerStreamingInterceptors", { + Object.defineProperty(exports, "normalizeFieldInfo", { enumerable: true, get: function() { - return rpc_interceptor_1.stackServerStreamingInterceptors; + return reflection_info_1.normalizeFieldInfo; } }); - Object.defineProperty(exports, "stackUnaryInterceptors", { + Object.defineProperty(exports, "readFieldOptions", { enumerable: true, get: function() { - return rpc_interceptor_1.stackUnaryInterceptors; + return reflection_info_1.readFieldOptions; } }); - var server_call_context_1 = require_server_call_context(); - Object.defineProperty(exports, "ServerCallContextController", { + Object.defineProperty(exports, "readFieldOption", { enumerable: true, get: function() { - return server_call_context_1.ServerCallContextController; + return reflection_info_1.readFieldOption; } }); -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js -var require_cachescope = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CacheScope = void 0; - const runtime_1$2 = require_commonjs$1(); - const runtime_2$2 = require_commonjs$1(); - const runtime_3$2 = require_commonjs$1(); - const runtime_4$2 = require_commonjs$1(); - const runtime_5$2 = require_commonjs$1(); - var CacheScope$Type = class extends runtime_5$2.MessageType { - constructor() { - super("github.actions.results.entities.v1.CacheScope", [{ - no: 1, - name: "scope", - kind: "scalar", - T: 9 - }, { - no: 2, - name: "permission", - kind: "scalar", - T: 3 - }]); + Object.defineProperty(exports, "readMessageOption", { + enumerable: true, + get: function() { + return reflection_info_1.readMessageOption; } - create(value) { - const message = { - scope: "", - permission: "0" - }; - globalThis.Object.defineProperty(message, runtime_4$2.MESSAGE_TYPE, { - enumerable: false, - value: this - }); - if (value !== void 0) (0, runtime_3$2.reflectionMergePartial)(this, message, value); - return message; + }); + var reflection_type_check_1 = require_reflection_type_check(); + Object.defineProperty(exports, "ReflectionTypeCheck", { + enumerable: true, + get: function() { + return reflection_type_check_1.ReflectionTypeCheck; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.scope = reader.string(); - break; - case 2: - message.permission = reader.int64().toString(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2$2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } - } - return message; + }); + var reflection_create_1 = require_reflection_create(); + Object.defineProperty(exports, "reflectionCreate", { + enumerable: true, + get: function() { + return reflection_create_1.reflectionCreate; } - internalBinaryWrite(message, writer, options) { - if (message.scope !== "") writer.tag(1, runtime_1$2.WireType.LengthDelimited).string(message.scope); - if (message.permission !== "0") writer.tag(2, runtime_1$2.WireType.Varint).int64(message.permission); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2$2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + }); + var reflection_scalar_default_1 = require_reflection_scalar_default(); + Object.defineProperty(exports, "reflectionScalarDefault", { + enumerable: true, + get: function() { + return reflection_scalar_default_1.reflectionScalarDefault; } - }; - /** - * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheScope - */ - exports.CacheScope = new CacheScope$Type(); -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js -var require_cachemetadata = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CacheMetadata = void 0; - const runtime_1$1 = require_commonjs$1(); - const runtime_2$1 = require_commonjs$1(); - const runtime_3$1 = require_commonjs$1(); - const runtime_4$1 = require_commonjs$1(); - const runtime_5$1 = require_commonjs$1(); - const cachescope_1 = require_cachescope(); - var CacheMetadata$Type = class extends runtime_5$1.MessageType { - constructor() { - super("github.actions.results.entities.v1.CacheMetadata", [{ - no: 1, - name: "repository_id", - kind: "scalar", - T: 3 - }, { - no: 2, - name: "scope", - kind: "message", - repeat: 1, - T: () => cachescope_1.CacheScope - }]); + }); + var reflection_merge_partial_1 = require_reflection_merge_partial(); + Object.defineProperty(exports, "reflectionMergePartial", { + enumerable: true, + get: function() { + return reflection_merge_partial_1.reflectionMergePartial; } - create(value) { - const message = { - repositoryId: "0", - scope: [] - }; - globalThis.Object.defineProperty(message, runtime_4$1.MESSAGE_TYPE, { - enumerable: false, - value: this - }); - if (value !== void 0) (0, runtime_3$1.reflectionMergePartial)(this, message, value); - return message; + }); + var reflection_equals_1 = require_reflection_equals(); + Object.defineProperty(exports, "reflectionEquals", { + enumerable: true, + get: function() { + return reflection_equals_1.reflectionEquals; + } + }); + var reflection_binary_reader_1 = require_reflection_binary_reader(); + Object.defineProperty(exports, "ReflectionBinaryReader", { + enumerable: true, + get: function() { + return reflection_binary_reader_1.ReflectionBinaryReader; + } + }); + var reflection_binary_writer_1 = require_reflection_binary_writer(); + Object.defineProperty(exports, "ReflectionBinaryWriter", { + enumerable: true, + get: function() { + return reflection_binary_writer_1.ReflectionBinaryWriter; + } + }); + var reflection_json_reader_1 = require_reflection_json_reader(); + Object.defineProperty(exports, "ReflectionJsonReader", { + enumerable: true, + get: function() { + return reflection_json_reader_1.ReflectionJsonReader; + } + }); + var reflection_json_writer_1 = require_reflection_json_writer(); + Object.defineProperty(exports, "ReflectionJsonWriter", { + enumerable: true, + get: function() { + return reflection_json_writer_1.ReflectionJsonWriter; + } + }); + var reflection_contains_message_type_1 = require_reflection_contains_message_type(); + Object.defineProperty(exports, "containsMessageType", { + enumerable: true, + get: function() { + return reflection_contains_message_type_1.containsMessageType; + } + }); + var oneof_1 = require_oneof(); + Object.defineProperty(exports, "isOneofGroup", { + enumerable: true, + get: function() { + return oneof_1.isOneofGroup; + } + }); + Object.defineProperty(exports, "setOneofValue", { + enumerable: true, + get: function() { + return oneof_1.setOneofValue; + } + }); + Object.defineProperty(exports, "getOneofValue", { + enumerable: true, + get: function() { + return oneof_1.getOneofValue; + } + }); + Object.defineProperty(exports, "clearOneofValue", { + enumerable: true, + get: function() { + return oneof_1.clearOneofValue; + } + }); + Object.defineProperty(exports, "getSelectedOneofValue", { + enumerable: true, + get: function() { + return oneof_1.getSelectedOneofValue; + } + }); + var enum_object_1 = require_enum_object(); + Object.defineProperty(exports, "listEnumValues", { + enumerable: true, + get: function() { + return enum_object_1.listEnumValues; + } + }); + Object.defineProperty(exports, "listEnumNames", { + enumerable: true, + get: function() { + return enum_object_1.listEnumNames; + } + }); + Object.defineProperty(exports, "listEnumNumbers", { + enumerable: true, + get: function() { + return enum_object_1.listEnumNumbers; + } + }); + Object.defineProperty(exports, "isEnumObject", { + enumerable: true, + get: function() { + return enum_object_1.isEnumObject; + } + }); + var lower_camel_case_1 = require_lower_camel_case(); + Object.defineProperty(exports, "lowerCamelCase", { + enumerable: true, + get: function() { + return lower_camel_case_1.lowerCamelCase; + } + }); + var assert_1 = require_assert(); + Object.defineProperty(exports, "assert", { + enumerable: true, + get: function() { + return assert_1.assert; + } + }); + Object.defineProperty(exports, "assertNever", { + enumerable: true, + get: function() { + return assert_1.assertNever; + } + }); + Object.defineProperty(exports, "assertInt32", { + enumerable: true, + get: function() { + return assert_1.assertInt32; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.repositoryId = reader.int64().toString(); - break; - case 2: - message.scope.push(cachescope_1.CacheScope.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2$1.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } - } - return message; + }); + Object.defineProperty(exports, "assertUInt32", { + enumerable: true, + get: function() { + return assert_1.assertUInt32; } - internalBinaryWrite(message, writer, options) { - if (message.repositoryId !== "0") writer.tag(1, runtime_1$1.WireType.Varint).int64(message.repositoryId); - for (let i = 0; i < message.scope.length; i++) cachescope_1.CacheScope.internalBinaryWrite(message.scope[i], writer.tag(2, runtime_1$1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2$1.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + }); + Object.defineProperty(exports, "assertFloat32", { + enumerable: true, + get: function() { + return assert_1.assertFloat32; } - }; + }); +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js +var require_reflection_info = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0; + const runtime_1 = require_commonjs$1(); /** - * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheMetadata + * Turns PartialMethodInfo into MethodInfo. */ - exports.CacheMetadata = new CacheMetadata$Type(); -} }); + function normalizeMethodInfo(method, service) { + var _a, _b, _c; + let m = method; + m.service = service; + m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name); + m.serverStreaming = !!m.serverStreaming; + m.clientStreaming = !!m.clientStreaming; + m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {}; + m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : void 0; + return m; + } + exports.normalizeMethodInfo = normalizeMethodInfo; + /** + * Read custom method options from a generated service client. + * + * @deprecated use readMethodOption() + */ + function readMethodOptions(service, methodName, extensionName, extensionType) { + var _a; + const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options; + return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; + } + exports.readMethodOptions = readMethodOptions; + function readMethodOption(service, methodName, extensionName, extensionType) { + var _a; + const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options; + if (!options) return; + const optionVal = options[extensionName]; + if (optionVal === void 0) return optionVal; + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + exports.readMethodOption = readMethodOption; + function readServiceOption(service, extensionName, extensionType) { + const options = service.options; + if (!options) return; + const optionVal = options[extensionName]; + if (optionVal === void 0) return optionVal; + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + exports.readServiceOption = readServiceOption; +})); //#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache$1 = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js +var require_service_type = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0; - const runtime_rpc_1 = require_commonjs(); - const runtime_1 = require_commonjs$1(); - const runtime_2 = require_commonjs$1(); - const runtime_3 = require_commonjs$1(); - const runtime_4 = require_commonjs$1(); - const runtime_5 = require_commonjs$1(); - const cachemetadata_1 = require_cachemetadata(); - var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.CreateCacheEntryRequest", [ - { - no: 1, - name: "metadata", - kind: "message", - T: () => cachemetadata_1.CacheMetadata - }, - { - no: 2, - name: "key", - kind: "scalar", - T: 9 - }, - { - no: 3, - name: "version", - kind: "scalar", - T: 9 - } - ]); - } - create(value) { - const message = { - key: "", - version: "" - }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { - enumerable: false, - value: this - }); - if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case 2: - message.key = reader.string(); - break; - case 3: - message.version = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - if (message.version !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.version); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + exports.ServiceType = void 0; + const reflection_info_1 = require_reflection_info(); + var ServiceType = class { + constructor(typeName, methods, options) { + this.typeName = typeName; + this.methods = methods.map((i) => reflection_info_1.normalizeMethodInfo(i, this)); + this.options = options !== null && options !== void 0 ? options : {}; } }; + exports.ServiceType = ServiceType; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js +var require_rpc_error = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RpcError = void 0; /** - * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryRequest + * An error that occurred while calling a RPC method. */ - exports.CreateCacheEntryRequest = new CreateCacheEntryRequest$Type(); - var CreateCacheEntryResponse$Type = class extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.CreateCacheEntryResponse", [{ - no: 1, - name: "ok", - kind: "scalar", - T: 8 - }, { - no: 2, - name: "signed_upload_url", - kind: "scalar", - T: 9 - }]); - } - create(value) { - const message = { - ok: false, - signedUploadUrl: "" - }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { - enumerable: false, - value: this - }); - if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + var RpcError = class extends Error { + constructor(message, code = "UNKNOWN", meta) { + super(message); + this.name = "RpcError"; + Object.setPrototypeOf(this, new.target.prototype); + this.code = code; + this.meta = meta !== null && meta !== void 0 ? meta : {}; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.ok = reader.bool(); - break; - case 2: - message.signedUploadUrl = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } + toString() { + const l = [this.name + ": " + this.message]; + if (this.code) { + l.push(""); + l.push("Code: " + this.code); } - return message; - } - internalBinaryWrite(message, writer, options) { - if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - if (message.signedUploadUrl !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + if (this.serviceName && this.methodName) l.push("Method: " + this.serviceName + "/" + this.methodName); + let m = Object.entries(this.meta); + if (m.length) { + l.push(""); + l.push("Meta:"); + for (let [k, v] of m) l.push(` ${k}: ${v}`); + } + return l.join("\n"); } }; + exports.RpcError = RpcError; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js +var require_rpc_options = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.mergeRpcOptions = void 0; + const runtime_1 = require_commonjs$1(); /** - * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryResponse + * Merges custom RPC options with defaults. Returns a new instance and keeps + * the "defaults" and the "options" unmodified. + * + * Merges `RpcMetadata` "meta", overwriting values from "defaults" with + * values from "options". Does not append values to existing entries. + * + * Merges "jsonOptions", including "jsonOptions.typeRegistry", by creating + * a new array that contains types from "options.jsonOptions.typeRegistry" + * first, then types from "defaults.jsonOptions.typeRegistry". + * + * Merges "binaryOptions". + * + * Merges "interceptors" by creating a new array that contains interceptors + * from "defaults" first, then interceptors from "options". + * + * Works with objects that extend `RpcOptions`, but only if the added + * properties are of type Date, primitive like string, boolean, or Array + * of primitives. If you have other property types, you have to merge them + * yourself. */ - exports.CreateCacheEntryResponse = new CreateCacheEntryResponse$Type(); - var FinalizeCacheEntryUploadRequest$Type = class extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.FinalizeCacheEntryUploadRequest", [ - { - no: 1, - name: "metadata", - kind: "message", - T: () => cachemetadata_1.CacheMetadata - }, - { - no: 2, - name: "key", - kind: "scalar", - T: 9 - }, - { - no: 3, - name: "size_bytes", - kind: "scalar", - T: 3 - }, - { - no: 4, - name: "version", - kind: "scalar", - T: 9 - } - ]); - } - create(value) { - const message = { - key: "", - sizeBytes: "0", - version: "" - }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { - enumerable: false, - value: this - }); - if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case 2: - message.key = reader.string(); - break; - case 3: - message.sizeBytes = reader.int64().toString(); - break; - case 4: - message.version = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } + function mergeRpcOptions(defaults, options) { + if (!options) return defaults; + let o = {}; + copy(defaults, o); + copy(options, o); + for (let key of Object.keys(options)) { + let val = options[key]; + switch (key) { + case "jsonOptions": + o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); + break; + case "binaryOptions": + o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions); + break; + case "meta": + o.meta = {}; + copy(defaults.meta, o.meta); + copy(options.meta, o.meta); + break; + case "interceptors": + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); + break; } - return message; } - internalBinaryWrite(message, writer, options) { - if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - if (message.sizeBytes !== "0") writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes); - if (message.version !== "") writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } - }; + return o; + } + exports.mergeRpcOptions = mergeRpcOptions; + function copy(a, into) { + if (!a) return; + let c = into; + for (let [k, v] of Object.entries(a)) if (v instanceof Date) c[k] = new Date(v.getTime()); + else if (Array.isArray(v)) c[k] = v.concat(); + else c[k] = v; + } +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js +var require_deferred = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Deferred = exports.DeferredState = void 0; + var DeferredState; + (function(DeferredState) { + DeferredState[DeferredState["PENDING"] = 0] = "PENDING"; + DeferredState[DeferredState["REJECTED"] = 1] = "REJECTED"; + DeferredState[DeferredState["RESOLVED"] = 2] = "RESOLVED"; + })(DeferredState = exports.DeferredState || (exports.DeferredState = {})); /** - * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadRequest + * A deferred promise. This is a "controller" for a promise, which lets you + * pass a promise around and reject or resolve it from the outside. + * + * Warning: This class is to be used with care. Using it can make code very + * difficult to read. It is intended for use in library code that exposes + * promises, not for regular business logic. */ - exports.FinalizeCacheEntryUploadRequest = new FinalizeCacheEntryUploadRequest$Type(); - var FinalizeCacheEntryUploadResponse$Type = class extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [{ - no: 1, - name: "ok", - kind: "scalar", - T: 8 - }, { - no: 2, - name: "entry_id", - kind: "scalar", - T: 3 - }]); - } - create(value) { - const message = { - ok: false, - entryId: "0" - }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { - enumerable: false, - value: this + var Deferred = class { + /** + * @param preventUnhandledRejectionWarning - prevents the warning + * "Unhandled Promise rejection" by adding a noop rejection handler. + * Working with calls returned from the runtime-rpc package in an + * async function usually means awaiting one call property after + * the other. This means that the "status" is not being awaited when + * an earlier await for the "headers" is rejected. This causes the + * "unhandled promise reject" warning. A more correct behaviour for + * calls might be to become aware whether at least one of the + * promises is handled and swallow the rejection warning for the + * others. + */ + constructor(preventUnhandledRejectionWarning = true) { + this._state = DeferredState.PENDING; + this._promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; }); - if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + if (preventUnhandledRejectionWarning) this._promise.catch((_) => {}); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.ok = reader.bool(); - break; - case 2: - message.entryId = reader.int64().toString(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } - } - return message; + /** + * Get the current state of the promise. + */ + get state() { + return this._state; } - internalBinaryWrite(message, writer, options) { - if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - if (message.entryId !== "0") writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + /** + * Get the deferred promise. + */ + get promise() { + return this._promise; } - }; - /** - * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadResponse - */ - exports.FinalizeCacheEntryUploadResponse = new FinalizeCacheEntryUploadResponse$Type(); - var GetCacheEntryDownloadURLRequest$Type = class extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.GetCacheEntryDownloadURLRequest", [ - { - no: 1, - name: "metadata", - kind: "message", - T: () => cachemetadata_1.CacheMetadata - }, - { - no: 2, - name: "key", - kind: "scalar", - T: 9 - }, - { - no: 3, - name: "restore_keys", - kind: "scalar", - repeat: 2, - T: 9 - }, - { - no: 4, - name: "version", - kind: "scalar", - T: 9 - } - ]); + /** + * Resolve the promise. Throws if the promise is already resolved or rejected. + */ + resolve(value) { + if (this.state !== DeferredState.PENDING) throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`); + this._resolve(value); + this._state = DeferredState.RESOLVED; } - create(value) { - const message = { - key: "", - restoreKeys: [], - version: "" - }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { - enumerable: false, - value: this - }); - if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + /** + * Reject the promise. Throws if the promise is already resolved or rejected. + */ + reject(reason) { + if (this.state !== DeferredState.PENDING) throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`); + this._reject(reason); + this._state = DeferredState.REJECTED; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case 2: - message.key = reader.string(); - break; - case 3: - message.restoreKeys.push(reader.string()); - break; - case 4: - message.version = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } - } - return message; + /** + * Resolve the promise. Ignore if not pending. + */ + resolvePending(val) { + if (this._state === DeferredState.PENDING) this.resolve(val); } - internalBinaryWrite(message, writer, options) { - if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - for (let i = 0; i < message.restoreKeys.length; i++) writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); - if (message.version !== "") writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + /** + * Reject the promise. Ignore if not pending. + */ + rejectPending(reason) { + if (this._state === DeferredState.PENDING) this.reject(reason); } }; + exports.Deferred = Deferred; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js +var require_rpc_output_stream = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RpcOutputStreamController = void 0; + const deferred_1 = require_deferred(); + const runtime_1 = require_commonjs$1(); /** - * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLRequest + * A `RpcOutputStream` that you control. */ - exports.GetCacheEntryDownloadURLRequest = new GetCacheEntryDownloadURLRequest$Type(); - var GetCacheEntryDownloadURLResponse$Type = class extends runtime_5.MessageType { + var RpcOutputStreamController = class { constructor() { - super("github.actions.results.api.v1.GetCacheEntryDownloadURLResponse", [ - { - no: 1, - name: "ok", - kind: "scalar", - T: 8 - }, - { - no: 2, - name: "signed_download_url", - kind: "scalar", - T: 9 - }, - { - no: 3, - name: "matched_key", - kind: "scalar", - T: 9 - } - ]); - } - create(value) { - const message = { - ok: false, - signedDownloadUrl: "", - matchedKey: "" + this._lis = { + nxt: [], + msg: [], + err: [], + cmp: [] }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { - enumerable: false, - value: this - }); - if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + this._closed = false; + this._itState = { q: [] }; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - message.ok = reader.bool(); - break; - case 2: - message.signedDownloadUrl = reader.string(); - break; - case 3: - message.matchedKey = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d$1 = reader.skip(wireType); - if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); - } - } - return message; + onNext(callback) { + return this.addLis(callback, this._lis.nxt); } - internalBinaryWrite(message, writer, options) { - if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - if (message.signedDownloadUrl !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedDownloadUrl); - if (message.matchedKey !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.matchedKey); - let u = options.writeUnknownFields; - if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + onMessage(callback) { + return this.addLis(callback, this._lis.msg); } - }; - /** - * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse - */ - exports.GetCacheEntryDownloadURLResponse = new GetCacheEntryDownloadURLResponse$Type(); - /** - * @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService - */ - exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [ - { - name: "CreateCacheEntry", - options: {}, - I: exports.CreateCacheEntryRequest, - O: exports.CreateCacheEntryResponse - }, - { - name: "FinalizeCacheEntryUpload", - options: {}, - I: exports.FinalizeCacheEntryUploadRequest, - O: exports.FinalizeCacheEntryUploadResponse - }, - { - name: "GetCacheEntryDownloadURL", - options: {}, - I: exports.GetCacheEntryDownloadURLRequest, - O: exports.GetCacheEntryDownloadURLResponse + onError(callback) { + return this.addLis(callback, this._lis.err); } - ]); -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js -var require_cache_twirp_client = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; - const cache_1 = require_cache$1(); - var CacheServiceClientJSON = class { - constructor(rpc) { - this.rpc = rpc; - this.CreateCacheEntry.bind(this); - this.FinalizeCacheEntryUpload.bind(this); - this.GetCacheEntryDownloadURL.bind(this); + onComplete(callback) { + return this.addLis(callback, this._lis.cmp); } - CreateCacheEntry(request) { - const data = cache_1.CreateCacheEntryRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data); - return promise.then((data$1) => cache_1.CreateCacheEntryResponse.fromJson(data$1, { ignoreUnknownFields: true })); + addLis(callback, list) { + list.push(callback); + return () => { + let i = list.indexOf(callback); + if (i >= 0) list.splice(i, 1); + }; } - FinalizeCacheEntryUpload(request) { - const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data); - return promise.then((data$1) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data$1, { ignoreUnknownFields: true })); + clearLis() { + for (let l of Object.values(this._lis)) l.splice(0, l.length); } - GetCacheEntryDownloadURL(request) { - const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false + /** + * Is this stream already closed by a completion or error? + */ + get closed() { + return this._closed !== false; + } + /** + * Emit message, close with error, or close successfully, but only one + * at a time. + * Can be used to wrap a stream by using the other stream's `onNext`. + */ + notifyNext(message, error, complete) { + runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, "only one emission at a time"); + if (message) this.notifyMessage(message); + if (error) this.notifyError(error); + if (complete) this.notifyComplete(); + } + /** + * Emits a new message. Throws if stream is closed. + * + * Triggers onNext and onMessage callbacks. + */ + notifyMessage(message) { + runtime_1.assert(!this.closed, "stream is closed"); + this.pushIt({ + value: message, + done: false }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data); - return promise.then((data$1) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data$1, { ignoreUnknownFields: true })); + this._lis.msg.forEach((l) => l(message)); + this._lis.nxt.forEach((l) => l(message, void 0, false)); } - }; - exports.CacheServiceClientJSON = CacheServiceClientJSON; - var CacheServiceClientProtobuf = class { - constructor(rpc) { - this.rpc = rpc; - this.CreateCacheEntry.bind(this); - this.FinalizeCacheEntryUpload.bind(this); - this.GetCacheEntryDownloadURL.bind(this); + /** + * Closes the stream with an error. Throws if stream is closed. + * + * Triggers onNext and onError callbacks. + */ + notifyError(error) { + runtime_1.assert(!this.closed, "stream is closed"); + this._closed = error; + this.pushIt(error); + this._lis.err.forEach((l) => l(error)); + this._lis.nxt.forEach((l) => l(void 0, error, false)); + this.clearLis(); } - CreateCacheEntry(request) { - const data = cache_1.CreateCacheEntryRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data); - return promise.then((data$1) => cache_1.CreateCacheEntryResponse.fromBinary(data$1)); + /** + * Closes the stream successfully. Throws if stream is closed. + * + * Triggers onNext and onComplete callbacks. + */ + notifyComplete() { + runtime_1.assert(!this.closed, "stream is closed"); + this._closed = true; + this.pushIt({ + value: null, + done: true + }); + this._lis.cmp.forEach((l) => l()); + this._lis.nxt.forEach((l) => l(void 0, void 0, true)); + this.clearLis(); } - FinalizeCacheEntryUpload(request) { - const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data); - return promise.then((data$1) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data$1)); + /** + * Creates an async iterator (that can be used with `for await {...}`) + * to consume the stream. + * + * Some things to note: + * - If an error occurs, the `for await` will throw it. + * - If an error occurred before the `for await` was started, `for await` + * will re-throw it. + * - If the stream is already complete, the `for await` will be empty. + * - If your `for await` consumes slower than the stream produces, + * for example because you are relaying messages in a slow operation, + * messages are queued. + */ + [Symbol.asyncIterator]() { + if (this._closed === true) this.pushIt({ + value: null, + done: true + }); + else if (this._closed !== false) this.pushIt(this._closed); + return { next: () => { + let state = this._itState; + runtime_1.assert(state, "bad state"); + runtime_1.assert(!state.p, "iterator contract broken"); + let first = state.q.shift(); + if (first) return "value" in first ? Promise.resolve(first) : Promise.reject(first); + state.p = new deferred_1.Deferred(); + return state.p.promise; + } }; } - GetCacheEntryDownloadURL(request) { - const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data); - return promise.then((data$1) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data$1)); + pushIt(result) { + let state = this._itState; + if (state.p) { + const p = state.p; + runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, "iterator contract broken"); + "value" in result ? p.resolve(result) : p.reject(result); + delete state.p; + } else state.q.push(result); } }; - exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; -} }); + exports.RpcOutputStreamController = RpcOutputStreamController; +})); //#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js -var require_util = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js"(exports) { +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js +var require_unary_call = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.maskSecretUrls = exports.maskSigUrl = void 0; - const core_1$1 = require_core(); + exports.UnaryCall = void 0; /** - * Masks the `sig` parameter in a URL and sets it as a secret. - * - * @param url - The URL containing the signature parameter to mask - * @remarks - * This function attempts to parse the provided URL and identify the 'sig' query parameter. - * If found, it registers both the raw and URL-encoded signature values as secrets using - * the Actions `setSecret` API, which prevents them from being displayed in logs. - * - * The function handles errors gracefully if URL parsing fails, logging them as debug messages. - * - * @example - * ```typescript - * // Mask a signature in an Azure SAS token URL - * maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01'); - * ``` + * A unary RPC call. Unary means there is exactly one input message and + * exactly one output message unless an error occurred. */ - function maskSigUrl(url$1) { - if (!url$1) return; - try { - const parsedUrl = new URL(url$1); - const signature = parsedUrl.searchParams.get("sig"); - if (signature) { - (0, core_1$1.setSecret)(signature); - (0, core_1$1.setSecret)(encodeURIComponent(signature)); - } - } catch (error) { - (0, core_1$1.debug)(`Failed to parse URL: ${url$1} ${error instanceof Error ? error.message : String(error)}`); + var UnaryCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.request = request; + this.headers = headers; + this.response = response; + this.status = status; + this.trailers = trailers; } - } - exports.maskSigUrl = maskSigUrl; - /** - * Masks sensitive information in URLs containing signature parameters. - * Currently supports masking 'sig' parameters in the 'signed_upload_url' - * and 'signed_download_url' properties of the provided object. - * - * @param body - The object should contain a signature - * @remarks - * This function extracts URLs from the object properties and calls maskSigUrl - * on each one to redact sensitive signature information. The function doesn't - * modify the original object; it only marks the signatures as secrets for - * logging purposes. - * - * @example - * ```typescript - * const responseBody = { - * signed_upload_url: 'https://blob.core.windows.net/?sig=abc123', - * signed_download_url: 'https://blob.core/windows.net/?sig=def456' - * }; - * maskSecretUrls(responseBody); - * ``` - */ - function maskSecretUrls(body$1) { - if (typeof body$1 !== "object" || body$1 === null) { - (0, core_1$1.debug)("body is not an object or is null"); - return; + /** + * If you are only interested in the final outcome of this call, + * you can await it to receive a `FinishedUnaryCall`. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } - if ("signed_upload_url" in body$1 && typeof body$1.signed_upload_url === "string") maskSigUrl(body$1.signed_upload_url); - if ("signed_download_url" in body$1 && typeof body$1.signed_download_url === "string") maskSigUrl(body$1.signed_download_url); - } - exports.maskSecretUrls = maskSecretUrls; -} }); + promiseFinished() { + return __awaiter(this, void 0, void 0, function* () { + let [headers, response, status, trailers] = yield Promise.all([ + this.headers, + this.response, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + request: this.request, + headers, + response, + status, + trailers + }; + }); + } + }; + exports.UnaryCall = UnaryCall; +})); //#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js -var require_cacheTwirpClient = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports) { - var __awaiter$5 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js +var require_server_streaming_call = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -42375,163 +43739,132 @@ var require_cacheTwirpClient = __commonJS({ "node_modules/.deno/@actions+cache@4 }); }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.internalCacheTwirpClient = void 0; - const core_1 = require_core(); - const user_agent_1 = require_user_agent(); - const errors_1 = require_errors(); - const config_1$1 = require_config(); - const cacheUtils_1 = require_cacheUtils(); - const auth_1 = require_auth(); - const http_client_1 = require_lib(); - const cache_twirp_client_1 = require_cache_twirp_client(); - const util_1 = require_util(); + exports.ServerStreamingCall = void 0; /** - * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. - * - * It adds retry logic to the request method, which is not present in the generated client. - * - * This class is used to interact with cache service v2. + * A server streaming RPC call. The client provides exactly one input message + * but the server may respond with 0, 1, or more messages. */ - var CacheServiceClient = class { - constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { - this.maxAttempts = 5; - this.baseRetryIntervalMilliseconds = 3e3; - this.retryMultiplier = 1.5; - const token = (0, cacheUtils_1.getRuntimeToken)(); - this.baseUrl = (0, config_1$1.getCacheServiceURL)(); - if (maxAttempts) this.maxAttempts = maxAttempts; - if (baseRetryIntervalMilliseconds) this.baseRetryIntervalMilliseconds = baseRetryIntervalMilliseconds; - if (retryMultiplier) this.retryMultiplier = retryMultiplier; - this.httpClient = new http_client_1.HttpClient(userAgent, [new auth_1.BearerCredentialHandler(token)]); + var ServerStreamingCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.request = request; + this.headers = headers; + this.responses = response; + this.status = status; + this.trailers = trailers; } - request(service, method, contentType$1, data) { - return __awaiter$5(this, void 0, void 0, function* () { - const url$1 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url$1}`); - const headers = { "Content-Type": contentType$1 }; - try { - const { body: body$1 } = yield this.retryableRequest(() => __awaiter$5(this, void 0, void 0, function* () { - return this.httpClient.post(url$1, JSON.stringify(data), headers); - })); - return body$1; - } catch (error) { - throw new Error(`Failed to ${method}: ${error.message}`); - } + /** + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * You should first setup some listeners to the `request` to + * see the actual messages the server replied with. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + } + promiseFinished() { + return __awaiter(this, void 0, void 0, function* () { + let [headers, status, trailers] = yield Promise.all([ + this.headers, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + request: this.request, + headers, + status, + trailers + }; }); } - retryableRequest(operation) { - return __awaiter$5(this, void 0, void 0, function* () { - let attempt = 0; - let errorMessage = ""; - let rawBody = ""; - while (attempt < this.maxAttempts) { - let isRetryable = false; - try { - const response = yield operation(); - const statusCode = response.message.statusCode; - rawBody = yield response.readBody(); - (0, core_1.debug)(`[Response] - ${response.message.statusCode}`); - (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); - const body$1 = JSON.parse(rawBody); - (0, util_1.maskSecretUrls)(body$1); - (0, core_1.debug)(`Body: ${JSON.stringify(body$1, null, 2)}`); - if (this.isSuccessStatusCode(statusCode)) return { - response, - body: body$1 - }; - isRetryable = this.isRetryableHttpStatusCode(statusCode); - errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`; - if (body$1.msg) { - if (errors_1.UsageError.isUsageErrorMessage(body$1.msg)) throw new errors_1.UsageError(); - errorMessage = `${errorMessage}: ${body$1.msg}`; - } - } catch (error) { - if (error instanceof SyntaxError) (0, core_1.debug)(`Raw Body: ${rawBody}`); - if (error instanceof errors_1.UsageError) throw error; - if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code); - isRetryable = true; - errorMessage = error.message; - } - if (!isRetryable) throw new Error(`Received non-retryable error: ${errorMessage}`); - if (attempt + 1 === this.maxAttempts) throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`); - const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt); - (0, core_1.info)(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); - yield this.sleep(retryTimeMilliseconds); - attempt++; - } - throw new Error(`Request failed`); + }; + exports.ServerStreamingCall = ServerStreamingCall; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js +var require_client_streaming_call = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); }); } - isSuccessStatusCode(statusCode) { - if (!statusCode) return false; - return statusCode >= 200 && statusCode < 300; + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ClientStreamingCall = void 0; + /** + * A client streaming RPC call. This means that the clients sends 0, 1, or + * more messages to the server, and the server replies with exactly one + * message. + */ + var ClientStreamingCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.requests = request; + this.headers = headers; + this.response = response; + this.status = status; + this.trailers = trailers; } - isRetryableHttpStatusCode(statusCode) { - if (!statusCode) return false; - const retryableStatusCodes = [ - http_client_1.HttpCodes.BadGateway, - http_client_1.HttpCodes.GatewayTimeout, - http_client_1.HttpCodes.InternalServerError, - http_client_1.HttpCodes.ServiceUnavailable, - http_client_1.HttpCodes.TooManyRequests - ]; - return retryableStatusCodes.includes(statusCode); + /** + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * Note that it may still be valid to send more request messages. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } - sleep(milliseconds) { - return __awaiter$5(this, void 0, void 0, function* () { - return new Promise((resolve) => setTimeout(resolve, milliseconds)); + promiseFinished() { + return __awaiter(this, void 0, void 0, function* () { + let [headers, response, status, trailers] = yield Promise.all([ + this.headers, + this.response, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + headers, + response, + status, + trailers + }; }); } - getExponentialRetryTimeMilliseconds(attempt) { - if (attempt < 0) throw new Error("attempt should be a positive integer"); - if (attempt === 0) return this.baseRetryIntervalMilliseconds; - const minTime = this.baseRetryIntervalMilliseconds * Math.pow(this.retryMultiplier, attempt); - const maxTime = minTime * this.retryMultiplier; - return Math.trunc(Math.random() * (maxTime - minTime) + minTime); - } }; - function internalCacheTwirpClient(options) { - const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); - return new cache_twirp_client_1.CacheServiceClientJSON(client); - } - exports.internalCacheTwirpClient = internalCacheTwirpClient; -} }); + exports.ClientStreamingCall = ClientStreamingCall; +})); //#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/tar.js -var require_tar = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/tar.js"(exports) { - var __createBinding$8 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$8 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$8 = exports && exports.__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$8(result, mod, k); - } - __setModuleDefault$8(result, mod); - return result; - }; - var __awaiter$4 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js +var require_duplex_streaming_call = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -42559,205 +43892,54 @@ var require_tar = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_mod }); }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.createTar = exports.extractTar = exports.listTar = void 0; - const exec_1 = require_exec(); - const io = __importStar$8(require_io()); - const fs_1 = __require("fs"); - const path$6 = __importStar$8(__require("path")); - const utils$1 = __importStar$8(require_cacheUtils()); - const constants_1$1 = require_constants$3(); - const IS_WINDOWS$5 = process.platform === "win32"; - function getTarPath() { - return __awaiter$4(this, void 0, void 0, function* () { - switch (process.platform) { - case "win32": { - const gnuTar = yield utils$1.getGnuTarPathOnWindows(); - const systemTar = constants_1$1.SystemTarPathOnWindows; - if (gnuTar) return { - path: gnuTar, - type: constants_1$1.ArchiveToolType.GNU - }; - else if ((0, fs_1.existsSync)(systemTar)) return { - path: systemTar, - type: constants_1$1.ArchiveToolType.BSD - }; - break; - } - case "darwin": { - const gnuTar = yield io.which("gtar", false); - if (gnuTar) return { - path: gnuTar, - type: constants_1$1.ArchiveToolType.GNU - }; - else return { - path: yield io.which("tar", true), - type: constants_1$1.ArchiveToolType.BSD - }; - } - default: break; - } - return { - path: yield io.which("tar", true), - type: constants_1$1.ArchiveToolType.GNU - }; - }); - } - function getTarArgs(tarPath, compressionMethod, type, archivePath = "") { - return __awaiter$4(this, void 0, void 0, function* () { - const args = [`"${tarPath.path}"`]; - const cacheFileName = utils$1.getCacheFileName(compressionMethod); - const tarFile = "cache.tar"; - const workingDirectory = getWorkingDirectory(); - const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS$5; - switch (type) { - case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path$6.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path$6.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path$6.sep}`, "g"), "/"), "--files-from", constants_1$1.ManifestFilename); - break; - case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path$6.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path$6.sep}`, "g"), "/")); - break; - case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path$6.sep}`, "g"), "/"), "-P"); - break; - } - if (tarPath.type === constants_1$1.ArchiveToolType.GNU) switch (process.platform) { - case "win32": - args.push("--force-local"); - break; - case "darwin": - args.push("--delay-directory-restore"); - break; - } - return args; - }); - } - function getCommands(compressionMethod, type, archivePath = "") { - return __awaiter$4(this, void 0, void 0, function* () { - let args; - const tarPath = yield getTarPath(); - const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); - const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); - const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS$5; - if (BSD_TAR_ZSTD && type !== "create") args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; - else args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; - if (BSD_TAR_ZSTD) return args; - return [args.join(" ")]; - }); - } - function getWorkingDirectory() { - var _a$2; - return (_a$2 = process.env["GITHUB_WORKSPACE"]) !== null && _a$2 !== void 0 ? _a$2 : process.cwd(); - } - function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter$4(this, void 0, void 0, function* () { - const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS$5; - switch (compressionMethod) { - case constants_1$1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ - "zstd -d --long=30 --force -o", - constants_1$1.TarFilename, - archivePath.replace(new RegExp(`\\${path$6.sep}`, "g"), "/") - ] : ["--use-compress-program", IS_WINDOWS$5 ? "\"zstd -d --long=30\"" : "unzstd --long=30"]; - case constants_1$1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ - "zstd -d --force -o", - constants_1$1.TarFilename, - archivePath.replace(new RegExp(`\\${path$6.sep}`, "g"), "/") - ] : ["--use-compress-program", IS_WINDOWS$5 ? "\"zstd -d\"" : "unzstd"]; - default: return ["-z"]; - } - }); - } - function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter$4(this, void 0, void 0, function* () { - const cacheFileName = utils$1.getCacheFileName(compressionMethod); - const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS$5; - switch (compressionMethod) { - case constants_1$1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ - "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path$6.sep}`, "g"), "/"), - constants_1$1.TarFilename - ] : ["--use-compress-program", IS_WINDOWS$5 ? "\"zstd -T0 --long=30\"" : "zstdmt --long=30"]; - case constants_1$1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ - "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path$6.sep}`, "g"), "/"), - constants_1$1.TarFilename - ] : ["--use-compress-program", IS_WINDOWS$5 ? "\"zstd -T0\"" : "zstdmt"]; - default: return ["-z"]; - } - }); - } - function execCommands(commands, cwd) { - return __awaiter$4(this, void 0, void 0, function* () { - for (const command of commands) try { - yield (0, exec_1.exec)(command, void 0, { - cwd, - env: Object.assign(Object.assign({}, process.env), { MSYS: "winsymlinks:nativestrict" }) - }); - } catch (error) { - throw new Error(`${command.split(" ")[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); - } - }); - } - function listTar(archivePath, compressionMethod) { - return __awaiter$4(this, void 0, void 0, function* () { - const commands = yield getCommands(compressionMethod, "list", archivePath); - yield execCommands(commands); - }); - } - exports.listTar = listTar; - function extractTar(archivePath, compressionMethod) { - return __awaiter$4(this, void 0, void 0, function* () { - const workingDirectory = getWorkingDirectory(); - yield io.mkdirP(workingDirectory); - const commands = yield getCommands(compressionMethod, "extract", archivePath); - yield execCommands(commands); - }); - } - exports.extractTar = extractTar; - function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter$4(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path$6.join(archiveFolder, constants_1$1.ManifestFilename), sourceDirectories.join("\n")); - const commands = yield getCommands(compressionMethod, "create"); - yield execCommands(commands, archiveFolder); - }); - } - exports.createTar = createTar; -} }); - -//#endregion -//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/cache.js -var require_cache = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/cache.js"(exports) { - var __createBinding$7 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$7 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$7 = exports && exports.__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$7(result, mod, k); + exports.DuplexStreamingCall = void 0; + /** + * A duplex streaming RPC call. This means that the clients sends an + * arbitrary amount of messages to the server, while at the same time, + * the server sends an arbitrary amount of messages to the client. + */ + var DuplexStreamingCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.requests = request; + this.headers = headers; + this.responses = response; + this.status = status; + this.trailers = trailers; + } + /** + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * Note that it may still be valid to send more request messages. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + } + promiseFinished() { + return __awaiter(this, void 0, void 0, function* () { + let [headers, status, trailers] = yield Promise.all([ + this.headers, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + headers, + status, + trailers + }; + }); } - __setModuleDefault$7(result, mod); - return result; }; - var __awaiter$3 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + exports.DuplexStreamingCall = DuplexStreamingCall; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js +var require_test_transport = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -42785,1012 +43967,1253 @@ var require_cache = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_m }); }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0; - const core$3 = __importStar$7(require_core()); - const path$5 = __importStar$7(__require("path")); - const utils = __importStar$7(require_cacheUtils()); - const cacheHttpClient = __importStar$7(require_cacheHttpClient()); - const cacheTwirpClient = __importStar$7(require_cacheTwirpClient()); - const config_1 = require_config(); - const tar_1 = require_tar(); - const constants_1 = require_constants$3(); - var ValidationError = class ValidationError extends Error { - constructor(message) { - super(message); - this.name = "ValidationError"; - Object.setPrototypeOf(this, ValidationError.prototype); - } - }; - exports.ValidationError = ValidationError; - var ReserveCacheError = class ReserveCacheError extends Error { - constructor(message) { - super(message); - this.name = "ReserveCacheError"; - Object.setPrototypeOf(this, ReserveCacheError.prototype); - } - }; - exports.ReserveCacheError = ReserveCacheError; - function checkPaths(paths) { - if (!paths || paths.length === 0) throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); - } - function checkKey(key) { - if (key.length > 512) throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); - const regex = /^[^,]*$/; - if (!regex.test(key)) throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); - } - /** - * isFeatureAvailable to check the presence of Actions cache service - * - * @returns boolean return true if Actions cache service feature is available, otherwise false - */ - function isFeatureAvailable() { - return !!process.env["ACTIONS_CACHE_URL"]; - } - exports.isFeatureAvailable = isFeatureAvailable; - /** - * Restores cache from keys - * - * @param paths a list of file paths to restore from the cache - * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching. - * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey - * @param downloadOptions cache download options - * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform - * @returns string returns the key for the cache hit, otherwise returns undefined - */ - function restoreCache$1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter$3(this, void 0, void 0, function* () { - const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core$3.debug(`Cache service version: ${cacheServiceVersion}`); - checkPaths(paths); - switch (cacheServiceVersion) { - case "v2": return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); - case "v1": - default: return yield restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); - } - }); - } - exports.restoreCache = restoreCache$1; + exports.TestTransport = void 0; + const rpc_error_1 = require_rpc_error(); + const runtime_1 = require_commonjs$1(); + const rpc_output_stream_1 = require_rpc_output_stream(); + const rpc_options_1 = require_rpc_options(); + const unary_call_1 = require_unary_call(); + const server_streaming_call_1 = require_server_streaming_call(); + const client_streaming_call_1 = require_client_streaming_call(); + const duplex_streaming_call_1 = require_duplex_streaming_call(); /** - * Restores cache using the legacy Cache Service - * - * @param paths a list of file paths to restore from the cache - * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching. - * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey - * @param options cache download options - * @param enableCrossOsArchive an optional boolean enabled to restore on Windows any cache created on any platform - * @returns string returns the key for the cache hit, otherwise returns undefined + * Transport for testing. */ - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter$3(this, void 0, void 0, function* () { - restoreKeys = restoreKeys || []; - const keys = [primaryKey, ...restoreKeys]; - core$3.debug("Resolved Keys:"); - core$3.debug(JSON.stringify(keys)); - if (keys.length > 10) throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); - for (const key of keys) checkKey(key); - const compressionMethod = yield utils.getCompressionMethod(); - let archivePath = ""; - try { - const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { - compressionMethod, - enableCrossOsArchive - }); - if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) return void 0; - if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core$3.info("Lookup only - skipping download"); - return cacheEntry.cacheKey; + var TestTransport = class TestTransport { + /** + * Initialize with mock data. Omitted fields have default value. + */ + constructor(data) { + /** + * Suppress warning / error about uncaught rejections of + * "status" and "trailers". + */ + this.suppressUncaughtRejections = true; + this.headerDelay = 10; + this.responseDelay = 50; + this.betweenResponseDelay = 10; + this.afterResponseDelay = 10; + this.data = data !== null && data !== void 0 ? data : {}; + } + /** + * Sent message(s) during the last operation. + */ + get sentMessages() { + if (this.lastInput instanceof TestInputStream) return this.lastInput.sent; + else if (typeof this.lastInput == "object") return [this.lastInput.single]; + return []; + } + /** + * Sending message(s) completed? + */ + get sendComplete() { + if (this.lastInput instanceof TestInputStream) return this.lastInput.completed; + else if (typeof this.lastInput == "object") return true; + return false; + } + promiseHeaders() { + var _a; + const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : TestTransport.defaultHeaders; + return headers instanceof rpc_error_1.RpcError ? Promise.reject(headers) : Promise.resolve(headers); + } + promiseSingleResponse(method) { + if (this.data.response instanceof rpc_error_1.RpcError) return Promise.reject(this.data.response); + let r; + if (Array.isArray(this.data.response)) { + runtime_1.assert(this.data.response.length > 0); + r = this.data.response[0]; + } else if (this.data.response !== void 0) r = this.data.response; + else r = method.O.create(); + runtime_1.assert(method.O.is(r)); + return Promise.resolve(r); + } + /** + * Pushes response messages from the mock data to the output stream. + * If an error response, status or trailers are mocked, the stream is + * closed with the respective error. + * Otherwise, stream is completed successfully. + * + * The returned promise resolves when the stream is closed. It should + * not reject. If it does, code is broken. + */ + streamResponses(method, stream, abort) { + return __awaiter(this, void 0, void 0, function* () { + const messages = []; + if (this.data.response === void 0) messages.push(method.O.create()); + else if (Array.isArray(this.data.response)) for (let msg of this.data.response) { + runtime_1.assert(method.O.is(msg)); + messages.push(msg); + } + else if (!(this.data.response instanceof rpc_error_1.RpcError)) { + runtime_1.assert(method.O.is(this.data.response)); + messages.push(this.data.response); } - archivePath = path$5.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core$3.debug(`Archive Path: ${archivePath}`); - yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core$3.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); - const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core$3.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core$3.info("Cache restored successfully"); - return cacheEntry.cacheKey; - } catch (error) { - const typedError = error; - if (typedError.name === ValidationError.name) throw error; - else core$3.warning(`Failed to restore: ${error.message}`); - } finally { try { - yield utils.unlinkFile(archivePath); + yield delay(this.responseDelay, abort)(void 0); } catch (error) { - core$3.debug(`Failed to delete archive: ${error}`); + stream.notifyError(error); + return; + } + if (this.data.response instanceof rpc_error_1.RpcError) { + stream.notifyError(this.data.response); + return; + } + for (let msg of messages) { + stream.notifyMessage(msg); + try { + yield delay(this.betweenResponseDelay, abort)(void 0); + } catch (error) { + stream.notifyError(error); + return; + } + } + if (this.data.status instanceof rpc_error_1.RpcError) { + stream.notifyError(this.data.status); + return; } + if (this.data.trailers instanceof rpc_error_1.RpcError) { + stream.notifyError(this.data.trailers); + return; + } + stream.notifyComplete(); + }); + } + promiseStatus() { + var _a; + const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : TestTransport.defaultStatus; + return status instanceof rpc_error_1.RpcError ? Promise.reject(status) : Promise.resolve(status); + } + promiseTrailers() { + var _a; + const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : TestTransport.defaultTrailers; + return trailers instanceof rpc_error_1.RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); + } + maybeSuppressUncaught(...promise) { + if (this.suppressUncaughtRejections) for (let p of promise) p.catch(() => {}); + } + mergeOptions(options) { + return rpc_options_1.mergeRpcOptions({}, options); + } + unary(method, input, options) { + var _a; + const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_) => {}).then(delay(this.responseDelay, options.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = { single: input }; + return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); + } + serverStreaming(method, input, options) { + var _a; + const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => {}).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = { single: input }; + return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise); + } + clientStreaming(method, options) { + var _a; + const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_) => {}).then(delay(this.responseDelay, options.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = new TestInputStream(this.data, options.abort); + return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise); + } + duplex(method, options) { + var _a; + const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => {}).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = new TestInputStream(this.data, options.abort); + return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise); + } + }; + exports.TestTransport = TestTransport; + TestTransport.defaultHeaders = { responseHeader: "test" }; + TestTransport.defaultStatus = { + code: "OK", + detail: "all good" + }; + TestTransport.defaultTrailers = { responseTrailer: "test" }; + function delay(ms, abort) { + return (v) => new Promise((resolve, reject) => { + if (abort === null || abort === void 0 ? void 0 : abort.aborted) reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); + else { + const id = setTimeout(() => resolve(v), ms); + if (abort) abort.addEventListener("abort", (ev) => { + clearTimeout(id); + reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); + }); } - return void 0; }); } + var TestInputStream = class { + constructor(data, abort) { + this._completed = false; + this._sent = []; + this.data = data; + this.abort = abort; + } + get sent() { + return this._sent; + } + get completed() { + return this._completed; + } + send(message) { + if (this.data.inputMessage instanceof rpc_error_1.RpcError) return Promise.reject(this.data.inputMessage); + const delayMs = this.data.inputMessage === void 0 ? 10 : this.data.inputMessage; + return Promise.resolve(void 0).then(() => { + this._sent.push(message); + }).then(delay(delayMs, this.abort)); + } + complete() { + if (this.data.inputComplete instanceof rpc_error_1.RpcError) return Promise.reject(this.data.inputComplete); + const delayMs = this.data.inputComplete === void 0 ? 10 : this.data.inputComplete; + return Promise.resolve(void 0).then(() => { + this._completed = true; + }).then(delay(delayMs, this.abort)); + } + }; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js +var require_rpc_interceptor = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0; + const runtime_1 = require_commonjs$1(); /** - * Restores cache using Cache Service v2 - * - * @param paths a list of file paths to restore from the cache - * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching - * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey - * @param downloadOptions cache download options - * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform - * @returns string returns the key for the cache hit, otherwise returns undefined + * Creates a "stack" of of all interceptors specified in the given `RpcOptions`. + * Used by generated client implementations. + * @internal */ - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter$3(this, void 0, void 0, function* () { - options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); - restoreKeys = restoreKeys || []; - const keys = [primaryKey, ...restoreKeys]; - core$3.debug("Resolved Keys:"); - core$3.debug(JSON.stringify(keys)); - if (keys.length > 10) throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); - for (const key of keys) checkKey(key); - let archivePath = ""; - try { - const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); - const compressionMethod = yield utils.getCompressionMethod(); - const request = { - key: primaryKey, - restoreKeys, - version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive) - }; - const response = yield twirpClient.GetCacheEntryDownloadURL(request); - if (!response.ok) { - core$3.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); - return void 0; - } - core$3.info(`Cache hit for: ${request.key}`); - if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core$3.info("Lookup only - skipping download"); - return response.matchedKey; - } - archivePath = path$5.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core$3.debug(`Archive path: ${archivePath}`); - core$3.debug(`Starting download of archive to: ${archivePath}`); - yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); - const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core$3.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core$3.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); - yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core$3.info("Cache restored successfully"); - return response.matchedKey; - } catch (error) { - const typedError = error; - if (typedError.name === ValidationError.name) throw error; - else core$3.warning(`Failed to restore: ${error.message}`); - } finally { - try { - if (archivePath) yield utils.unlinkFile(archivePath); - } catch (error) { - core$3.debug(`Failed to delete archive: ${error}`); - } + function stackIntercept(kind, transport, method, options, input) { + var _a, _b, _c, _d; + if (kind == "unary") { + let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt); + for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter((i) => i.interceptUnary).reverse()) { + const next = tail; + tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt); + } + return tail(method, input, options); + } + if (kind == "serverStreaming") { + let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt); + for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter((i) => i.interceptServerStreaming).reverse()) { + const next = tail; + tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt); + } + return tail(method, input, options); + } + if (kind == "clientStreaming") { + let tail = (mtd, opt) => transport.clientStreaming(mtd, opt); + for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter((i) => i.interceptClientStreaming).reverse()) { + const next = tail; + tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt); } - return void 0; - }); + return tail(method, options); + } + if (kind == "duplex") { + let tail = (mtd, opt) => transport.duplex(mtd, opt); + for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter((i) => i.interceptDuplex).reverse()) { + const next = tail; + tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt); + } + return tail(method, options); + } + runtime_1.assertNever(kind); } + exports.stackIntercept = stackIntercept; /** - * Saves a list of files with the specified key - * - * @param paths a list of file paths to be cached - * @param key an explicit key for restoring the cache - * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform - * @param options cache upload options - * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails + * @deprecated replaced by `stackIntercept()`, still here to support older generated code */ - function saveCache$1(paths, key, options, enableCrossOsArchive = false) { - return __awaiter$3(this, void 0, void 0, function* () { - const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core$3.debug(`Cache service version: ${cacheServiceVersion}`); - checkPaths(paths); - checkKey(key); - switch (cacheServiceVersion) { - case "v2": return yield saveCacheV2(paths, key, options, enableCrossOsArchive); - case "v1": - default: return yield saveCacheV1(paths, key, options, enableCrossOsArchive); - } - }); + function stackUnaryInterceptors(transport, method, input, options) { + return stackIntercept("unary", transport, method, options, input); } - exports.saveCache = saveCache$1; + exports.stackUnaryInterceptors = stackUnaryInterceptors; /** - * Save cache using the legacy Cache Service - * - * @param paths - * @param key - * @param options - * @param enableCrossOsArchive - * @returns + * @deprecated replaced by `stackIntercept()`, still here to support older generated code */ - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a$2, _b$1, _c$1, _d$1, _e; - return __awaiter$3(this, void 0, void 0, function* () { - const compressionMethod = yield utils.getCompressionMethod(); - let cacheId = -1; - const cachePaths = yield utils.resolvePaths(paths); - core$3.debug("Cache Paths:"); - core$3.debug(`${JSON.stringify(cachePaths)}`); - if (cachePaths.length === 0) throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); - const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path$5.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core$3.debug(`Archive Path: ${archivePath}`); - try { - yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core$3.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); - const fileSizeLimit = 10 * 1024 * 1024 * 1024; - const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core$3.debug(`File Size: ${archiveFileSize}`); - if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); - core$3.debug("Reserving Cache"); - const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { - compressionMethod, - enableCrossOsArchive, - cacheSize: archiveFileSize - }); - if ((_a$2 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a$2 === void 0 ? void 0 : _a$2.cacheId) cacheId = (_b$1 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b$1 === void 0 ? void 0 : _b$1.cacheId; - else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) throw new Error((_d$1 = (_c$1 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c$1 === void 0 ? void 0 : _c$1.message) !== null && _d$1 !== void 0 ? _d$1 : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); - else throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); - core$3.debug(`Saving Cache (ID: ${cacheId})`); - yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); - } catch (error) { - const typedError = error; - if (typedError.name === ValidationError.name) throw error; - else if (typedError.name === ReserveCacheError.name) core$3.info(`Failed to save: ${typedError.message}`); - else core$3.warning(`Failed to save: ${typedError.message}`); - } finally { - try { - yield utils.unlinkFile(archivePath); - } catch (error) { - core$3.debug(`Failed to delete archive: ${error}`); - } - } - return cacheId; - }); + function stackServerStreamingInterceptors(transport, method, input, options) { + return stackIntercept("serverStreaming", transport, method, options, input); } + exports.stackServerStreamingInterceptors = stackServerStreamingInterceptors; /** - * Save cache using Cache Service v2 - * - * @param paths a list of file paths to restore from the cache - * @param key an explicit key for restoring the cache - * @param options cache upload options - * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform - * @returns + * @deprecated replaced by `stackIntercept()`, still here to support older generated code */ - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter$3(this, void 0, void 0, function* () { - options = Object.assign(Object.assign({}, options), { - uploadChunkSize: 64 * 1024 * 1024, - uploadConcurrency: 8, - useAzureSdk: true - }); - const compressionMethod = yield utils.getCompressionMethod(); - const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); - let cacheId = -1; - const cachePaths = yield utils.resolvePaths(paths); - core$3.debug("Cache Paths:"); - core$3.debug(`${JSON.stringify(cachePaths)}`); - if (cachePaths.length === 0) throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); - const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path$5.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core$3.debug(`Archive Path: ${archivePath}`); - try { - yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core$3.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); - const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core$3.debug(`File Size: ${archiveFileSize}`); - if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); - options.archiveSizeBytes = archiveFileSize; - core$3.debug("Reserving Cache"); - const version$1 = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); - const request = { - key, - version: version$1 - }; - let signedUploadUrl; - try { - const response = yield twirpClient.CreateCacheEntry(request); - if (!response.ok) throw new Error("Response was not ok"); - signedUploadUrl = response.signedUploadUrl; - } catch (error) { - core$3.debug(`Failed to reserve cache: ${error}`); - throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); - } - core$3.debug(`Attempting to upload cache located at: ${archivePath}`); - yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); - const finalizeRequest = { - key, - version: version$1, - sizeBytes: `${archiveFileSize}` - }; - const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core$3.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); - if (!finalizeResponse.ok) throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); - cacheId = parseInt(finalizeResponse.entryId); - } catch (error) { - const typedError = error; - if (typedError.name === ValidationError.name) throw error; - else if (typedError.name === ReserveCacheError.name) core$3.info(`Failed to save: ${typedError.message}`); - else core$3.warning(`Failed to save: ${typedError.message}`); - } finally { - try { - yield utils.unlinkFile(archivePath); - } catch (error) { - core$3.debug(`Failed to delete archive: ${error}`); - } - } - return cacheId; - }); + function stackClientStreamingInterceptors(transport, method, options) { + return stackIntercept("clientStreaming", transport, method, options); + } + exports.stackClientStreamingInterceptors = stackClientStreamingInterceptors; + /** + * @deprecated replaced by `stackIntercept()`, still here to support older generated code + */ + function stackDuplexStreamingInterceptors(transport, method, options) { + return stackIntercept("duplex", transport, method, options); } -} }); -var import_cache = __toESM(require_cache(), 1); + exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports) { - var __createBinding$6 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js +var require_server_call_context = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ServerCallContextController = void 0; + var ServerCallContextController = class { + constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { + code: "OK", + detail: "" + }) { + this._cancelled = false; + this._listeners = []; + this.method = method; + this.headers = headers; + this.deadline = deadline; + this.trailers = {}; + this._sendRH = sendResponseHeadersFn; + this.status = defaultStatus; + } + /** + * Set the call cancelled. + * + * Invokes all callbacks registered with onCancel() and + * sets `cancelled = true`. + */ + notifyCancelled() { + if (!this._cancelled) { + this._cancelled = true; + for (let l of this._listeners) l(); } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$6 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$6 = exports && exports.__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$6(result, mod, k); } - __setModuleDefault$6(result, mod); - return result; + /** + * Send response headers. + */ + sendResponseHeaders(data) { + this._sendRH(data); + } + /** + * Is the call cancelled? + * + * When the client closes the connection before the server + * is done, the call is cancelled. + * + * If you want to cancel a request on the server, throw a + * RpcError with the CANCELLED status code. + */ + get cancelled() { + return this._cancelled; + } + /** + * Add a callback for cancellation. + */ + onCancel(callback) { + const l = this._listeners; + l.push(callback); + return () => { + let i = l.indexOf(callback); + if (i >= 0) l.splice(i, 1); + }; + } }; + exports.ServerCallContextController = ServerCallContextController; +})); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js +var require_commonjs = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.getOptions = void 0; - const core$2 = __importStar$6(require_core()); - /** - * Returns a copy with defaults filled in. - */ - function getOptions(copy$1) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - matchDirectories: true, - omitBrokenSymbolicLinks: true, - excludeHiddenFiles: false - }; - if (copy$1) { - if (typeof copy$1.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy$1.followSymbolicLinks; - core$2.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); - } - if (typeof copy$1.implicitDescendants === "boolean") { - result.implicitDescendants = copy$1.implicitDescendants; - core$2.debug(`implicitDescendants '${result.implicitDescendants}'`); - } - if (typeof copy$1.matchDirectories === "boolean") { - result.matchDirectories = copy$1.matchDirectories; - core$2.debug(`matchDirectories '${result.matchDirectories}'`); - } - if (typeof copy$1.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy$1.omitBrokenSymbolicLinks; - core$2.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); - } - if (typeof copy$1.excludeHiddenFiles === "boolean") { - result.excludeHiddenFiles = copy$1.excludeHiddenFiles; - core$2.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); - } + var service_type_1 = require_service_type(); + Object.defineProperty(exports, "ServiceType", { + enumerable: true, + get: function() { + return service_type_1.ServiceType; } - return result; - } - exports.getOptions = getOptions; -} }); + }); + var reflection_info_1 = require_reflection_info(); + Object.defineProperty(exports, "readMethodOptions", { + enumerable: true, + get: function() { + return reflection_info_1.readMethodOptions; + } + }); + Object.defineProperty(exports, "readMethodOption", { + enumerable: true, + get: function() { + return reflection_info_1.readMethodOption; + } + }); + Object.defineProperty(exports, "readServiceOption", { + enumerable: true, + get: function() { + return reflection_info_1.readServiceOption; + } + }); + var rpc_error_1 = require_rpc_error(); + Object.defineProperty(exports, "RpcError", { + enumerable: true, + get: function() { + return rpc_error_1.RpcError; + } + }); + var rpc_options_1 = require_rpc_options(); + Object.defineProperty(exports, "mergeRpcOptions", { + enumerable: true, + get: function() { + return rpc_options_1.mergeRpcOptions; + } + }); + var rpc_output_stream_1 = require_rpc_output_stream(); + Object.defineProperty(exports, "RpcOutputStreamController", { + enumerable: true, + get: function() { + return rpc_output_stream_1.RpcOutputStreamController; + } + }); + var test_transport_1 = require_test_transport(); + Object.defineProperty(exports, "TestTransport", { + enumerable: true, + get: function() { + return test_transport_1.TestTransport; + } + }); + var deferred_1 = require_deferred(); + Object.defineProperty(exports, "Deferred", { + enumerable: true, + get: function() { + return deferred_1.Deferred; + } + }); + Object.defineProperty(exports, "DeferredState", { + enumerable: true, + get: function() { + return deferred_1.DeferredState; + } + }); + var duplex_streaming_call_1 = require_duplex_streaming_call(); + Object.defineProperty(exports, "DuplexStreamingCall", { + enumerable: true, + get: function() { + return duplex_streaming_call_1.DuplexStreamingCall; + } + }); + var client_streaming_call_1 = require_client_streaming_call(); + Object.defineProperty(exports, "ClientStreamingCall", { + enumerable: true, + get: function() { + return client_streaming_call_1.ClientStreamingCall; + } + }); + var server_streaming_call_1 = require_server_streaming_call(); + Object.defineProperty(exports, "ServerStreamingCall", { + enumerable: true, + get: function() { + return server_streaming_call_1.ServerStreamingCall; + } + }); + var unary_call_1 = require_unary_call(); + Object.defineProperty(exports, "UnaryCall", { + enumerable: true, + get: function() { + return unary_call_1.UnaryCall; + } + }); + var rpc_interceptor_1 = require_rpc_interceptor(); + Object.defineProperty(exports, "stackIntercept", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackIntercept; + } + }); + Object.defineProperty(exports, "stackDuplexStreamingInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackDuplexStreamingInterceptors; + } + }); + Object.defineProperty(exports, "stackClientStreamingInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackClientStreamingInterceptors; + } + }); + Object.defineProperty(exports, "stackServerStreamingInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackServerStreamingInterceptors; + } + }); + Object.defineProperty(exports, "stackUnaryInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackUnaryInterceptors; + } + }); + var server_call_context_1 = require_server_call_context(); + Object.defineProperty(exports, "ServerCallContextController", { + enumerable: true, + get: function() { + return server_call_context_1.ServerCallContextController; + } + }); +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-path-helper.js"(exports) { - var __createBinding$5 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js +var require_cachescope = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CacheScope = void 0; + const runtime_1 = require_commonjs$1(); + const runtime_2 = require_commonjs$1(); + const runtime_3 = require_commonjs$1(); + const runtime_4 = require_commonjs$1(); + const runtime_5 = require_commonjs$1(); + var CacheScope$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.entities.v1.CacheScope", [{ + no: 1, + name: "scope", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "permission", + kind: "scalar", + T: 3 + }]); + } + create(value) { + const message = { + scope: "", + permission: "0" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.scope = reader.string(); + break; + case 2: + message.permission = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$5 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$5 = exports && exports.__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$5(result, mod, k); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.scope !== "") writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.scope); + if (message.permission !== "0") writer.tag(2, runtime_1.WireType.Varint).int64(message.permission); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - __setModuleDefault$5(result, mod); - return result; - }; - var __importDefault$2 = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; - const path$4 = __importStar$5(__require("path")); - const assert_1$2 = __importDefault$2(__require("assert")); - const IS_WINDOWS$4 = process.platform === "win32"; - /** - * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. - * - * For example, on Linux/macOS: - * - `/ => /` - * - `/hello => /` - * - * For example, on Windows: - * - `C:\ => C:\` - * - `C:\hello => C:\` - * - `C: => C:` - * - `C:hello => C:` - * - `\ => \` - * - `\hello => \` - * - `\\hello => \\hello` - * - `\\hello\world => \\hello\world` - */ - function dirname(p) { - p = safeTrimTrailingSeparator(p); - if (IS_WINDOWS$4 && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) return p; - let result = path$4.dirname(p); - if (IS_WINDOWS$4 && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) result = safeTrimTrailingSeparator(result); - return result; - } - exports.dirname = dirname; /** - * Roots the path if not already rooted. On Windows, relative roots like `\` - * or `C:` are expanded based on the current working directory. + * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheScope */ - function ensureAbsoluteRoot(root, itemPath) { - (0, assert_1$2.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - (0, assert_1$2.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot(itemPath)) return itemPath; - if (IS_WINDOWS$4) { - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - (0, assert_1$2.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) if (itemPath.length === 2) return `${itemPath[0]}:\\${cwd.substr(3)}`; - else { - if (!cwd.endsWith("\\")) cwd += "\\"; - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; + exports.CacheScope = new CacheScope$Type(); +})); + +//#endregion +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js +var require_cachemetadata = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CacheMetadata = void 0; + const runtime_1 = require_commonjs$1(); + const runtime_2 = require_commonjs$1(); + const runtime_3 = require_commonjs$1(); + const runtime_4 = require_commonjs$1(); + const runtime_5 = require_commonjs$1(); + const cachescope_1 = require_cachescope(); + var CacheMetadata$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.entities.v1.CacheMetadata", [{ + no: 1, + name: "repository_id", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "scope", + kind: "message", + repeat: 1, + T: () => cachescope_1.CacheScope + }]); + } + create(value) { + const message = { + repositoryId: "0", + scope: [] + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.repositoryId = reader.int64().toString(); + break; + case 2: + message.scope.push(cachescope_1.CacheScope.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - else return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - (0, assert_1$2.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; } + return message; } - (0, assert_1$2.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS$4 && root.endsWith("\\")) {} else root += path$4.sep; - return root + itemPath; - } - exports.ensureAbsoluteRoot = ensureAbsoluteRoot; - /** - * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: - * `\\hello\share` and `C:\hello` (and using alternate separator). - */ - function hasAbsoluteRoot(itemPath) { - (0, assert_1$2.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS$4) return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); - return itemPath.startsWith("/"); - } - exports.hasAbsoluteRoot = hasAbsoluteRoot; - /** - * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: - * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). - */ - function hasRoot(itemPath) { - (0, assert_1$2.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS$4) return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); - return itemPath.startsWith("/"); - } - exports.hasRoot = hasRoot; - /** - * Removes redundant slashes and converts `/` to `\` on Windows - */ - function normalizeSeparators(p) { - p = p || ""; - if (IS_WINDOWS$4) { - p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); + internalBinaryWrite(message, writer, options) { + if (message.repositoryId !== "0") writer.tag(1, runtime_1.WireType.Varint).int64(message.repositoryId); + for (let i = 0; i < message.scope.length; i++) cachescope_1.CacheScope.internalBinaryWrite(message.scope[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - return p.replace(/\/\/+/g, "/"); - } - exports.normalizeSeparators = normalizeSeparators; + }; /** - * Normalizes the path separators and trims the trailing separator (when safe). - * For example, `/foo/ => /foo` but `/ => /` + * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheMetadata */ - function safeTrimTrailingSeparator(p) { - if (!p) return ""; - p = normalizeSeparators(p); - if (!p.endsWith(path$4.sep)) return p; - if (p === path$4.sep) return p; - if (IS_WINDOWS$4 && /^[A-Z]:\\$/i.test(p)) return p; - return p.substr(0, p.length - 1); - } - exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; -} }); + exports.CacheMetadata = new CacheMetadata$Type(); +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-match-kind.js"(exports) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js +var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.MatchKind = void 0; + exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0; + const runtime_rpc_1 = require_commonjs(); + const runtime_1 = require_commonjs$1(); + const runtime_2 = require_commonjs$1(); + const runtime_3 = require_commonjs$1(); + const runtime_4 = require_commonjs$1(); + const runtime_5 = require_commonjs$1(); + const cachemetadata_1 = require_cachemetadata(); + var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.CreateCacheEntryRequest", [ + { + no: 1, + name: "metadata", + kind: "message", + T: () => cachemetadata_1.CacheMetadata + }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "version", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + key: "", + version: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + if (message.version !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; /** - * Indicates whether a pattern matches a path + * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryRequest */ - var MatchKind; - (function(MatchKind$2) { - /** Not matched */ - MatchKind$2[MatchKind$2["None"] = 0] = "None"; - /** Matched if the path is a directory */ - MatchKind$2[MatchKind$2["Directory"] = 1] = "Directory"; - /** Matched if the path is a regular file */ - MatchKind$2[MatchKind$2["File"] = 2] = "File"; - /** Matched */ - MatchKind$2[MatchKind$2["All"] = 3] = "All"; - })(MatchKind || (exports.MatchKind = MatchKind = {})); -} }); - -//#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports) { - var __createBinding$4 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; + exports.CreateCacheEntryRequest = new CreateCacheEntryRequest$Type(); + var CreateCacheEntryResponse$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.CreateCacheEntryResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + }, + { + no: 2, + name: "signed_upload_url", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "message", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + ok: false, + signedUploadUrl: "", + message: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.ok = reader.bool(); + break; + case 2: + message.signedUploadUrl = reader.string(); + break; + case 3: + message.message = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$4 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$4 = exports && exports.__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$4(result, mod, k); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.signedUploadUrl !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl); + if (message.message !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - __setModuleDefault$4(result, mod); - return result; }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.partialMatch = exports.match = exports.getSearchPaths = void 0; - const pathHelper$2 = __importStar$4(require_internal_path_helper()); - const internal_match_kind_1$2 = require_internal_match_kind(); - const IS_WINDOWS$3 = process.platform === "win32"; /** - * Given an array of patterns, returns an array of paths to search. - * Duplicates and paths under other included paths are filtered out. + * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryResponse */ - function getSearchPaths(patterns) { - patterns = patterns.filter((x) => !x.negate); - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS$3 ? pattern.searchPath.toUpperCase() : pattern.searchPath; - searchPathMap[key] = "candidate"; + exports.CreateCacheEntryResponse = new CreateCacheEntryResponse$Type(); + var FinalizeCacheEntryUploadRequest$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.FinalizeCacheEntryUploadRequest", [ + { + no: 1, + name: "metadata", + kind: "message", + T: () => cachemetadata_1.CacheMetadata + }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "size_bytes", + kind: "scalar", + T: 3 + }, + { + no: 4, + name: "version", + kind: "scalar", + T: 9 + } + ]); } - const result = []; - for (const pattern of patterns) { - const key = IS_WINDOWS$3 ? pattern.searchPath.toUpperCase() : pattern.searchPath; - if (searchPathMap[key] === "included") continue; - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper$2.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; + create(value) { + const message = { + key: "", + sizeBytes: "0", + version: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.sizeBytes = reader.int64().toString(); + break; + case 4: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - tempKey = parent; - parent = pathHelper$2.dirname(tempKey); - } - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = "included"; } + return message; } - return result; - } - exports.getSearchPaths = getSearchPaths; + internalBinaryWrite(message, writer, options) { + if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + if (message.sizeBytes !== "0") writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes); + if (message.version !== "") writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; /** - * Matches the patterns against the path + * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadRequest */ - function match(patterns, itemPath) { - let result = internal_match_kind_1$2.MatchKind.None; - for (const pattern of patterns) if (pattern.negate) result &= ~pattern.match(itemPath); - else result |= pattern.match(itemPath); - return result; - } - exports.match = match; + exports.FinalizeCacheEntryUploadRequest = new FinalizeCacheEntryUploadRequest$Type(); + var FinalizeCacheEntryUploadResponse$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + }, + { + no: 2, + name: "entry_id", + kind: "scalar", + T: 3 + }, + { + no: 3, + name: "message", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + ok: false, + entryId: "0", + message: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.ok = reader.bool(); + break; + case 2: + message.entryId = reader.int64().toString(); + break; + case 3: + message.message = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.entryId !== "0") writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); + if (message.message !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; /** - * Checks whether to descend further into the directory + * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadResponse */ - function partialMatch(patterns, itemPath) { - return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); - } - exports.partialMatch = partialMatch; -} }); - -//#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-path.js -var require_internal_path = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-path.js"(exports) { - var __createBinding$3 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; + exports.FinalizeCacheEntryUploadResponse = new FinalizeCacheEntryUploadResponse$Type(); + var GetCacheEntryDownloadURLRequest$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.GetCacheEntryDownloadURLRequest", [ + { + no: 1, + name: "metadata", + kind: "message", + T: () => cachemetadata_1.CacheMetadata + }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "restore_keys", + kind: "scalar", + repeat: 2, + T: 9 + }, + { + no: 4, + name: "version", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + key: "", + restoreKeys: [], + version: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.restoreKeys.push(reader.string()); + break; + case 4: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$3 = exports && exports.__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$3(result, mod, k); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + for (let i = 0; i < message.restoreKeys.length; i++) writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); + if (message.version !== "") writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - __setModuleDefault$3(result, mod); - return result; - }; - var __importDefault$1 = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Path = void 0; - const path$3 = __importStar$3(__require("path")); - const pathHelper$1 = __importStar$3(require_internal_path_helper()); - const assert_1$1 = __importDefault$1(__require("assert")); - const IS_WINDOWS$2 = process.platform === "win32"; /** - * Helper class for parsing paths into segments + * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLRequest */ - var Path = class { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - if (typeof itemPath === "string") { - (0, assert_1$1.default)(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper$1.safeTrimTrailingSeparator(itemPath); - if (!pathHelper$1.hasRoot(itemPath)) this.segments = itemPath.split(path$3.sep); - else { - let remaining = itemPath; - let dir = pathHelper$1.dirname(remaining); - while (dir !== remaining) { - const basename = path$3.basename(remaining); - this.segments.unshift(basename); - remaining = dir; - dir = pathHelper$1.dirname(remaining); - } - this.segments.unshift(remaining); + exports.GetCacheEntryDownloadURLRequest = new GetCacheEntryDownloadURLRequest$Type(); + var GetCacheEntryDownloadURLResponse$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.GetCacheEntryDownloadURLResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + }, + { + no: 2, + name: "signed_download_url", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "matched_key", + kind: "scalar", + T: 9 } - } else { - (0, assert_1$1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - (0, assert_1$1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper$1.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper$1.hasRoot(segment)) { - segment = pathHelper$1.safeTrimTrailingSeparator(segment); - (0, assert_1$1.default)(segment === pathHelper$1.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } else { - (0, assert_1$1.default)(!segment.includes(path$3.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } + ]); + } + create(value) { + const message = { + ok: false, + signedDownloadUrl: "", + matchedKey: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.ok = reader.bool(); + break; + case 2: + message.signedDownloadUrl = reader.string(); + break; + case 3: + message.matchedKey = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } + return message; } - /** - * Converts the path to it's string representation - */ - toString() { - let result = this.segments[0]; - let skipSlash = result.endsWith(path$3.sep) || IS_WINDOWS$2 && /^[A-Z]:$/i.test(result); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) skipSlash = false; - else result += path$3.sep; - result += this.segments[i]; - } - return result; + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.signedDownloadUrl !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedDownloadUrl); + if (message.matchedKey !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.matchedKey); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports.Path = Path; -} }); + /** + * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse + */ + exports.GetCacheEntryDownloadURLResponse = new GetCacheEntryDownloadURLResponse$Type(); + /** + * @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService + */ + exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [ + { + name: "CreateCacheEntry", + options: {}, + I: exports.CreateCacheEntryRequest, + O: exports.CreateCacheEntryResponse + }, + { + name: "FinalizeCacheEntryUpload", + options: {}, + I: exports.FinalizeCacheEntryUploadRequest, + O: exports.FinalizeCacheEntryUploadResponse + }, + { + name: "GetCacheEntryDownloadURL", + options: {}, + I: exports.GetCacheEntryDownloadURLRequest, + O: exports.GetCacheEntryDownloadURLResponse + } + ]); +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-pattern.js"(exports) { - var __createBinding$2 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$2 = exports && exports.__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$2(result, mod, k); - } - __setModuleDefault$2(result, mod); - return result; - }; - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js +var require_cache_twirp_client = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.Pattern = void 0; - const os = __importStar$2(__require("os")); - const path$2 = __importStar$2(__require("path")); - const pathHelper = __importStar$2(require_internal_path_helper()); - const assert_1 = __importDefault(__require("assert")); - const minimatch_1 = require_minimatch(); - const internal_match_kind_1$1 = require_internal_match_kind(); - const internal_path_1 = require_internal_path(); - const IS_WINDOWS$1 = process.platform === "win32"; - var Pattern = class Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { - /** - * Indicates whether matches should be excluded from the result set - */ - this.negate = false; - let pattern; - if (typeof patternOrNegate === "string") pattern = patternOrNegate.trim(); - else { - segments = segments || []; - (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); - const root = Pattern.getLiteral(segments[0]); - (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) pattern = `!${pattern}`; - } - while (pattern.startsWith("!")) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - pattern = Pattern.fixupPattern(pattern, homedir); - this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path$2.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - let foundGlob = false; - const searchSegments = this.segments.map((x) => Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS$1 ? "i" : ""); - this.isImplicitPattern = isImplicitPattern; - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS$1, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS$1 ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); + exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; + const cache_1 = require_cache$1(); + var CacheServiceClientJSON = class { + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path$2.sep) && this.isImplicitPattern === false) itemPath = `${itemPath}${path$2.sep}`; - } else itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (this.minimatch.match(itemPath)) return this.trailingSeparator ? internal_match_kind_1$1.MatchKind.Directory : internal_match_kind_1$1.MatchKind.All; - return internal_match_kind_1$1.MatchKind.None; + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + return this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data).then((data) => cache_1.CreateCacheEntryResponse.fromJson(data, { ignoreUnknownFields: true })); } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (pathHelper.dirname(itemPath) === itemPath) return this.rootRegExp.test(itemPath); - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS$1 ? /\\+/ : /\/+/), this.minimatch.set[0], true); + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + return this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data).then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data, { ignoreUnknownFields: true })); } - /** - * Escapes glob patterns within a path - */ - static globEscape(s$1) { - return (IS_WINDOWS$1 ? s$1 : s$1.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + return this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data).then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data, { ignoreUnknownFields: true })); } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir) { - (0, assert_1.default)(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => Pattern.getLiteral(x)); - (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path$2.sep}`)) pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1); - else if (pattern === "~" || pattern.startsWith(`~${path$2.sep}`)) { - homedir = homedir || os.homedir(); - (0, assert_1.default)(homedir, "Unable to determine HOME directory"); - (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); - pattern = Pattern.globEscape(homedir) + pattern.substr(1); - } else if (IS_WINDOWS$1 && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith("\\")) root += "\\"; - pattern = Pattern.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS$1 && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); - if (!root.endsWith("\\")) root += "\\"; - pattern = Pattern.globEscape(root) + pattern.substr(1); - } else pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern); - return pathHelper.normalizeSeparators(pattern); + }; + exports.CacheServiceClientJSON = CacheServiceClientJSON; + var CacheServiceClientProtobuf = class { + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ""; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - if (c === "\\" && !IS_WINDOWS$1 && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } else if (c === "*" || c === "?") return ""; - else if (c === "[" && i + 1 < segment.length) { - let set = ""; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS$1 && i2 + 1 < segment.length) { - set += segment[++i2]; - continue; - } else if (c2 === "]") { - closed = i2; - break; - } else set += c2; - } - if (closed >= 0) { - if (set.length > 1) return ""; - if (set) { - literal += set; - i = closed; - continue; - } - } - } - literal += c; - } - return literal; + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toBinary(request); + return this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data).then((data) => cache_1.CreateCacheEntryResponse.fromBinary(data)); } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s$1) { - return s$1.replace(/[[\\^$.|?*+()]/g, "\\$&"); + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request); + return this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data).then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data)); + } + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request); + return this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data).then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data)); } }; - exports.Pattern = Pattern; -} }); + exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-search-state.js"(exports) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/shared/util.js +var require_util = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); - exports.SearchState = void 0; - var SearchState = class { - constructor(path$13, level) { - this.path = path$13; - this.level = level; + exports.maskSigUrl = maskSigUrl; + exports.maskSecretUrls = maskSecretUrls; + const core_1 = require_core(); + /** + * Masks the `sig` parameter in a URL and sets it as a secret. + * + * @param url - The URL containing the signature parameter to mask + * @remarks + * This function attempts to parse the provided URL and identify the 'sig' query parameter. + * If found, it registers both the raw and URL-encoded signature values as secrets using + * the Actions `setSecret` API, which prevents them from being displayed in logs. + * + * The function handles errors gracefully if URL parsing fails, logging them as debug messages. + * + * @example + * ```typescript + * // Mask a signature in an Azure SAS token URL + * maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01'); + * ``` + */ + function maskSigUrl(url) { + if (!url) return; + try { + const signature = new URL(url).searchParams.get("sig"); + if (signature) { + (0, core_1.setSecret)(signature); + (0, core_1.setSecret)(encodeURIComponent(signature)); + } + } catch (error) { + (0, core_1.debug)(`Failed to parse URL: ${url} ${error instanceof Error ? error.message : String(error)}`); } - }; - exports.SearchState = SearchState; -} }); + } + /** + * Masks sensitive information in URLs containing signature parameters. + * Currently supports masking 'sig' parameters in the 'signed_upload_url' + * and 'signed_download_url' properties of the provided object. + * + * @param body - The object should contain a signature + * @remarks + * This function extracts URLs from the object properties and calls maskSigUrl + * on each one to redact sensitive signature information. The function doesn't + * modify the original object; it only marks the signatures as secrets for + * logging purposes. + * + * @example + * ```typescript + * const responseBody = { + * signed_upload_url: 'https://blob.core.windows.net/?sig=abc123', + * signed_download_url: 'https://blob.core/windows.net/?sig=def456' + * }; + * maskSecretUrls(responseBody); + * ``` + */ + function maskSecretUrls(body) { + if (typeof body !== "object" || body === null) { + (0, core_1.debug)("body is not an object or is null"); + return; + } + if ("signed_upload_url" in body && typeof body.signed_upload_url === "string") maskSigUrl(body.signed_upload_url); + if ("signed_download_url" in body && typeof body.signed_download_url === "string") maskSigUrl(body.signed_download_url); + } +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-globber.js"(exports) { - var __createBinding$1 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m$1[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$1 = exports && exports.__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$1(result, mod, k); - } - __setModuleDefault$1(result, mod); - return result; - }; - var __awaiter$2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js +var require_cacheTwirpClient = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -43817,237 +45240,180 @@ var require_internal_globber = __commonJS({ "node_modules/.deno/@actions+glob@0. step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues$1 = exports && exports.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m$1 = o[Symbol.asyncIterator], i; - return m$1 ? m$1.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d$1, v) { - Promise.resolve(v).then(function(v$1) { - resolve({ - value: v$1, - done: d$1 - }); - }, reject); - } - }; - var __await = exports && exports.__await || function(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - var __asyncGenerator = exports && exports.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([ - n, - v, - a, - b - ]) > 1 || resume$1(n, v); - }); - }; - } - function resume$1(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume$1("next", value); - } - function reject(value) { - resume$1("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume$1(q[0][0], q[0][1]); - } - }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.DefaultGlobber = void 0; - const core$1 = __importStar$1(require_core()); - const fs$1 = __importStar$1(__require("fs")); - const globOptionsHelper = __importStar$1(require_internal_glob_options_helper()); - const path$1 = __importStar$1(__require("path")); - const patternHelper = __importStar$1(require_internal_pattern_helper()); - const internal_match_kind_1 = require_internal_match_kind(); - const internal_pattern_1 = require_internal_pattern(); - const internal_search_state_1 = require_internal_search_state(); - const IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); + exports.internalCacheTwirpClient = internalCacheTwirpClient; + const core_1 = require_core(); + const user_agent_1 = require_user_agent(); + const errors_1 = require_errors(); + const config_1 = require_config(); + const cacheUtils_1 = require_cacheUtils(); + const auth_1 = require_auth(); + const http_client_1 = require_lib(); + const cache_twirp_client_1 = require_cache_twirp_client(); + const util_1 = require_util(); + /** + * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. + * + * It adds retry logic to the request method, which is not present in the generated client. + * + * This class is used to interact with cache service v2. + */ + var CacheServiceClient = class { + constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { + this.maxAttempts = 5; + this.baseRetryIntervalMilliseconds = 3e3; + this.retryMultiplier = 1.5; + const token = (0, cacheUtils_1.getRuntimeToken)(); + this.baseUrl = (0, config_1.getCacheServiceURL)(); + if (maxAttempts) this.maxAttempts = maxAttempts; + if (baseRetryIntervalMilliseconds) this.baseRetryIntervalMilliseconds = baseRetryIntervalMilliseconds; + if (retryMultiplier) this.retryMultiplier = retryMultiplier; + this.httpClient = new http_client_1.HttpClient(userAgent, [new auth_1.BearerCredentialHandler(token)]); } - glob() { - var _a$2, e_1, _b$1, _c$1; - return __awaiter$2(this, void 0, void 0, function* () { - const result = []; + request(service, method, contentType, data) { + return __awaiter(this, void 0, void 0, function* () { + const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url}`); + const headers = { "Content-Type": contentType }; try { - for (var _d$1 = true, _e = __asyncValues$1(this.globGenerator()), _f; _f = yield _e.next(), _a$2 = _f.done, !_a$2; _d$1 = true) { - _c$1 = _f.value; - _d$1 = false; - const itemPath = _c$1; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield _b$1.call(_e); - } finally { - if (e_1) throw e_1.error; - } + const { body } = yield this.retryableRequest(() => __awaiter(this, void 0, void 0, function* () { + return this.httpClient.post(url, JSON.stringify(data), headers); + })); + return body; + } catch (error) { + throw new Error(`Failed to ${method}: ${error.message}`); } - return result; }); } - globGenerator() { - return __asyncGenerator(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core$1.debug(`Search path '${searchPath}'`); + retryableRequest(operation) { + return __awaiter(this, void 0, void 0, function* () { + let attempt = 0; + let errorMessage = ""; + let rawBody = ""; + while (attempt < this.maxAttempts) { + let isRetryable = false; try { - yield __await(fs$1.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") continue; - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match$2 = patternHelper.match(patterns, item.path); - const partialMatch$2 = !!match$2 || patternHelper.partialMatch(patterns, item.path); - if (!match$2 && !partialMatch$2) continue; - const stats = yield __await( - DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists -); - if (!stats) continue; - if (options.excludeHiddenFiles && path$1.basename(item.path).match(/^\./)) continue; - if (stats.isDirectory()) { - if (match$2 & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) yield yield __await(item.path); - else if (!partialMatch$2) continue; - const childLevel = item.level + 1; - const childItems = (yield __await(fs$1.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path$1.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match$2 & internal_match_kind_1.MatchKind.File) yield yield __await(item.path); - } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter$2(this, void 0, void 0, function* () { - const result = new DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); - } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) if (!line || line.startsWith("#")) continue; - else result.patterns.push(new internal_pattern_1.Pattern(line)); - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter$2(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) try { - stats = yield fs$1.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core$1.debug(`Broken symlink '${item.path}'`); - return void 0; + const response = yield operation(); + const statusCode = response.message.statusCode; + rawBody = yield response.readBody(); + (0, core_1.debug)(`[Response] - ${response.message.statusCode}`); + (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); + const body = JSON.parse(rawBody); + (0, util_1.maskSecretUrls)(body); + (0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`); + if (this.isSuccessStatusCode(statusCode)) return { + response, + body + }; + isRetryable = this.isRetryableHttpStatusCode(statusCode); + errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`; + if (body.msg) { + if (errors_1.UsageError.isUsageErrorMessage(body.msg)) throw new errors_1.UsageError(); + errorMessage = `${errorMessage}: ${body.msg}`; } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - else stats = yield fs$1.promises.lstat(item.path); - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs$1.promises.realpath(item.path); - while (traversalChain.length >= item.level) traversalChain.pop(); - if (traversalChain.some((x) => x === realPath)) { - core$1.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; + if (statusCode === http_client_1.HttpCodes.TooManyRequests) { + const retryAfterHeader = response.message.headers["retry-after"]; + if (retryAfterHeader) { + const parsedSeconds = parseInt(retryAfterHeader, 10); + if (!isNaN(parsedSeconds) && parsedSeconds > 0) (0, core_1.warning)(`You've hit a rate limit, your rate limit will reset in ${parsedSeconds} seconds`); + } + throw new errors_1.RateLimitError(`Rate limited: ${errorMessage}`); + } + } catch (error) { + if (error instanceof SyntaxError) (0, core_1.debug)(`Raw Body: ${rawBody}`); + if (error instanceof errors_1.UsageError) throw error; + if (error instanceof errors_1.RateLimitError) throw error; + if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code); + isRetryable = true; + errorMessage = error.message; } - traversalChain.push(realPath); + if (!isRetryable) throw new Error(`Received non-retryable error: ${errorMessage}`); + if (attempt + 1 === this.maxAttempts) throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`); + const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt); + (0, core_1.info)(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); + yield this.sleep(retryTimeMilliseconds); + attempt++; } - return stats; + throw new Error(`Request failed`); + }); + } + isSuccessStatusCode(statusCode) { + if (!statusCode) return false; + return statusCode >= 200 && statusCode < 300; + } + isRetryableHttpStatusCode(statusCode) { + if (!statusCode) return false; + return [ + http_client_1.HttpCodes.BadGateway, + http_client_1.HttpCodes.GatewayTimeout, + http_client_1.HttpCodes.InternalServerError, + http_client_1.HttpCodes.ServiceUnavailable + ].includes(statusCode); + } + sleep(milliseconds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); }); } + getExponentialRetryTimeMilliseconds(attempt) { + if (attempt < 0) throw new Error("attempt should be a positive integer"); + if (attempt === 0) return this.baseRetryIntervalMilliseconds; + const minTime = this.baseRetryIntervalMilliseconds * Math.pow(this.retryMultiplier, attempt); + const maxTime = minTime * this.retryMultiplier; + return Math.trunc(Math.random() * (maxTime - minTime) + minTime); + } }; - exports.DefaultGlobber = DefaultGlobber; -} }); + function internalCacheTwirpClient(options) { + const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); + return new cache_twirp_client_1.CacheServiceClientJSON(client); + } +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-hash-files.js -var require_internal_hash_files = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/internal-hash-files.js"(exports) { - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/internal/tar.js +var require_tar = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m$1, k); - if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { - return m$1[k]; + return m[k]; } }; Object.defineProperty(o, k2, desc); - } : function(o, m$1, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - o[k2] = m$1[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar = exports && exports.__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 __awaiter$1 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -44074,91 +45440,211 @@ var require_internal_hash_files = __commonJS({ "node_modules/.deno/@actions+glob step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues = exports && exports.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m$1 = o[Symbol.asyncIterator], i; - return m$1 ? m$1.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d$1, v) { - Promise.resolve(v).then(function(v$1) { - resolve({ - value: v$1, - done: d$1 - }); - }, reject); - } - }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.hashFiles = void 0; - const crypto = __importStar(__require("crypto")); - const core = __importStar(require_core()); - const fs = __importStar(__require("fs")); - const stream = __importStar(__require("stream")); - const util = __importStar(__require("util")); - const path = __importStar(__require("path")); - function hashFiles$1(globber, currentWorkspace, verbose = false) { - var _a$2, e_1, _b$1, _c$1; - var _d$1; - return __awaiter$1(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core.info : core.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d$1 = process.env["GITHUB_WORKSPACE"]) !== null && _d$1 !== void 0 ? _d$1 : process.cwd(); - const result = crypto.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a$2 = _g.done, !_a$2; _e = true) { - _c$1 = _g.value; - _e = false; - const file = _c$1; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash = crypto.createHash("sha256"); - const pipeline = util.promisify(stream.pipeline); - yield pipeline(fs.createReadStream(file), hash); - result.write(hash.digest()); - count++; - if (!hasMatch) hasMatch = true; + exports.listTar = listTar; + exports.extractTar = extractTar; + exports.createTar = createTar; + const exec_1 = require_exec(); + const io = __importStar(require_io()); + const fs_1 = __require("fs"); + const path$1 = __importStar(__require("path")); + const utils = __importStar(require_cacheUtils()); + const constants_1 = require_constants$5(); + const IS_WINDOWS = process.platform === "win32"; + function getTarPath() { + return __awaiter(this, void 0, void 0, function* () { + switch (process.platform) { + case "win32": { + const gnuTar = yield utils.getGnuTarPathOnWindows(); + const systemTar = constants_1.SystemTarPathOnWindows; + if (gnuTar) return { + path: gnuTar, + type: constants_1.ArchiveToolType.GNU + }; + else if ((0, fs_1.existsSync)(systemTar)) return { + path: systemTar, + type: constants_1.ArchiveToolType.BSD + }; + break; } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a$2 && (_b$1 = _f.return)) yield _b$1.call(_f); - } finally { - if (e_1) throw e_1.error; + case "darwin": { + const gnuTar = yield io.which("gtar", false); + if (gnuTar) return { + path: gnuTar, + type: constants_1.ArchiveToolType.GNU + }; + else return { + path: yield io.which("tar", true), + type: constants_1.ArchiveToolType.BSD + }; } + default: break; } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; + return { + path: yield io.which("tar", true), + type: constants_1.ArchiveToolType.GNU + }; + }); + } + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter(this, arguments, void 0, function* (tarPath, compressionMethod, type, archivePath = "") { + const args = [`"${tarPath.path}"`]; + const cacheFileName = utils.getCacheFileName(compressionMethod); + const tarFile = "cache.tar"; + const workingDirectory = getWorkingDirectory(); + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; + switch (type) { + case "create": + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + break; + case "extract": + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path$1.sep}`, "g"), "/")); + break; + case "list": + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "-P"); + break; + } + if (tarPath.type === constants_1.ArchiveToolType.GNU) switch (process.platform) { + case "win32": + args.push("--force-local"); + break; + case "darwin": + args.push("--delay-directory-restore"); + break; + } + return args; + }); + } + function getCommands(compressionMethod_1, type_1) { + return __awaiter(this, arguments, void 0, function* (compressionMethod, type, archivePath = "") { + let args; + const tarPath = yield getTarPath(); + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; + if (BSD_TAR_ZSTD && type !== "create") args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; + else args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; + if (BSD_TAR_ZSTD) return args; + return [args.join(" ")]; + }); + } + function getWorkingDirectory() { + var _a; + return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); + } + function getDecompressionProgram(tarPath, compressionMethod, archivePath) { + return __awaiter(this, void 0, void 0, function* () { + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; + switch (compressionMethod) { + case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ + "zstd -d --long=30 --force -o", + constants_1.TarFilename, + archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/") + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -d --long=30\"" : "unzstd --long=30"]; + case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ + "zstd -d --force -o", + constants_1.TarFilename, + archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/") + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -d\"" : "unzstd"]; + default: return ["-z"]; + } + }); + } + function getCompressionProgram(tarPath, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + const cacheFileName = utils.getCacheFileName(compressionMethod); + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; + switch (compressionMethod) { + case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ + "zstd -T0 --long=30 --force -o", + cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), + constants_1.TarFilename + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -T0 --long=30\"" : "zstdmt --long=30"]; + case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ + "zstd -T0 --force -o", + cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), + constants_1.TarFilename + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -T0\"" : "zstdmt"]; + default: return ["-z"]; + } + }); + } + function execCommands(commands, cwd) { + return __awaiter(this, void 0, void 0, function* () { + for (const command of commands) try { + yield (0, exec_1.exec)(command, void 0, { + cwd, + env: Object.assign(Object.assign({}, process.env), { MSYS: "winsymlinks:nativestrict" }) + }); + } catch (error) { + throw new Error(`${command.split(" ")[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); } }); } - exports.hashFiles = hashFiles$1; -} }); + function listTar(archivePath, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + yield execCommands(yield getCommands(compressionMethod, "list", archivePath)); + }); + } + function extractTar(archivePath, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + const workingDirectory = getWorkingDirectory(); + yield io.mkdirP(workingDirectory); + yield execCommands(yield getCommands(compressionMethod, "extract", archivePath)); + }); + } + function createTar(archiveFolder, sourceDirectories, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + (0, fs_1.writeFileSync)(path$1.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + yield execCommands(yield getCommands(compressionMethod, "create"), archiveFolder); + }); + } +})); //#endregion -//#region node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_modules/@actions/glob/lib/glob.js"(exports) { +//#region node_modules/.deno/@actions+cache@5.0.5/node_modules/@actions/cache/lib/cache.js +var require_cache = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -44187,43 +45673,365 @@ var require_glob = __commonJS({ "node_modules/.deno/@actions+glob@0.5.0/node_mod }); }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.hashFiles = exports.create = void 0; - const internal_globber_1 = require_internal_globber(); - const internal_hash_files_1 = require_internal_hash_files(); + exports.FinalizeCacheError = exports.ReserveCacheError = exports.ValidationError = void 0; + exports.isFeatureAvailable = isFeatureAvailable; + exports.restoreCache = restoreCache; + exports.saveCache = saveCache; + const core = __importStar(require_core()); + const path = __importStar(__require("path")); + const utils = __importStar(require_cacheUtils()); + const cacheHttpClient = __importStar(require_cacheHttpClient()); + const cacheTwirpClient = __importStar(require_cacheTwirpClient()); + const config_1 = require_config(); + const tar_1 = require_tar(); + const http_client_1 = require_lib(); + var ValidationError = class ValidationError extends Error { + constructor(message) { + super(message); + this.name = "ValidationError"; + Object.setPrototypeOf(this, ValidationError.prototype); + } + }; + exports.ValidationError = ValidationError; + var ReserveCacheError = class ReserveCacheError extends Error { + constructor(message) { + super(message); + this.name = "ReserveCacheError"; + Object.setPrototypeOf(this, ReserveCacheError.prototype); + } + }; + exports.ReserveCacheError = ReserveCacheError; + var FinalizeCacheError = class FinalizeCacheError extends Error { + constructor(message) { + super(message); + this.name = "FinalizeCacheError"; + Object.setPrototypeOf(this, FinalizeCacheError.prototype); + } + }; + exports.FinalizeCacheError = FinalizeCacheError; + function checkPaths(paths) { + if (!paths || paths.length === 0) throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); + } + function checkKey(key) { + if (key.length > 512) throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); + if (!/^[^,]*$/.test(key)) throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); + } /** - * Constructs a globber + * isFeatureAvailable to check the presence of Actions cache service * - * @param patterns Patterns separated by newlines - * @param options Glob options + * @returns boolean return true if Actions cache service feature is available, otherwise false */ - function create(patterns, options) { - return __awaiter(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + function isFeatureAvailable() { + switch ((0, config_1.getCacheServiceVersion)()) { + case "v2": return !!process.env["ACTIONS_RESULTS_URL"]; + default: return !!process.env["ACTIONS_CACHE_URL"]; + } + } + /** + * Restores cache from keys + * + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching. + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey + * @param downloadOptions cache download options + * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform + * @returns string returns the key for the cache hit, otherwise returns undefined + */ + function restoreCache(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); + core.debug(`Cache service version: ${cacheServiceVersion}`); + checkPaths(paths); + switch (cacheServiceVersion) { + case "v2": return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); + default: return yield restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); + } }); } - exports.create = create; /** - * Computes the sha256 hash of a glob + * Restores cache using the legacy Cache Service * - * @param patterns Patterns separated by newlines - * @param currentWorkspace Workspace used when matching files - * @param options Glob options - * @param verbose Enables verbose logging + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching. + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey + * @param options cache download options + * @param enableCrossOsArchive an optional boolean enabled to restore on Windows any cache created on any platform + * @returns string returns the key for the cache hit, otherwise returns undefined */ - function hashFiles(patterns, currentWorkspace = "", options, verbose = false) { - return __awaiter(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") followSymbolicLinks = options.followSymbolicLinks; - const globber = yield create(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + restoreKeys = restoreKeys || []; + const keys = [primaryKey, ...restoreKeys]; + core.debug("Resolved Keys:"); + core.debug(JSON.stringify(keys)); + if (keys.length > 10) throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); + for (const key of keys) checkKey(key); + const compressionMethod = yield utils.getCompressionMethod(); + let archivePath = ""; + try { + const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { + compressionMethod, + enableCrossOsArchive + }); + if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) return; + if (options === null || options === void 0 ? void 0 : options.lookupOnly) { + core.info("Lookup only - skipping download"); + return cacheEntry.cacheKey; + } + archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); + yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + yield (0, tar_1.extractTar)(archivePath, compressionMethod); + core.info("Cache restored successfully"); + return cacheEntry.cacheKey; + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) core.error(`Failed to restore: ${error.message}`); + else core.warning(`Failed to restore: ${error.message}`); + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } }); } - exports.hashFiles = hashFiles; -} }); -var import_glob = __toESM(require_glob(), 1); + /** + * Restores cache using Cache Service v2 + * + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey + * @param downloadOptions cache download options + * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform + * @returns string returns the key for the cache hit, otherwise returns undefined + */ + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); + restoreKeys = restoreKeys || []; + const keys = [primaryKey, ...restoreKeys]; + core.debug("Resolved Keys:"); + core.debug(JSON.stringify(keys)); + if (keys.length > 10) throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); + for (const key of keys) checkKey(key); + let archivePath = ""; + try { + const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); + const compressionMethod = yield utils.getCompressionMethod(); + const request = { + key: primaryKey, + restoreKeys, + version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive) + }; + const response = yield twirpClient.GetCacheEntryDownloadURL(request); + if (!response.ok) { + core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + return; + } + if (request.key !== response.matchedKey) core.info(`Cache hit for restore-key: ${response.matchedKey}`); + else core.info(`Cache hit for: ${response.matchedKey}`); + if (options === null || options === void 0 ? void 0 : options.lookupOnly) { + core.info("Lookup only - skipping download"); + return response.matchedKey; + } + archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + core.debug(`Archive path: ${archivePath}`); + core.debug(`Starting download of archive to: ${archivePath}`); + yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + yield (0, tar_1.extractTar)(archivePath, compressionMethod); + core.info("Cache restored successfully"); + return response.matchedKey; + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) core.error(`Failed to restore: ${error.message}`); + else core.warning(`Failed to restore: ${error.message}`); + } finally { + try { + if (archivePath) yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + }); + } + /** + * Saves a list of files with the specified key + * + * @param paths a list of file paths to be cached + * @param key an explicit key for restoring the cache + * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform + * @param options cache upload options + * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails + */ + function saveCache(paths_1, key_1, options_1) { + return __awaiter(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); + core.debug(`Cache service version: ${cacheServiceVersion}`); + checkPaths(paths); + checkKey(key); + switch (cacheServiceVersion) { + case "v2": return yield saveCacheV2(paths, key, options, enableCrossOsArchive); + default: return yield saveCacheV1(paths, key, options, enableCrossOsArchive); + } + }); + } + /** + * Save cache using the legacy Cache Service + * + * @param paths + * @param key + * @param options + * @param enableCrossOsArchive + * @returns + */ + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; + const compressionMethod = yield utils.getCompressionMethod(); + let cacheId = -1; + const cachePaths = yield utils.resolvePaths(paths); + core.debug("Cache Paths:"); + core.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); + const archiveFolder = yield utils.createTempDirectory(); + const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); + try { + yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + const fileSizeLimit = 10 * 1024 * 1024 * 1024; + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.debug(`File Size: ${archiveFileSize}`); + if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); + core.debug("Reserving Cache"); + const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { + compressionMethod, + enableCrossOsArchive, + cacheSize: archiveFileSize + }); + if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId; + else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); + else throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); + core.debug(`Saving Cache (ID: ${cacheId})`); + yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else if (typedError.name === ReserveCacheError.name) core.info(`Failed to save: ${typedError.message}`); + else if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) core.error(`Failed to save: ${typedError.message}`); + else core.warning(`Failed to save: ${typedError.message}`); + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + return cacheId; + }); + } + /** + * Save cache using Cache Service v2 + * + * @param paths a list of file paths to restore from the cache + * @param key an explicit key for restoring the cache + * @param options cache upload options + * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform + * @returns + */ + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + options = Object.assign(Object.assign({}, options), { + uploadChunkSize: 64 * 1024 * 1024, + uploadConcurrency: 8, + useAzureSdk: true + }); + const compressionMethod = yield utils.getCompressionMethod(); + const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); + let cacheId = -1; + const cachePaths = yield utils.resolvePaths(paths); + core.debug("Cache Paths:"); + core.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); + const archiveFolder = yield utils.createTempDirectory(); + const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); + try { + yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.debug(`File Size: ${archiveFileSize}`); + options.archiveSizeBytes = archiveFileSize; + core.debug("Reserving Cache"); + const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); + const request = { + key, + version + }; + let signedUploadUrl; + try { + const response = yield twirpClient.CreateCacheEntry(request); + if (!response.ok) { + if (response.message) core.warning(`Cache reservation failed: ${response.message}`); + throw new Error(response.message || "Response was not ok"); + } + signedUploadUrl = response.signedUploadUrl; + } catch (error) { + core.debug(`Failed to reserve cache: ${error}`); + throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); + } + core.debug(`Attempting to upload cache located at: ${archivePath}`); + yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); + const finalizeRequest = { + key, + version, + sizeBytes: `${archiveFileSize}` + }; + const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); + core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + if (!finalizeResponse.ok) { + if (finalizeResponse.message) throw new FinalizeCacheError(finalizeResponse.message); + throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); + } + cacheId = parseInt(finalizeResponse.entryId); + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else if (typedError.name === ReserveCacheError.name) core.info(`Failed to save: ${typedError.message}`); + else if (typedError.name === FinalizeCacheError.name) core.warning(typedError.message); + else if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) core.error(`Failed to save: ${typedError.message}`); + else core.warning(`Failed to save: ${typedError.message}`); + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + return cacheId; + }); + } +})); //#endregion //#region src/cache.ts +var cache_exports = /* @__PURE__ */ __exportAll({ + restoreCache: () => restoreCache, + saveCache: () => saveCache +}); +var import_cache = /* @__PURE__ */ __toESM(require_cache(), 1); +var import_core = /* @__PURE__ */ __toESM(require_core(), 1); +var import_glob = require_glob(); const state = { DENO_DIR: "DENO_DIR", CACHE_HIT: "CACHE_HIT", @@ -44262,7 +46070,7 @@ async function restoreCache(cacheHash) { const message = loadedCacheKey ? `Cache key used: "${loadedCacheKey}".` : `No cache found for restore key: "${restoreKey}".`; import_core.info(message); } catch (err) { - import_core.warning(new Error("Failed to restore cache. Continuing without cache.")); + import_core.warning(/* @__PURE__ */ new Error("Failed to restore cache. Continuing without cache.")); import_core.warning(err); } } @@ -44278,11 +46086,11 @@ async function resolveDenoDir() { return info.denoDir; } async function exec(command) { - const { exec: exec$2 } = await import("node:child_process"); + const { exec } = await import("node:child_process"); return await new Promise((res, rej) => { - exec$2(command, (err, stdout) => err ? rej(err) : res(stdout)); + exec(command, (err, stdout) => err ? rej(err) : res(stdout)); }); } //#endregion -export { restoreCache, saveCache }; \ No newline at end of file +export { saveCache as n, cache_exports as t }; \ No newline at end of file diff --git a/dist/main.mjs b/dist/main.mjs index d4dc23d..dcab49e 100644 --- a/dist/main.mjs +++ b/dist/main.mjs @@ -1,20 +1,20 @@ -import { __commonJS, __require, __toESM, import_core, require_core, require_exec, require_io, require_lib, require_semver } from "./semver-C43QPvfi.mjs"; +import { f as __toESM, i as require_io, n as require_core, o as require_lib, r as require_exec, s as __commonJSMin, t as require_semver$2, u as __require } from "./semver-O4tt7wRT.mjs"; import process$1 from "node:process"; +import * as console$1 from "node:console"; import * as path$1 from "node:path"; import path from "node:path"; -import * as console$1 from "node:console"; import * as fs$3 from "node:fs"; import { setTimeout as setTimeout$1 } from "node:timers"; import * as os from "node:os"; import * as fs from "node:fs/promises"; -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/internal/constants.js -var require_constants$5 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/internal/constants.js"(exports, module) { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/internal/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { const SEMVER_SPEC_VERSION = "2.0.0"; - const MAX_LENGTH$2 = 256; - const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; - const MAX_SAFE_COMPONENT_LENGTH$1 = 16; - const MAX_SAFE_BUILD_LENGTH$1 = MAX_LENGTH$2 - 6; + const MAX_LENGTH = 256; + const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + const MAX_SAFE_COMPONENT_LENGTH = 16; + const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; const RELEASE_TYPES = [ "major", "premajor", @@ -25,40 +25,40 @@ var require_constants$5 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_mod "prerelease" ]; module.exports = { - MAX_LENGTH: MAX_LENGTH$2, - MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1, - MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$1, - MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1, + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, RELEASE_TYPES, SEMVER_SPEC_VERSION, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; -} }); +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/internal/debug.js -var require_debug = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/internal/debug.js"(exports, module) { - const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; - module.exports = debug$4; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/internal/debug.js +var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; + module.exports = debug; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/internal/re.js -var require_re = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/internal/re.js"(exports, module) { - const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants$5(); - const debug$3 = require_debug(); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/internal/re.js +var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants(); + const debug = require_debug(); exports = module.exports = {}; - const re$4 = exports.re = []; + const re = exports.re = []; const safeRe = exports.safeRe = []; const src = exports.src = []; const safeSrc = exports.safeSrc = []; - const t$4 = exports.t = {}; + const t = exports.t = {}; let R = 0; const LETTERDASHNUMBER = "[a-zA-Z0-9-]"; const safeRegexReplacements = [ ["\\s", 1], - ["\\d", MAX_LENGTH$1], + ["\\d", MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; const makeSafeRegex = (value) => { @@ -68,79 +68,80 @@ var require_re = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semv const createToken = (name, value, isGlobal) => { const safe = makeSafeRegex(value); const index = R++; - debug$3(name, index, value); - t$4[name] = index; + debug(name, index, value); + t[name] = index; src[index] = value; safeSrc[index] = safe; - re$4[index] = new RegExp(value, isGlobal ? "g" : void 0); + re[index] = new RegExp(value, isGlobal ? "g" : void 0); safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); - createToken("MAINVERSION", `(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASE", `(?:-(${src[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src[t$4.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); - createToken("BUILD", `(?:\\+(${src[t$4.BUILDIDENTIFIER]}(?:\\.${src[t$4.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src[t$4.MAINVERSION]}${src[t$4.PRERELEASE]}?${src[t$4.BUILD]}?`); - createToken("FULL", `^${src[t$4.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src[t$4.MAINVERSIONLOOSE]}${src[t$4.PRERELEASELOOSE]}?${src[t$4.BUILD]}?`); - createToken("LOOSE", `^${src[t$4.LOOSEPLAIN]}$`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src[t$4.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:${src[t$4.PRERELEASE]})?${src[t$4.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src[t$4.PRERELEASELOOSE]})?${src[t$4.BUILD]}?)?)?`); - createToken("XRANGE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAINLOOSE]}$`); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); - createToken("COERCE", `${src[t$4.COERCEPLAIN]}(?:$|[^\\d])`); - createToken("COERCEFULL", src[t$4.COERCEPLAIN] + `(?:${src[t$4.PRERELEASE]})?(?:${src[t$4.BUILD]})?(?:$|[^\\d])`); - createToken("COERCERTL", src[t$4.COERCE], true); - createToken("COERCERTLFULL", src[t$4.COERCEFULL], true); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src[t$4.LONETILDE]}\\s+`, true); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); exports.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAINLOOSE]}$`); + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src[t$4.LONECARET]}\\s+`, true); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); exports.caretTrimReplace = "$1^"; - createToken("CARET", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src[t$4.GTLT]}\\s*(${src[t$4.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]}|${src[t$4.XRANGEPLAIN]})`, true); + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); exports.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src[t$4.XRANGEPLAIN]})\\s+-\\s+(${src[t$4.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$4.XRANGEPLAINLOOSE]})\\s*$`); + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); -} }); +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/internal/parse-options.js -var require_parse_options = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/internal/parse-options.js"(exports, module) { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/internal/parse-options.js +var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => { const looseOption = Object.freeze({ loose: true }); const emptyOpts = Object.freeze({}); - const parseOptions$3 = (options) => { + const parseOptions = (options) => { if (!options) return emptyOpts; if (typeof options !== "object") return looseOption; return options; }; - module.exports = parseOptions$3; -} }); + module.exports = parseOptions; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/internal/identifiers.js -var require_identifiers = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/internal/identifiers.js"(exports, module) { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/internal/identifiers.js +var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => { const numeric = /^[0-9]+$/; - const compareIdentifiers$1 = (a, b) => { + const compareIdentifiers = (a, b) => { + if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1; const anum = numeric.test(a); const bnum = numeric.test(b); if (anum && bnum) { @@ -149,33 +150,33 @@ var require_identifiers = __commonJS({ "node_modules/.deno/semver@7.7.2/node_mod } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }; - const rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a); + const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); module.exports = { - compareIdentifiers: compareIdentifiers$1, + compareIdentifiers, rcompareIdentifiers }; -} }); +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/classes/semver.js -var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/classes/semver.js"(exports, module) { - const debug$2 = require_debug(); - const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants$5(); - const { safeRe: re$3, t: t$3 } = require_re(); - const parseOptions$2 = require_parse_options(); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/classes/semver.js +var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const debug = require_debug(); + const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); + const { safeRe: re, t } = require_re(); + const parseOptions = require_parse_options(); const { compareIdentifiers } = require_identifiers(); - var SemVer$15 = class SemVer$15 { + var SemVer = class SemVer { constructor(version, options) { - options = parseOptions$2(options); - if (version instanceof SemVer$15) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version; + options = parseOptions(options); + if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version; else version = version.version; else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); - debug$2("SemVer", version, options); + debug("SemVer", version, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; - const m = version.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]); + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) throw new TypeError(`Invalid Version: ${version}`); this.raw = version; this.major = +m[1]; @@ -204,20 +205,26 @@ var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module return this.version; } compare(other) { - debug$2("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer$15)) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { if (typeof other === "string" && other === this.version) return 0; - other = new SemVer$15(other, this.options); + other = new SemVer(other, this.options); } if (other.version === this.version) return 0; return this.compareMain(other) || this.comparePre(other); } compareMain(other) { - if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + if (this.major < other.major) return -1; + if (this.major > other.major) return 1; + if (this.minor < other.minor) return -1; + if (this.minor > other.minor) return 1; + if (this.patch < other.patch) return -1; + if (this.patch > other.patch) return 1; + return 0; } comparePre(other) { - if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); if (this.prerelease.length && !other.prerelease.length) return -1; else if (!this.prerelease.length && other.prerelease.length) return 1; else if (!this.prerelease.length && !other.prerelease.length) return 0; @@ -225,7 +232,7 @@ var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module do { const a = this.prerelease[i]; const b = other.prerelease[i]; - debug$2("prerelease compare", i, a, b); + debug("prerelease compare", i, a, b); if (a === void 0 && b === void 0) return 0; else if (b === void 0) return 1; else if (a === void 0) return -1; @@ -234,12 +241,12 @@ var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module } while (++i); } compareBuild(other) { - if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); let i = 0; do { const a = this.build[i]; const b = other.build[i]; - debug$2("build compare", i, a, b); + debug("build compare", i, a, b); if (a === void 0 && b === void 0) return 0; else if (b === void 0) return 1; else if (a === void 0) return -1; @@ -251,7 +258,7 @@ var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module if (release.startsWith("pre")) { if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty"); if (identifier) { - const match = `-${identifier}`.match(this.options.loose ? re$3[t$3.PRERELEASELOOSE] : re$3[t$3.PRERELEASE]); + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`); } } @@ -312,11 +319,11 @@ var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module } } if (identifier) { - let prerelease$2 = [identifier, base]; - if (identifierBase === false) prerelease$2 = [identifier]; + let prerelease = [identifier, base]; + if (identifierBase === false) prerelease = [identifier]; if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2; - } else this.prerelease = prerelease$2; + if (isNaN(this.prerelease[1])) this.prerelease = prerelease; + } else this.prerelease = prerelease; } break; } @@ -327,81 +334,80 @@ var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module return this; } }; - module.exports = SemVer$15; -} }); + module.exports = SemVer; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/parse.js -var require_parse$1 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/parse.js"(exports, module) { - const SemVer$14 = require_semver$3(); - const parse$6 = (version, options, throwErrors = false) => { - if (version instanceof SemVer$14) return version; +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/parse.js +var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const parse = (version, options, throwErrors = false) => { + if (version instanceof SemVer) return version; try { - return new SemVer$14(version, options); + return new SemVer(version, options); } catch (er) { if (!throwErrors) return null; throw er; } }; - module.exports = parse$6; -} }); + module.exports = parse; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/valid.js -var require_valid$1 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/valid.js"(exports, module) { - const parse$5 = require_parse$1(); - const valid$1 = (version, options) => { - const v = parse$5(version, options); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/valid.js +var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const parse = require_parse(); + const valid = (version, options) => { + const v = parse(version, options); return v ? v.version : null; }; - module.exports = valid$1; -} }); + module.exports = valid; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/clean.js -var require_clean = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/clean.js"(exports, module) { - const parse$4 = require_parse$1(); - const clean$1 = (version, options) => { - const s = parse$4(version.trim().replace(/^[=v]+/, ""), options); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/clean.js +var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const parse = require_parse(); + const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }; - module.exports = clean$1; -} }); + module.exports = clean; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/inc.js -var require_inc = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/inc.js"(exports, module) { - const SemVer$13 = require_semver$3(); - const inc$1 = (version, release, options, identifier, identifierBase) => { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/inc.js +var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const inc = (version, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; identifier = options; options = void 0; } try { - return new SemVer$13(version instanceof SemVer$13 ? version.version : version, options).inc(release, identifier, identifierBase).version; + return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version; } catch (er) { return null; } }; - module.exports = inc$1; -} }); + module.exports = inc; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/diff.js -var require_diff = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/diff.js"(exports, module) { - const parse$3 = require_parse$1(); - const diff$1 = (version1, version2) => { - const v1 = parse$3(version1, null, true); - const v2 = parse$3(version2, null, true); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/diff.js +var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const parse = require_parse(); + const diff = (version1, version2) => { + const v1 = parse(version1, null, true); + const v2 = parse(version2, null, true); const comparison = v1.compare(v2); if (comparison === 0) return null; const v1Higher = comparison > 0; const highVersion = v1Higher ? v1 : v2; const lowVersion = v1Higher ? v2 : v1; const highHasPre = !!highVersion.prerelease.length; - const lowHasPre = !!lowVersion.prerelease.length; - if (lowHasPre && !highHasPre) { + if (!!lowVersion.prerelease.length && !highHasPre) { if (!lowVersion.patch && !lowVersion.minor) return "major"; if (lowVersion.compareMain(highVersion) === 0) { if (lowVersion.minor && !lowVersion.patch) return "minor"; @@ -414,154 +420,154 @@ var require_diff = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/se if (v1.patch !== v2.patch) return prefix + "patch"; return "prerelease"; }; - module.exports = diff$1; -} }); + module.exports = diff; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/major.js -var require_major = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/major.js"(exports, module) { - const SemVer$12 = require_semver$3(); - const major$1 = (a, loose) => new SemVer$12(a, loose).major; - module.exports = major$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/major.js +var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const major = (a, loose) => new SemVer(a, loose).major; + module.exports = major; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/minor.js -var require_minor = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/minor.js"(exports, module) { - const SemVer$11 = require_semver$3(); - const minor$1 = (a, loose) => new SemVer$11(a, loose).minor; - module.exports = minor$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/minor.js +var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const minor = (a, loose) => new SemVer(a, loose).minor; + module.exports = minor; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/patch.js -var require_patch = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/patch.js"(exports, module) { - const SemVer$10 = require_semver$3(); - const patch$1 = (a, loose) => new SemVer$10(a, loose).patch; - module.exports = patch$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/patch.js +var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const patch = (a, loose) => new SemVer(a, loose).patch; + module.exports = patch; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/prerelease.js -var require_prerelease = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/prerelease.js"(exports, module) { - const parse$2 = require_parse$1(); - const prerelease$1 = (version, options) => { - const parsed = parse$2(version, options); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/prerelease.js +var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const parse = require_parse(); + const prerelease = (version, options) => { + const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }; - module.exports = prerelease$1; -} }); + module.exports = prerelease; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/compare.js -var require_compare = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/compare.js"(exports, module) { - const SemVer$9 = require_semver$3(); - const compare$11 = (a, b, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b, loose)); - module.exports = compare$11; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/compare.js +var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module.exports = compare; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/rcompare.js -var require_rcompare = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/rcompare.js"(exports, module) { - const compare$10 = require_compare(); - const rcompare$1 = (a, b, loose) => compare$10(b, a, loose); - module.exports = rcompare$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/rcompare.js +var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const rcompare = (a, b, loose) => compare(b, a, loose); + module.exports = rcompare; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/compare-loose.js -var require_compare_loose = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/compare-loose.js"(exports, module) { - const compare$9 = require_compare(); - const compareLoose$1 = (a, b) => compare$9(a, b, true); - module.exports = compareLoose$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/compare-loose.js +var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const compareLoose = (a, b) => compare(a, b, true); + module.exports = compareLoose; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/compare-build.js -var require_compare_build = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/compare-build.js"(exports, module) { - const SemVer$8 = require_semver$3(); - const compareBuild$3 = (a, b, loose) => { - const versionA = new SemVer$8(a, loose); - const versionB = new SemVer$8(b, loose); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/compare-build.js +var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }; - module.exports = compareBuild$3; -} }); + module.exports = compareBuild; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/sort.js -var require_sort = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/sort.js"(exports, module) { - const compareBuild$2 = require_compare_build(); - const sort$1 = (list, loose) => list.sort((a, b) => compareBuild$2(a, b, loose)); - module.exports = sort$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/sort.js +var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compareBuild = require_compare_build(); + const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module.exports = sort; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/rsort.js -var require_rsort = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/rsort.js"(exports, module) { - const compareBuild$1 = require_compare_build(); - const rsort$1 = (list, loose) => list.sort((a, b) => compareBuild$1(b, a, loose)); - module.exports = rsort$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/rsort.js +var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compareBuild = require_compare_build(); + const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module.exports = rsort; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/gt.js -var require_gt = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/gt.js"(exports, module) { - const compare$8 = require_compare(); - const gt$4 = (a, b, loose) => compare$8(a, b, loose) > 0; - module.exports = gt$4; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/gt.js +var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const gt = (a, b, loose) => compare(a, b, loose) > 0; + module.exports = gt; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/lt.js -var require_lt = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/lt.js"(exports, module) { - const compare$7 = require_compare(); - const lt$3 = (a, b, loose) => compare$7(a, b, loose) < 0; - module.exports = lt$3; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/lt.js +var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const lt = (a, b, loose) => compare(a, b, loose) < 0; + module.exports = lt; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/eq.js -var require_eq = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/eq.js"(exports, module) { - const compare$6 = require_compare(); - const eq$2 = (a, b, loose) => compare$6(a, b, loose) === 0; - module.exports = eq$2; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/eq.js +var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const eq = (a, b, loose) => compare(a, b, loose) === 0; + module.exports = eq; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/neq.js -var require_neq = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/neq.js"(exports, module) { - const compare$5 = require_compare(); - const neq$2 = (a, b, loose) => compare$5(a, b, loose) !== 0; - module.exports = neq$2; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/neq.js +var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const neq = (a, b, loose) => compare(a, b, loose) !== 0; + module.exports = neq; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/gte.js -var require_gte = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/gte.js"(exports, module) { - const compare$4 = require_compare(); - const gte$3 = (a, b, loose) => compare$4(a, b, loose) >= 0; - module.exports = gte$3; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/gte.js +var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const gte = (a, b, loose) => compare(a, b, loose) >= 0; + module.exports = gte; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/lte.js -var require_lte = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/lte.js"(exports, module) { - const compare$3 = require_compare(); - const lte$3 = (a, b, loose) => compare$3(a, b, loose) <= 0; - module.exports = lte$3; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/lte.js +var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const compare = require_compare(); + const lte = (a, b, loose) => compare(a, b, loose) <= 0; + module.exports = lte; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/cmp.js -var require_cmp = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/cmp.js"(exports, module) { - const eq$1 = require_eq(); - const neq$1 = require_neq(); - const gt$3 = require_gt(); - const gte$2 = require_gte(); - const lt$2 = require_lt(); - const lte$2 = require_lte(); - const cmp$2 = (a, op, b, loose) => { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/cmp.js +var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const eq = require_eq(); + const neq = require_neq(); + const gt = require_gt(); + const gte = require_gte(); + const lt = require_lt(); + const lte = require_lte(); + const cmp = (a, op, b, loose) => { switch (op) { case "===": if (typeof a === "object") a = a.version; @@ -573,33 +579,33 @@ var require_cmp = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/sem return a !== b; case "": case "=": - case "==": return eq$1(a, b, loose); - case "!=": return neq$1(a, b, loose); - case ">": return gt$3(a, b, loose); - case ">=": return gte$2(a, b, loose); - case "<": return lt$2(a, b, loose); - case "<=": return lte$2(a, b, loose); + case "==": return eq(a, b, loose); + case "!=": return neq(a, b, loose); + case ">": return gt(a, b, loose); + case ">=": return gte(a, b, loose); + case "<": return lt(a, b, loose); + case "<=": return lte(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } }; - module.exports = cmp$2; -} }); + module.exports = cmp; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/coerce.js -var require_coerce = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/coerce.js"(exports, module) { - const SemVer$7 = require_semver$3(); - const parse$1 = require_parse$1(); - const { safeRe: re$2, t: t$2 } = require_re(); - const coerce$1 = (version, options) => { - if (version instanceof SemVer$7) return version; +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/coerce.js +var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const parse = require_parse(); + const { safeRe: re, t } = require_re(); + const coerce = (version, options) => { + if (version instanceof SemVer) return version; if (typeof version === "number") version = String(version); if (typeof version !== "string") return null; options = options || {}; let match = null; - if (!options.rtl) match = version.match(options.includePrerelease ? re$2[t$2.COERCEFULL] : re$2[t$2.COERCE]); + if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); else { - const coerceRtlRegex = options.includePrerelease ? re$2[t$2.COERCERTLFULL] : re$2[t$2.COERCERTL]; + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; let next; while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; @@ -608,27 +614,23 @@ var require_coerce = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/ coerceRtlRegex.lastIndex = -1; } if (match === null) return null; - const major$2 = match[2]; - const minor$2 = match[3] || "0"; - const patch$2 = match[4] || "0"; - const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : ""; - const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; - return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options); + const major = match[2]; + return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options); }; - module.exports = coerce$1; -} }); + module.exports = coerce; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/internal/lrucache.js -var require_lrucache = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/internal/lrucache.js"(exports, module) { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/internal/lrucache.js +var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => { var LRUCache = class { constructor() { this.max = 1e3; - this.map = new Map(); + this.map = /* @__PURE__ */ new Map(); } get(key) { const value = this.map.get(key); - if (value === void 0) return void 0; + if (value === void 0) return; else { this.map.delete(key); this.map.set(key, value); @@ -639,8 +641,7 @@ var require_lrucache = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module return this.map.delete(key); } set(key, value) { - const deleted = this.delete(key); - if (!deleted && value !== void 0) { + if (!this.delete(key) && value !== void 0) { if (this.map.size >= this.max) { const firstKey = this.map.keys().next().value; this.delete(firstKey); @@ -651,18 +652,18 @@ var require_lrucache = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module } }; module.exports = LRUCache; -} }); +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/classes/range.js -var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/classes/range.js"(exports, module) { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/classes/range.js +var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => { const SPACE_CHARACTERS = /\s+/g; - var Range$11 = class Range$11 { + var Range = class Range { constructor(range, options) { - options = parseOptions$1(options); - if (range instanceof Range$11) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; - else return new Range$11(range.raw, options); - if (range instanceof Comparator$4) { + options = parseOptions(options); + if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; + else return new Range(range.raw, options); + if (range instanceof Comparator) { this.raw = range.value; this.set = [[range]]; this.formatted = void 0; @@ -708,28 +709,27 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s return this.range; } parseRange(range) { - const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); - const memoKey = memoOpts + ":" + range; + const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range; const cached = cache.get(memoKey); if (cached) return cached; const loose = this.options.loose; - const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE]; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug$1("hyphen replace", range); - range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace); - debug$1("comparator trim", range); - range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace); - debug$1("tilde trim", range); - range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace); - debug$1("caret trim", range); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + debug("tilde trim", range); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + debug("caret trim", range); let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); if (loose) rangeList = rangeList.filter((comp) => { - debug$1("loose invalid filter", comp, this.options); - return !!comp.match(re$1[t$1.COMPARATORLOOSE]); + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); }); - debug$1("range list", rangeList); - const rangeMap = new Map(); - const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options)); + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); for (const comp of comparators) { if (isNullSet(comp)) return [comp]; rangeMap.set(comp.value, comp); @@ -740,7 +740,7 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s return result; } intersects(range, options) { - if (!(range instanceof Range$11)) throw new TypeError("a Range is required"); + if (!(range instanceof Range)) throw new TypeError("a Range is required"); return this.set.some((thisComparators) => { return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { @@ -754,7 +754,7 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s test(version) { if (!version) return false; if (typeof version === "string") try { - version = new SemVer$6(version, this.options); + version = new SemVer(version, this.options); } catch (er) { return false; } @@ -762,15 +762,14 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s return false; } }; - module.exports = Range$11; - const LRU = require_lrucache(); - const cache = new LRU(); - const parseOptions$1 = require_parse_options(); - const Comparator$4 = require_comparator(); - const debug$1 = require_debug(); - const SemVer$6 = require_semver$3(); - const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); - const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants$5(); + module.exports = Range; + const cache = new (require_lrucache())(); + const parseOptions = require_parse_options(); + const Comparator = require_comparator(); + const debug = require_debug(); + const SemVer = require_semver$1(); + const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); + const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); const isNullSet = (c) => c.value === "<0.0.0-0"; const isAny = (c) => c.value === ""; const isSatisfiable = (comparators, options) => { @@ -786,15 +785,16 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s return result; }; const parseComparator = (comp, options) => { - debug$1("comp", comp, options); + comp = comp.replace(re[t.BUILD], ""); + debug("comp", comp, options); comp = replaceCarets(comp, options); - debug$1("caret", comp); + debug("caret", comp); comp = replaceTildes(comp, options); - debug$1("tildes", comp); + debug("tildes", comp); comp = replaceXRanges(comp, options); - debug$1("xrange", comp); + debug("xrange", comp); comp = replaceStars(comp, options); - debug$1("stars", comp); + debug("stars", comp); return comp; }; const isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; @@ -802,18 +802,18 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); }; const replaceTilde = (comp, options) => { - const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE]; + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, (_, M, m, p, pr) => { - debug$1("tilde", comp, _, M, m, p, pr); + debug("tilde", comp, _, M, m, p, pr); let ret; if (isX(M)) ret = ""; else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; else if (pr) { - debug$1("replaceTilde pr", pr); + debug("replaceTilde pr", pr); ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; - debug$1("tilde return", ret); + debug("tilde return", ret); return ret; }); }; @@ -821,40 +821,40 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); }; const replaceCaret = (comp, options) => { - debug$1("caret", comp, options); - const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET]; + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_, M, m, p, pr) => { - debug$1("caret", comp, _, M, m, p, pr); + debug("caret", comp, _, M, m, p, pr); let ret; if (isX(M)) ret = ""; else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; else if (pr) { - debug$1("replaceCaret pr", pr); + debug("replaceCaret pr", pr); if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; } else { - debug$1("no pr"); + debug("no pr"); if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; } - debug$1("caret return", ret); + debug("caret return", ret); return ret; }); }; const replaceXRanges = (comp, options) => { - debug$1("replaceXRanges", comp, options); + debug("replaceXRanges", comp, options); return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); }; const replaceXRange = (comp, options) => { comp = comp.trim(); - const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE]; + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug$1("xRange", comp, ret, gtlt, M, m, p, pr); + debug("xRange", comp, ret, gtlt, M, m, p, pr); const xM = isX(M); const xm = xM || isX(m); const xp = xm || isX(p); @@ -885,17 +885,17 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s ret = `${gtlt + M}.${m}.${p}${pr}`; } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; - debug$1("xRange return", ret); + debug("xRange return", ret); return ret; }); }; const replaceStars = (comp, options) => { - debug$1("replaceStars", comp, options); - return comp.trim().replace(re$1[t$1.STAR], ""); + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); }; const replaceGTE0 = (comp, options) => { - debug$1("replaceGTE0", comp, options); - return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], ""); + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); }; const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { if (isX(fM)) from = ""; @@ -915,8 +915,8 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false; if (version.prerelease.length && !options.includePrerelease) { for (let i = 0; i < set.length; i++) { - debug$1(set[i].semver); - if (set[i].semver === Comparator$4.ANY) continue; + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) continue; if (set[i].semver.prerelease.length > 0) { const allowed = set[i].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; @@ -926,26 +926,26 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/s } return true; }; -} }); +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/classes/comparator.js -var require_comparator = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/classes/comparator.js"(exports, module) { - const ANY$2 = Symbol("SemVer ANY"); - var Comparator$3 = class Comparator$3 { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/classes/comparator.js +var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const ANY = Symbol("SemVer ANY"); + var Comparator = class Comparator { static get ANY() { - return ANY$2; + return ANY; } constructor(comp, options) { options = parseOptions(options); - if (comp instanceof Comparator$3) if (comp.loose === !!options.loose) return comp; + if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp; else comp = comp.value; comp = comp.trim().split(/\s+/).join(" "); debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); - if (this.semver === ANY$2) this.value = ""; + if (this.semver === ANY) this.value = ""; else this.value = this.operator + this.semver.version; debug("comp", this); } @@ -955,30 +955,30 @@ var require_comparator = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modu if (!m) throw new TypeError(`Invalid comparator: ${comp}`); this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") this.operator = ""; - if (!m[2]) this.semver = ANY$2; - else this.semver = new SemVer$5(m[2], this.options.loose); + if (!m[2]) this.semver = ANY; + else this.semver = new SemVer(m[2], this.options.loose); } toString() { return this.value; } test(version) { debug("Comparator.test", version, this.options.loose); - if (this.semver === ANY$2 || version === ANY$2) return true; + if (this.semver === ANY || version === ANY) return true; if (typeof version === "string") try { - version = new SemVer$5(version, this.options); + version = new SemVer(version, this.options); } catch (er) { return false; } - return cmp$1(version, this.operator, this.semver, this.options); + return cmp(version, this.operator, this.semver, this.options); } intersects(comp, options) { - if (!(comp instanceof Comparator$3)) throw new TypeError("a Comparator is required"); + if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required"); if (this.operator === "") { if (this.value === "") return true; - return new Range$10(comp.value, options).test(this.value); + return new Range(comp.value, options).test(this.value); } else if (comp.operator === "") { if (comp.value === "") return true; - return new Range$10(this.value, options).test(comp.semver); + return new Range(this.value, options).test(comp.semver); } options = parseOptions(options); if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false; @@ -986,54 +986,54 @@ var require_comparator = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modu if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true; if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true; if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true; - if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true; - if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true; + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true; + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true; return false; } }; - module.exports = Comparator$3; + module.exports = Comparator; const parseOptions = require_parse_options(); const { safeRe: re, t } = require_re(); - const cmp$1 = require_cmp(); + const cmp = require_cmp(); const debug = require_debug(); - const SemVer$5 = require_semver$3(); - const Range$10 = require_range(); -} }); + const SemVer = require_semver$1(); + const Range = require_range(); +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/functions/satisfies.js -var require_satisfies = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/functions/satisfies.js"(exports, module) { - const Range$9 = require_range(); - const satisfies$4 = (version, range, options) => { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/functions/satisfies.js +var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Range = require_range(); + const satisfies = (version, range, options) => { try { - range = new Range$9(range, options); + range = new Range(range, options); } catch (er) { return false; } return range.test(version); }; - module.exports = satisfies$4; -} }); + module.exports = satisfies; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/to-comparators.js -var require_to_comparators = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/to-comparators.js"(exports, module) { - const Range$8 = require_range(); - const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); - module.exports = toComparators$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/to-comparators.js +var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Range = require_range(); + const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module.exports = toComparators; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js -var require_max_satisfying = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js"(exports, module) { - const SemVer$4 = require_semver$3(); - const Range$7 = require_range(); - const maxSatisfying$1 = (versions, range, options) => { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const Range = require_range(); + const maxSatisfying = (versions, range, options) => { let max = null; let maxSV = null; let rangeObj = null; try { - rangeObj = new Range$7(range, options); + rangeObj = new Range(range, options); } catch (er) { return null; } @@ -1041,26 +1041,26 @@ var require_max_satisfying = __commonJS({ "node_modules/.deno/semver@7.7.2/node_ if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; - maxSV = new SemVer$4(max, options); + maxSV = new SemVer(max, options); } } }); return max; }; - module.exports = maxSatisfying$1; -} }); + module.exports = maxSatisfying; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js -var require_min_satisfying = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js"(exports, module) { - const SemVer$3 = require_semver$3(); - const Range$6 = require_range(); - const minSatisfying$1 = (versions, range, options) => { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const Range = require_range(); + const minSatisfying = (versions, range, options) => { let min = null; let minSV = null; let rangeObj = null; try { - rangeObj = new Range$6(range, options); + rangeObj = new Range(range, options); } catch (er) { return null; } @@ -1068,33 +1068,33 @@ var require_min_satisfying = __commonJS({ "node_modules/.deno/semver@7.7.2/node_ if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; - minSV = new SemVer$3(min, options); + minSV = new SemVer(min, options); } } }); return min; }; - module.exports = minSatisfying$1; -} }); + module.exports = minSatisfying; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/min-version.js -var require_min_version = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/min-version.js"(exports, module) { - const SemVer$2 = require_semver$3(); - const Range$5 = require_range(); - const gt$2 = require_gt(); - const minVersion$1 = (range, loose) => { - range = new Range$5(range, loose); - let minver = new SemVer$2("0.0.0"); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/min-version.js +var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const Range = require_range(); + const gt = require_gt(); + const minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); if (range.test(minver)) return minver; - minver = new SemVer$2("0.0.0-0"); + minver = new SemVer("0.0.0-0"); if (range.test(minver)) return minver; minver = null; for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let setMin = null; comparators.forEach((comparator) => { - const compver = new SemVer$2(comparator.semver.version); + const compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) compver.patch++; @@ -1102,75 +1102,75 @@ var require_min_version = __commonJS({ "node_modules/.deno/semver@7.7.2/node_mod compver.raw = compver.format(); case "": case ">=": - if (!setMin || gt$2(compver, setMin)) setMin = compver; + if (!setMin || gt(compver, setMin)) setMin = compver; break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${comparator.operator}`); } }); - if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin; + if (setMin && (!minver || gt(minver, setMin))) minver = setMin; } if (minver && range.test(minver)) return minver; return null; }; - module.exports = minVersion$1; -} }); + module.exports = minVersion; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/valid.js -var require_valid = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/valid.js"(exports, module) { - const Range$4 = require_range(); - const validRange$1 = (range, options) => { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/valid.js +var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Range = require_range(); + const validRange = (range, options) => { try { - return new Range$4(range, options).range || "*"; + return new Range(range, options).range || "*"; } catch (er) { return null; } }; - module.exports = validRange$1; -} }); + module.exports = validRange; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/outside.js -var require_outside = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/outside.js"(exports, module) { - const SemVer$1 = require_semver$3(); - const Comparator$2 = require_comparator(); - const { ANY: ANY$1 } = Comparator$2; - const Range$3 = require_range(); - const satisfies$3 = require_satisfies(); - const gt$1 = require_gt(); - const lt$1 = require_lt(); - const lte$1 = require_lte(); - const gte$1 = require_gte(); - const outside$3 = (version, range, hilo, options) => { - version = new SemVer$1(version, options); - range = new Range$3(range, options); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/outside.js +var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const SemVer = require_semver$1(); + const Comparator = require_comparator(); + const { ANY } = Comparator; + const Range = require_range(); + const satisfies = require_satisfies(); + const gt = require_gt(); + const lt = require_lt(); + const lte = require_lte(); + const gte = require_gte(); + const outside = (version, range, hilo, options) => { + version = new SemVer(version, options); + range = new Range(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": - gtfn = gt$1; - ltefn = lte$1; - ltfn = lt$1; + gtfn = gt; + ltefn = lte; + ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": - gtfn = lt$1; - ltefn = gte$1; - ltfn = gt$1; + gtfn = lt; + ltefn = gte; + ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); } - if (satisfies$3(version, range, options)) return false; + if (satisfies(version, range, options)) return false; for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let high = null; let low = null; comparators.forEach((comparator) => { - if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0"); + if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0"); high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) high = comparator; @@ -1182,57 +1182,54 @@ var require_outside = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules } return true; }; - module.exports = outside$3; -} }); + module.exports = outside; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/gtr.js -var require_gtr = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/gtr.js"(exports, module) { - const outside$2 = require_outside(); - const gtr$1 = (version, range, options) => outside$2(version, range, ">", options); - module.exports = gtr$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/gtr.js +var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const outside = require_outside(); + const gtr = (version, range, options) => outside(version, range, ">", options); + module.exports = gtr; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/ltr.js -var require_ltr = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/ltr.js"(exports, module) { - const outside$1 = require_outside(); - const ltr$1 = (version, range, options) => outside$1(version, range, "<", options); - module.exports = ltr$1; -} }); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/ltr.js +var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const outside = require_outside(); + const ltr = (version, range, options) => outside(version, range, "<", options); + module.exports = ltr; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/intersects.js -var require_intersects = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/intersects.js"(exports, module) { - const Range$2 = require_range(); - const intersects$1 = (r1, r2, options) => { - r1 = new Range$2(r1, options); - r2 = new Range$2(r2, options); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/intersects.js +var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Range = require_range(); + const intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); return r1.intersects(r2, options); }; - module.exports = intersects$1; -} }); + module.exports = intersects; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/simplify.js -var require_simplify = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/simplify.js"(exports, module) { - const satisfies$2 = require_satisfies(); - const compare$2 = require_compare(); +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/simplify.js +var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const satisfies = require_satisfies(); + const compare = require_compare(); module.exports = (versions, range, options) => { const set = []; let first = null; let prev = null; - const v = versions.sort((a, b) => compare$2(a, b, options)); - for (const version of v) { - const included = satisfies$2(version, range, options); - if (included) { - prev = version; - if (!first) first = version; - } else { - if (prev) set.push([first, prev]); - prev = null; - first = null; - } + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version of v) if (satisfies(version, range, options)) { + prev = version; + if (!first) first = version; + } else { + if (prev) set.push([first, prev]); + prev = null; + first = null; } if (first) set.push([first, null]); const ranges = []; @@ -1245,20 +1242,20 @@ var require_simplify = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module const original = typeof range.raw === "string" ? range.raw : String(range); return simplified.length < original.length ? simplified : range; }; -} }); +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/subset.js -var require_subset = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/ranges/subset.js"(exports, module) { - const Range$1 = require_range(); - const Comparator$1 = require_comparator(); - const { ANY } = Comparator$1; - const satisfies$1 = require_satisfies(); - const compare$1 = require_compare(); - const subset$1 = (sub, dom, options = {}) => { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/ranges/subset.js +var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Range = require_range(); + const Comparator = require_comparator(); + const { ANY } = Comparator; + const satisfies = require_satisfies(); + const compare = require_compare(); + const subset = (sub, dom, options = {}) => { if (sub === dom) return true; - sub = new Range$1(sub, options); - dom = new Range$1(dom, options); + sub = new Range(sub, options); + dom = new Range(dom, options); let sawNonNull = false; OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { @@ -1270,8 +1267,8 @@ var require_subset = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/ } return true; }; - const minimumVersionWithPreRelease = [new Comparator$1(">=0.0.0-0")]; - const minimumVersion = [new Comparator$1(">=0.0.0")]; + const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + const minimumVersion = [new Comparator(">=0.0.0")]; const simpleSubset = (sub, dom, options) => { if (sub === dom) return true; if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true; @@ -1279,78 +1276,78 @@ var require_subset = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/ else sub = minimumVersion; if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true; else dom = minimumVersion; - const eqSet = new Set(); - let gt$5, lt$4; - for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt$5 = higherGT(gt$5, c, options); - else if (c.operator === "<" || c.operator === "<=") lt$4 = lowerLT(lt$4, c, options); + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options); + else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options); else eqSet.add(c.semver); if (eqSet.size > 1) return null; let gtltComp; - if (gt$5 && lt$4) { - gtltComp = compare$1(gt$5.semver, lt$4.semver, options); + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); if (gtltComp > 0) return null; - else if (gtltComp === 0 && (gt$5.operator !== ">=" || lt$4.operator !== "<=")) return null; + else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null; } - for (const eq$3 of eqSet) { - if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null; - if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null; - for (const c of dom) if (!satisfies$1(eq$3, String(c), options)) return false; + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) return null; + if (lt && !satisfies(eq, String(lt), options)) return null; + for (const c of dom) if (!satisfies(eq, String(c), options)) return false; return true; } let higher, lower; let hasDomLT, hasDomGT; - let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false; - let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false; - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false; for (const c of dom) { hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; - if (gt$5) { + if (gt) { if (needDomGTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false; } if (c.operator === ">" || c.operator === ">=") { - higher = higherGT(gt$5, c, options); - if (higher === c && higher !== gt$5) return false; - } else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c), options)) return false; + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) return false; + } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false; } - if (lt$4) { + if (lt) { if (needDomLTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false; } if (c.operator === "<" || c.operator === "<=") { - lower = lowerLT(lt$4, c, options); - if (lower === c && lower !== lt$4) return false; - } else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c), options)) return false; + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) return false; + } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false; } - if (!c.operator && (lt$4 || gt$5) && gtltComp !== 0) return false; + if (!c.operator && (lt || gt) && gtltComp !== 0) return false; } - if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false; - if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false; + if (gt && hasDomLT && !lt && gtltComp !== 0) return false; + if (lt && hasDomGT && !gt && gtltComp !== 0) return false; if (needDomGTPre || needDomLTPre) return false; return true; }; const higherGT = (a, b, options) => { if (!a) return b; - const comp = compare$1(a.semver, b.semver, options); + const comp = compare(a.semver, b.semver, options); return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; }; const lowerLT = (a, b, options) => { if (!a) return b; - const comp = compare$1(a.semver, b.semver, options); + const comp = compare(a.semver, b.semver, options); return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; }; - module.exports = subset$1; -} }); + module.exports = subset; +})); //#endregion -//#region node_modules/.deno/semver@7.7.2/node_modules/semver/index.js -var require_semver$2 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_modules/semver/index.js"(exports, module) { +//#region node_modules/.deno/semver@7.7.4/node_modules/semver/index.js +var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => { const internalRe = require_re(); - const constants$1 = require_constants$5(); - const SemVer = require_semver$3(); + const constants = require_constants(); + const SemVer = require_semver$1(); const identifiers = require_identifiers(); - const parse = require_parse$1(); + const parse = require_parse(); const valid = require_valid$1(); const clean = require_clean(); const inc = require_inc(); @@ -1429,17955 +1426,153 @@ var require_semver$2 = __commonJS({ "node_modules/.deno/semver@7.7.2/node_module re: internalRe.re, src: internalRe.src, tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants$1.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants$1.RELEASE_TYPES, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, compareIdentifiers: identifiers.compareIdentifiers, rcompareIdentifiers: identifiers.rcompareIdentifiers }; -} }); -var import_semver = __toESM(require_semver$2(), 1); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/symbols.js -var require_symbols = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/symbols.js"(exports, module) { - module.exports = { - kClose: Symbol("close"), - kDestroy: Symbol("destroy"), - kDispatch: Symbol("dispatch"), - kUrl: Symbol("url"), - kWriting: Symbol("writing"), - kResuming: Symbol("resuming"), - kQueue: Symbol("queue"), - kConnect: Symbol("connect"), - kConnecting: Symbol("connecting"), - kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), - kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), - kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), - kKeepAliveTimeoutValue: Symbol("keep alive timeout"), - kKeepAlive: Symbol("keep alive"), - kHeadersTimeout: Symbol("headers timeout"), - kBodyTimeout: Symbol("body timeout"), - kServerName: Symbol("server name"), - kLocalAddress: Symbol("local address"), - kHost: Symbol("host"), - kNoRef: Symbol("no ref"), - kBodyUsed: Symbol("used"), - kBody: Symbol("abstracted request body"), - kRunning: Symbol("running"), - kBlocking: Symbol("blocking"), - kPending: Symbol("pending"), - kSize: Symbol("size"), - kBusy: Symbol("busy"), - kQueued: Symbol("queued"), - kFree: Symbol("free"), - kConnected: Symbol("connected"), - kClosed: Symbol("closed"), - kNeedDrain: Symbol("need drain"), - kReset: Symbol("reset"), - kDestroyed: Symbol.for("nodejs.stream.destroyed"), - kResume: Symbol("resume"), - kOnError: Symbol("on error"), - kMaxHeadersSize: Symbol("max headers size"), - kRunningIdx: Symbol("running index"), - kPendingIdx: Symbol("pending index"), - kError: Symbol("error"), - kClients: Symbol("clients"), - kClient: Symbol("client"), - kParser: Symbol("parser"), - kOnDestroyed: Symbol("destroy callbacks"), - kPipelining: Symbol("pipelining"), - kSocket: Symbol("socket"), - kHostHeader: Symbol("host header"), - kConnector: Symbol("connector"), - kStrictContentLength: Symbol("strict content length"), - kMaxRedirections: Symbol("maxRedirections"), - kMaxRequests: Symbol("maxRequestsPerClient"), - kProxy: Symbol("proxy agent options"), - kCounter: Symbol("socket request counter"), - kMaxResponseSize: Symbol("max response size"), - kHTTP2Session: Symbol("http2Session"), - kHTTP2SessionState: Symbol("http2Session state"), - kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), - kConstruct: Symbol("constructable"), - kListeners: Symbol("listeners"), - kHTTPContext: Symbol("http context"), - kMaxConcurrentStreams: Symbol("max concurrent streams"), - kNoProxyAgent: Symbol("no proxy agent"), - kHttpProxyAgent: Symbol("http proxy agent"), - kHttpsProxyAgent: Symbol("https proxy agent") - }; -} }); +})); //#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/timers.js -var require_timers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/timers.js"(exports, module) { - /** - * This module offers an optimized timer implementation designed for scenarios - * where high precision is not critical. - * - * The timer achieves faster performance by using a low-resolution approach, - * with an accuracy target of within 500ms. This makes it particularly useful - * for timers with delays of 1 second or more, where exact timing is less - * crucial. - * - * It's important to note that Node.js timers are inherently imprecise, as - * delays can occur due to the event loop being blocked by other operations. - * Consequently, timers may trigger later than their scheduled time. - */ - /** - * The fastNow variable contains the internal fast timer clock value. - * - * @type {number} - */ - let fastNow = 0; - /** - * RESOLUTION_MS represents the target resolution time in milliseconds. - * - * @type {number} - * @default 1000 - */ - const RESOLUTION_MS = 1e3; - /** - * TICK_MS defines the desired interval in milliseconds between each tick. - * The target value is set to half the resolution time, minus 1 ms, to account - * for potential event loop overhead. - * - * @type {number} - * @default 499 - */ - const TICK_MS = (RESOLUTION_MS >> 1) - 1; - /** - * fastNowTimeout is a Node.js timer used to manage and process - * the FastTimers stored in the `fastTimers` array. - * - * @type {NodeJS.Timeout} - */ - let fastNowTimeout; - /** - * The kFastTimer symbol is used to identify FastTimer instances. - * - * @type {Symbol} - */ - const kFastTimer = Symbol("kFastTimer"); - /** - * The fastTimers array contains all active FastTimers. - * - * @type {FastTimer[]} - */ - const fastTimers = []; - /** - * These constants represent the various states of a FastTimer. - */ - /** - * The `NOT_IN_LIST` constant indicates that the FastTimer is not included - * in the `fastTimers` array. Timers with this status will not be processed - * during the next tick by the `onTick` function. - * - * A FastTimer can be re-added to the `fastTimers` array by invoking the - * `refresh` method on the FastTimer instance. - * - * @type {-2} - */ - const NOT_IN_LIST = -2; - /** - * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled - * for removal from the `fastTimers` array. A FastTimer in this state will - * be removed in the next tick by the `onTick` function and will no longer - * be processed. - * - * This status is also set when the `clear` method is called on the FastTimer instance. - * - * @type {-1} - */ - const TO_BE_CLEARED = -1; - /** - * The `PENDING` constant signifies that the FastTimer is awaiting processing - * in the next tick by the `onTick` function. Timers with this status will have - * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. - * - * @type {0} - */ - const PENDING = 0; - /** - * The `ACTIVE` constant indicates that the FastTimer is active and waiting - * for its timer to expire. During the next tick, the `onTick` function will - * check if the timer has expired, and if so, it will execute the associated callback. - * - * @type {1} - */ - const ACTIVE = 1; - /** - * The onTick function processes the fastTimers array. - * - * @returns {void} - */ - function onTick() { - /** - * Increment the fastNow value by the TICK_MS value, despite the actual time - * that has passed since the last tick. This approach ensures independence - * from the system clock and delays caused by a blocked event loop. - * - * @type {number} - */ - fastNow += TICK_MS; - /** - * The `idx` variable is used to iterate over the `fastTimers` array. - * Expired timers are removed by replacing them with the last element in the array. - * Consequently, `idx` is only incremented when the current element is not removed. - * - * @type {number} - */ - let idx = 0; - /** - * The len variable will contain the length of the fastTimers array - * and will be decremented when a FastTimer should be removed from the - * fastTimers array. - * - * @type {number} - */ - let len = fastTimers.length; - while (idx < len) { - /** - * @type {FastTimer} - */ - const timer = fastTimers[idx]; - if (timer._state === PENDING) { - timer._idleStart = fastNow - TICK_MS; - timer._state = ACTIVE; - } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { - timer._state = TO_BE_CLEARED; - timer._idleStart = -1; - timer._onTimeout(timer._timerArg); - } - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST; - if (--len !== 0) fastTimers[idx] = fastTimers[len]; - } else ++idx; - } - fastTimers.length = len; - if (fastTimers.length !== 0) refreshTimeout(); - } - function refreshTimeout() { - if (fastNowTimeout) fastNowTimeout.refresh(); - else { - clearTimeout(fastNowTimeout); - fastNowTimeout = setTimeout(onTick, TICK_MS); - if (fastNowTimeout.unref) fastNowTimeout.unref(); +//#region src/fetch.ts +var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1); +var import_core = /* @__PURE__ */ __toESM(require_core(), 1); +var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1); +/** +* A fetch-compatible wrapper for @actions/http-client that maintains +* the exact signature and behavior of the original src/version.ts function. +*/ +async function fetchWithRetries(url, maxRetries = 5) { + const client = new import_lib.HttpClient(); + let sleepMs = 250; + let iterationCount = 0; + while (true) { + iterationCount++; + try { + const res = await client.get(url); + const fetchStyleResponse = { + status: res.message.statusCode ?? 0, + statusText: res.message.statusMessage ?? "", + ok: (res.message.statusCode ?? 0) >= 200 && (res.message.statusCode ?? 0) < 300, + url, + _rawBody: await res.readBody(), + _cachedJson: void 0, + headers: { + get: (name) => res.message.headers[name.toLowerCase()]?.toString() ?? null, + has: (name) => name.toLowerCase() in res.message.headers, + entries: () => Object.entries(res.message.headers).map(([k, v]) => [k, String(v)]) + }, + text() { + return Promise.resolve(this._rawBody); + }, + json() { + if (this._cachedJson === void 0) this._cachedJson = JSON.parse(this._rawBody); + return Promise.resolve(this._cachedJson); + } + }; + if (fetchStyleResponse.status === 200 || iterationCount > maxRetries) return fetchStyleResponse; + } catch (err) { + if (iterationCount > maxRetries) throw err; } + console$1.warn(`Failed fetching. Retrying in ${sleepMs}ms...`); + await new Promise((resolve) => setTimeout$1(resolve, sleepMs)); + sleepMs = Math.min(sleepMs * 2, 1e4); } - /** - * The `FastTimer` class is a data structure designed to store and manage - * timer information. - */ - var FastTimer = class { - [kFastTimer] = true; - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST; - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1; - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1; - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout; - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg; - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor(callback, delay$2, arg) { - this._onTimeout = callback; - this._idleTimeout = delay$2; - this._timerArg = arg; - this.refresh(); - } - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh() { - if (this._state === NOT_IN_LIST) fastTimers.push(this); - if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); - this._state = PENDING; - } - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear() { - this._state = TO_BE_CLEARED; - this._idleStart = -1; - } - }; - /** - * This module exports a setTimeout and clearTimeout function that can be - * used as a drop-in replacement for the native functions. - */ - module.exports = { - setTimeout(callback, delay$2, arg) { - return delay$2 <= RESOLUTION_MS ? setTimeout(callback, delay$2, arg) : new FastTimer(callback, delay$2, arg); - }, - clearTimeout(timeout) { - if (timeout[kFastTimer]) - /** - * @type {FastTimer} - */ - timeout.clear(); - else clearTimeout(timeout); - }, - setFastTimeout(callback, delay$2, arg) { - return new FastTimer(callback, delay$2, arg); - }, - clearFastTimeout(timeout) { - timeout.clear(); - }, - now() { - return fastNow; - }, - tick(delay$2 = 0) { - fastNow += delay$2 - RESOLUTION_MS + 1; - onTick(); - onTick(); - }, - reset() { - fastNow = 0; - fastTimers.length = 0; - clearTimeout(fastNowTimeout); - fastNowTimeout = null; - }, - kFastTimer - }; -} }); +} //#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/errors.js -var require_errors = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/errors.js"(exports, module) { - var UndiciError$2 = class extends Error { - constructor(message, options) { - super(message, options); - this.name = "UndiciError"; - this.code = "UND_ERR"; - } - }; - var ConnectTimeoutError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "ConnectTimeoutError"; - this.message = message || "Connect Timeout Error"; - this.code = "UND_ERR_CONNECT_TIMEOUT"; - } - }; - var HeadersTimeoutError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "HeadersTimeoutError"; - this.message = message || "Headers Timeout Error"; - this.code = "UND_ERR_HEADERS_TIMEOUT"; - } - }; - var HeadersOverflowError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "HeadersOverflowError"; - this.message = message || "Headers Overflow Error"; - this.code = "UND_ERR_HEADERS_OVERFLOW"; - } - }; - var BodyTimeoutError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "BodyTimeoutError"; - this.message = message || "Body Timeout Error"; - this.code = "UND_ERR_BODY_TIMEOUT"; - } - }; - var ResponseStatusCodeError = class extends UndiciError$2 { - constructor(message, statusCode, headers, body) { - super(message); - this.name = "ResponseStatusCodeError"; - this.message = message || "Response Status Code Error"; - this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body; - this.status = statusCode; - this.statusCode = statusCode; - this.headers = headers; - } - }; - var InvalidArgumentError$29 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "InvalidArgumentError"; - this.message = message || "Invalid Argument Error"; - this.code = "UND_ERR_INVALID_ARG"; - } - }; - var InvalidReturnValueError$2 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "InvalidReturnValueError"; - this.message = message || "Invalid Return Value Error"; - this.code = "UND_ERR_INVALID_RETURN_VALUE"; - } - }; - var AbortError$2 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "AbortError"; - this.message = message || "The operation was aborted"; - } - }; - var RequestAbortedError$8 = class extends AbortError$2 { - constructor(message) { - super(message); - this.name = "AbortError"; - this.message = message || "Request aborted"; - this.code = "UND_ERR_ABORTED"; - } - }; - var InformationalError$4 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "InformationalError"; - this.message = message || "Request information"; - this.code = "UND_ERR_INFO"; - } - }; - var RequestContentLengthMismatchError$2 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "RequestContentLengthMismatchError"; - this.message = message || "Request body length does not match content-length header"; - this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; - } - }; - var ResponseContentLengthMismatchError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "ResponseContentLengthMismatchError"; - this.message = message || "Response body length does not match content-length header"; - this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; - } - }; - var ClientDestroyedError$2 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "ClientDestroyedError"; - this.message = message || "The client is destroyed"; - this.code = "UND_ERR_DESTROYED"; - } +//#region src/version.ts +const GIT_HASH_RE = /^[0-9a-fA-F]{40}$/; +/** Parses the version from the user into a structure */ +function parseVersionRange(version) { + version = String(version) || "2.x"; + version = version.trim(); + if (version === "canary") return { + range: "latest", + kind: "canary" }; - var ClientClosedError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "ClientClosedError"; - this.message = message || "The client is closed"; - this.code = "UND_ERR_CLOSED"; - } + if (version === "rc") return { + range: "latest", + kind: "rc" }; - var SocketError$4 = class extends UndiciError$2 { - constructor(message, socket) { - super(message); - this.name = "SocketError"; - this.message = message || "Socket error"; - this.code = "UND_ERR_SOCKET"; - this.socket = socket; - } + if (version === "latest" || version === "stable") return { + range: "latest", + kind: "stable" }; - var NotSupportedError$2 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "NotSupportedError"; - this.message = message || "Not supported error"; - this.code = "UND_ERR_NOT_SUPPORTED"; - } + if (version === "lts") return { + range: "latest", + kind: "lts" }; - var BalancedPoolMissingUpstreamError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "MissingUpstreamError"; - this.message = message || "No upstream has been added to the BalancedPool"; - this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; - } + if (GIT_HASH_RE.test(version)) return { + range: version, + kind: "canary" }; - var HTTPParserError$1 = class extends Error { - constructor(message, code, data) { - super(message); - this.name = "HTTPParserError"; - this.code = code ? `HPE_${code}` : void 0; - this.data = data ? data.toString() : void 0; - } + const range = import_semver.default.validRange(version); + if (range !== null) return { + range, + kind: "stable" }; - var ResponseExceededMaxSizeError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - this.name = "ResponseExceededMaxSizeError"; - this.message = message || "Response content exceeded max size"; - this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; - } + return null; +} +/** Parses the version from the version file */ +function getDenoVersionFromFile(versionFilePath) { + if (!fs$3.existsSync(versionFilePath)) throw new Error(`The specified node version file at: ${versionFilePath} does not exist`); + const contents = fs$3.readFileSync(versionFilePath, "utf8"); + return contents.match(/^deno\s+v?(?[^\s]+)$/m)?.groups?.version || contents.trim(); +} +function resolveVersion({ range, kind }) { + if (kind === "canary") return resolveCanary(range); + else if (kind === "rc") return resolveReleaseCandidate(); + else if (kind === "lts") return resolveLTS(); + else return resolveRelease(range); +} +async function resolveCanary(range) { + if (range === "latest") { + const res = await fetchWithRetries("https://dl.deno.land/canary-latest.txt"); + if (res.status !== 200) throw new Error("Failed to fetch canary version info from dl.deno.land. Please try again later."); + return { + version: (await res.text()).trim(), + kind: "canary" + }; + } else return { + version: range, + kind: "canary" }; - var RequestRetryError$1 = class extends UndiciError$2 { - constructor(message, code, { headers, data }) { - super(message); - this.name = "RequestRetryError"; - this.message = message || "Request retry error"; - this.code = "UND_ERR_REQ_RETRY"; - this.statusCode = code; - this.data = data; - this.headers = headers; - } +} +async function resolveReleaseCandidate() { + const res = await fetchWithRetries("https://dl.deno.land/release-rc-latest.txt"); + if (res.status !== 200) throw new Error("Failed to fetch release candidate version info from dl.deno.land. Please try again later."); + const version = import_semver.default.clean((await res.text()).trim()); + if (version === null) throw new Error("Failed to parse release candidate version."); + return { + version, + kind: "rc" }; - var ResponseError$1 = class extends UndiciError$2 { - constructor(message, code, { headers, body }) { - super(message); - this.name = "ResponseError"; - this.message = message || "Response error"; - this.code = "UND_ERR_RESPONSE"; - this.statusCode = code; - this.body = body; - this.headers = headers; - } +} +async function resolveLTS() { + const res = await fetchWithRetries("https://dl.deno.land/release-lts-latest.txt"); + if (res.status !== 200) throw new Error("Failed to fetch LTS version info from dl.deno.land. Please try again later."); + const version = import_semver.default.clean((await res.text()).trim()); + if (version === null) throw new Error("Failed to parse LTS version."); + return { + version, + kind: "lts" }; - var SecureProxyConnectionError$1 = class extends UndiciError$2 { - constructor(cause, message, options = {}) { - super(message, { - cause, - ...options - }); - this.name = "SecureProxyConnectionError"; - this.message = message || "Secure Proxy Connection failed"; - this.code = "UND_ERR_PRX_TLS"; - this.cause = cause; +} +async function resolveRelease(range) { + if (range === "latest") { + const res = await fetchWithRetries("https://github.com/denoland/docs/raw/refs/heads/main/replacements.json"); + if (res.status !== 200) throw new Error("Failed to fetch release version info from github.com. Please try again later."); + let version = ""; + try { + const replacementsJson = await res.json(); + if (typeof replacementsJson !== "object" || replacementsJson === null) throw new Error("Fetched CLI version info is invalid."); + if (!("CLI_VERSION" in replacementsJson)) throw new Error("Fetched CLI version info is invalid."); + version = replacementsJson.CLI_VERSION.trim(); + } catch { + if ((await fetchWithRetries("https://github.com/denoland/deno/raw/refs/heads/main/cli/lib/version.txt")).status !== 200) throw new Error("Failed to fetch release version info from github.com. Please try again later."); + version = (await res.text()).trim(); } - }; - module.exports = { - AbortError: AbortError$2, - HTTPParserError: HTTPParserError$1, - UndiciError: UndiciError$2, - HeadersTimeoutError: HeadersTimeoutError$1, - HeadersOverflowError: HeadersOverflowError$1, - BodyTimeoutError: BodyTimeoutError$1, - RequestContentLengthMismatchError: RequestContentLengthMismatchError$2, - ConnectTimeoutError: ConnectTimeoutError$1, - ResponseStatusCodeError, - InvalidArgumentError: InvalidArgumentError$29, - InvalidReturnValueError: InvalidReturnValueError$2, - RequestAbortedError: RequestAbortedError$8, - ClientDestroyedError: ClientDestroyedError$2, - ClientClosedError: ClientClosedError$1, - InformationalError: InformationalError$4, - SocketError: SocketError$4, - NotSupportedError: NotSupportedError$2, - ResponseContentLengthMismatchError: ResponseContentLengthMismatchError$1, - BalancedPoolMissingUpstreamError: BalancedPoolMissingUpstreamError$1, - ResponseExceededMaxSizeError: ResponseExceededMaxSizeError$1, - RequestRetryError: RequestRetryError$1, - ResponseError: ResponseError$1, - SecureProxyConnectionError: SecureProxyConnectionError$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/constants.js -var require_constants$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/constants.js"(exports, module) { - /** - * @see https://developer.mozilla.org/docs/Web/HTTP/Headers - */ - const wellknownHeaderNames$1 = [ - "Accept", - "Accept-Encoding", - "Accept-Language", - "Accept-Ranges", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Age", - "Allow", - "Alt-Svc", - "Alt-Used", - "Authorization", - "Cache-Control", - "Clear-Site-Data", - "Connection", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-Length", - "Content-Location", - "Content-Range", - "Content-Security-Policy", - "Content-Security-Policy-Report-Only", - "Content-Type", - "Cookie", - "Cross-Origin-Embedder-Policy", - "Cross-Origin-Opener-Policy", - "Cross-Origin-Resource-Policy", - "Date", - "Device-Memory", - "Downlink", - "ECT", - "ETag", - "Expect", - "Expect-CT", - "Expires", - "Forwarded", - "From", - "Host", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Range", - "If-Unmodified-Since", - "Keep-Alive", - "Last-Modified", - "Link", - "Location", - "Max-Forwards", - "Origin", - "Permissions-Policy", - "Pragma", - "Proxy-Authenticate", - "Proxy-Authorization", - "RTT", - "Range", - "Referer", - "Referrer-Policy", - "Refresh", - "Retry-After", - "Sec-WebSocket-Accept", - "Sec-WebSocket-Extensions", - "Sec-WebSocket-Key", - "Sec-WebSocket-Protocol", - "Sec-WebSocket-Version", - "Server", - "Server-Timing", - "Service-Worker-Allowed", - "Service-Worker-Navigation-Preload", - "Set-Cookie", - "SourceMap", - "Strict-Transport-Security", - "Supports-Loading-Mode", - "TE", - "Timing-Allow-Origin", - "Trailer", - "Transfer-Encoding", - "Upgrade", - "Upgrade-Insecure-Requests", - "User-Agent", - "Vary", - "Via", - "WWW-Authenticate", - "X-Content-Type-Options", - "X-DNS-Prefetch-Control", - "X-Frame-Options", - "X-Permitted-Cross-Domain-Policies", - "X-Powered-By", - "X-Requested-With", - "X-XSS-Protection" - ]; - /** @type {Record, string>} */ - const headerNameLowerCasedRecord$3 = {}; - Object.setPrototypeOf(headerNameLowerCasedRecord$3, null); - /** - * @type {Record, Buffer>} - */ - const wellknownHeaderNameBuffers = {}; - Object.setPrototypeOf(wellknownHeaderNameBuffers, null); - /** - * @param {string} header Lowercased header - * @returns {Buffer} - */ - function getHeaderNameAsBuffer(header) { - let buffer$1 = wellknownHeaderNameBuffers[header]; - if (buffer$1 === void 0) buffer$1 = Buffer.from(header); - return buffer$1; - } - for (let i = 0; i < wellknownHeaderNames$1.length; ++i) { - const key = wellknownHeaderNames$1[i]; - const lowerCasedKey = key.toLowerCase(); - headerNameLowerCasedRecord$3[key] = headerNameLowerCasedRecord$3[lowerCasedKey] = lowerCasedKey; - } - module.exports = { - wellknownHeaderNames: wellknownHeaderNames$1, - headerNameLowerCasedRecord: headerNameLowerCasedRecord$3, - getHeaderNameAsBuffer - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/tree.js -var require_tree = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/tree.js"(exports, module) { - const { wellknownHeaderNames, headerNameLowerCasedRecord: headerNameLowerCasedRecord$2 } = require_constants$4(); - var TstNode = class TstNode { - /** @type {any} */ - value = null; - /** @type {null | TstNode} */ - left = null; - /** @type {null | TstNode} */ - middle = null; - /** @type {null | TstNode} */ - right = null; - /** @type {number} */ - code; - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor(key, value, index) { - if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); - const code = this.code = key.charCodeAt(index); - if (code > 127) throw new TypeError("key must be ascii string"); - if (key.length !== ++index) this.middle = new TstNode(key, value, index); - else this.value = value; - } - /** - * @param {string} key - * @param {any} value - * @returns {void} - */ - add(key, value) { - const length = key.length; - if (length === 0) throw new TypeError("Unreachable"); - let index = 0; - /** - * @type {TstNode} - */ - let node = this; - while (true) { - const code = key.charCodeAt(index); - if (code > 127) throw new TypeError("key must be ascii string"); - if (node.code === code) if (length === ++index) { - node.value = value; - break; - } else if (node.middle !== null) node = node.middle; - else { - node.middle = new TstNode(key, value, index); - break; - } - else if (node.code < code) if (node.left !== null) node = node.left; - else { - node.left = new TstNode(key, value, index); - break; - } - else if (node.right !== null) node = node.right; - else { - node.right = new TstNode(key, value, index); - break; - } - } - } - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search(key) { - const keylength = key.length; - let index = 0; - /** - * @type {TstNode|null} - */ - let node = this; - while (node !== null && index < keylength) { - let code = key[index]; - if (code <= 90 && code >= 65) code |= 32; - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) return node; - node = node.middle; - break; - } - node = node.code < code ? node.left : node.right; - } - } - return null; - } - }; - var TernarySearchTree = class { - /** @type {TstNode | null} */ - node = null; - /** - * @param {string} key - * @param {any} value - * @returns {void} - * */ - insert(key, value) { - if (this.node === null) this.node = new TstNode(key, value, 0); - else this.node.add(key, value); - } - /** - * @param {Uint8Array} key - * @returns {any} - */ - lookup(key) { - return this.node?.search(key)?.value ?? null; - } - }; - const tree$1 = new TernarySearchTree(); - for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord$2[wellknownHeaderNames[i]]; - tree$1.insert(key, key); - } - module.exports = { - TernarySearchTree, - tree: tree$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/util.js -var require_util$5 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/util.js"(exports, module) { - const assert$29 = __require("node:assert"); - const { kDestroyed: kDestroyed$2, kBodyUsed: kBodyUsed$1, kListeners, kBody: kBody$2 } = require_symbols(); - const { IncomingMessage } = __require("node:http"); - const stream$2 = __require("node:stream"); - const net$2 = __require("node:net"); - const { Blob: Blob$2 } = __require("node:buffer"); - const nodeUtil$3 = __require("node:util"); - const { stringify: stringify$2 } = __require("node:querystring"); - const { EventEmitter: EE$2 } = __require("node:events"); - const timers$1 = require_timers(); - const { InvalidArgumentError: InvalidArgumentError$28, ConnectTimeoutError } = require_errors(); - const { headerNameLowerCasedRecord: headerNameLowerCasedRecord$1 } = require_constants$4(); - const { tree } = require_tree(); - const [nodeMajor, nodeMinor] = process.versions.node.split(".", 2).map((v) => Number(v)); - var BodyAsyncIterable$1 = class { - constructor(body) { - this[kBody$2] = body; - this[kBodyUsed$1] = false; - } - async *[Symbol.asyncIterator]() { - assert$29(!this[kBodyUsed$1], "disturbed"); - this[kBodyUsed$1] = true; - yield* this[kBody$2]; - } - }; - function noop$9() {} - /** - * @param {*} body - * @returns {*} - */ - function wrapRequestBody$1(body) { - if (isStream$1(body)) { - if (bodyLength(body) === 0) body.on("data", function() { - assert$29(false); - }); - if (typeof body.readableDidRead !== "boolean") { - body[kBodyUsed$1] = false; - EE$2.prototype.on.call(body, "data", function() { - this[kBodyUsed$1] = true; - }); - } - return body; - } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable$1(body); - else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable$1(body)) return new BodyAsyncIterable$1(body); - else return body; - } - /** - * @param {*} obj - * @returns {obj is import('node:stream').Stream} - */ - function isStream$1(obj) { - return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; - } - /** - * @param {*} object - * @returns {object is Blob} - * based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) - */ - function isBlobLike$1(object) { - if (object === null) return false; - else if (object instanceof Blob$2) return true; - else if (typeof object !== "object") return false; - else { - const sTag = object[Symbol.toStringTag]; - return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); - } - } - /** - * @param {string} url The URL to add the query params to - * @param {import('node:querystring').ParsedUrlQueryInput} queryParams The object to serialize into a URL query string - * @returns {string} The URL with the query params added - */ - function serializePathWithQuery$3(url, queryParams) { - if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); - const stringified = stringify$2(queryParams); - if (stringified) url += "?" + stringified; - return url; - } - /** - * @param {number|string|undefined} port - * @returns {boolean} - */ - function isValidPort(port) { - const value = parseInt(port, 10); - return value === Number(port) && value >= 0 && value <= 65535; - } - /** - * Check if the value is a valid http or https prefixed string. - * - * @param {string} value - * @returns {boolean} - */ - function isHttpOrHttpsPrefixed(value) { - return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); - } - /** - * @param {string|URL|Record} url - * @returns {URL} - */ - function parseURL(url) { - if (typeof url === "string") { - /** - * @type {URL} - */ - url = new URL(url); - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$28("Invalid URL protocol: the URL must start with `http:` or `https:`."); - return url; - } - if (!url || typeof url !== "object") throw new InvalidArgumentError$28("Invalid URL: The URL argument must be a non-null object."); - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError$28("Invalid URL: port must be a valid integer or a string representation of an integer."); - if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError$28("Invalid URL path: the path must be a string or null/undefined."); - if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError$28("Invalid URL pathname: the pathname must be a string or null/undefined."); - if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError$28("Invalid URL hostname: the hostname must be a string or null/undefined."); - if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError$28("Invalid URL origin: the origin must be a string or null/undefined."); - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$28("Invalid URL protocol: the URL must start with `http:` or `https:`."); - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path$3 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); - if (path$3 && path$3[0] !== "/") path$3 = `/${path$3}`; - return new URL(`${origin}${path$3}`); - } - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$28("Invalid URL protocol: the URL must start with `http:` or `https:`."); - return url; - } - /** - * @param {string|URL|Record} url - * @returns {URL} - */ - function parseOrigin$1(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError$28("invalid url"); - return url; - } - /** - * @param {string} host - * @returns {string} - */ - function getHostname(host) { - if (host[0] === "[") { - const idx$1 = host.indexOf("]"); - assert$29(idx$1 !== -1); - return host.substring(1, idx$1); - } - const idx = host.indexOf(":"); - if (idx === -1) return host; - return host.substring(0, idx); - } - /** - * IP addresses are not valid server names per RFC6066 - * Currently, the only server names supported are DNS hostnames - * @param {string|null} host - * @returns {string|null} - */ - function getServerName$1(host) { - if (!host) return null; - assert$29(typeof host === "string"); - const servername = getHostname(host); - if (net$2.isIP(servername)) return ""; - return servername; - } - /** - * @function - * @template T - * @param {T} obj - * @returns {T} - */ - function deepClone(obj) { - return JSON.parse(JSON.stringify(obj)); - } - /** - * @param {*} obj - * @returns {obj is AsyncIterable} - */ - function isAsyncIterable(obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); - } - /** - * @param {*} obj - * @returns {obj is Iterable} - */ - function isIterable$1(obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); - } - /** - * @param {Blob|Buffer|import ('stream').Stream} body - * @returns {number|null} - */ - function bodyLength(body) { - if (body == null) return 0; - else if (isStream$1(body)) { - const state = body._readableState; - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if (isBlobLike$1(body)) return body.size != null ? body.size : null; - else if (isBuffer$1(body)) return body.byteLength; - return null; - } - /** - * @param {import ('stream').Stream} body - * @returns {boolean} - */ - function isDestroyed(body) { - return body && !!(body.destroyed || body[kDestroyed$2] || stream$2.isDestroyed?.(body)); - } - /** - * @param {import ('stream').Stream} stream - * @param {Error} [err] - * @returns {void} - */ - function destroy$1(stream$3, err) { - if (stream$3 == null || !isStream$1(stream$3) || isDestroyed(stream$3)) return; - if (typeof stream$3.destroy === "function") { - if (Object.getPrototypeOf(stream$3).constructor === IncomingMessage) stream$3.socket = null; - stream$3.destroy(err); - } else if (err) queueMicrotask(() => { - stream$3.emit("error", err); - }); - if (stream$3.destroyed !== true) stream$3[kDestroyed$2] = true; - } - const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - /** - * @param {string} val - * @returns {number | null} - */ - function parseKeepAliveTimeout(val) { - const m = val.match(KEEPALIVE_TIMEOUT_EXPR); - return m ? parseInt(m[1], 10) * 1e3 : null; - } - /** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ - function headerNameToString(value) { - return typeof value === "string" ? headerNameLowerCasedRecord$1[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); - } - /** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ - function bufferToLowerCasedHeaderName$2(value) { - return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); - } - /** - * @param {(Buffer | string)[]} headers - * @param {Record} [obj] - * @returns {Record} - */ - function parseHeaders$1(headers, obj) { - if (obj === void 0) obj = {}; - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]); - let val = obj[key]; - if (val) { - if (typeof val === "string") { - val = [val]; - obj[key] = val; - } - val.push(headers[i + 1].toString("utf8")); - } else { - const headersValue = headers[i + 1]; - if (typeof headersValue === "string") obj[key] = headersValue; - else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); - } - } - if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); - return obj; - } - /** - * @param {Buffer[]} headers - * @returns {string[]} - */ - function parseRawHeaders(headers) { - const headersLength = headers.length; - /** - * @type {string[]} - */ - const ret = new Array(headersLength); - let hasContentLength = false; - let contentDispositionIdx = -1; - let key; - let val; - let kLen = 0; - for (let n = 0; n < headersLength; n += 2) { - key = headers[n]; - val = headers[n + 1]; - typeof key !== "string" && (key = key.toString()); - typeof val !== "string" && (val = val.toString("utf8")); - kLen = key.length; - if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) hasContentLength = true; - else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = n + 1; - ret[n] = key; - ret[n + 1] = val; - } - if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); - return ret; - } - /** - * @param {string[]} headers - * @param {Buffer[]} headers - */ - function encodeRawHeaders(headers) { - if (!Array.isArray(headers)) throw new TypeError("expected headers to be an array"); - return headers.map((x) => Buffer.from(x)); - } - /** - * @param {*} buffer - * @returns {buffer is Buffer} - */ - function isBuffer$1(buffer$1) { - return buffer$1 instanceof Uint8Array || Buffer.isBuffer(buffer$1); - } - /** - * Asserts that the handler object is a request handler. - * - * @param {object} handler - * @param {string} method - * @param {string} [upgrade] - * @returns {asserts handler is import('../api/api-request').RequestHandler} - */ - function assertRequestHandler$1(handler, method, upgrade$1) { - if (!handler || typeof handler !== "object") throw new InvalidArgumentError$28("handler must be an object"); - if (typeof handler.onRequestStart === "function") return; - if (typeof handler.onConnect !== "function") throw new InvalidArgumentError$28("invalid onConnect method"); - if (typeof handler.onError !== "function") throw new InvalidArgumentError$28("invalid onError method"); - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError$28("invalid onBodySent method"); - if (upgrade$1 || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError$28("invalid onUpgrade method"); - } else { - if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError$28("invalid onHeaders method"); - if (typeof handler.onData !== "function") throw new InvalidArgumentError$28("invalid onData method"); - if (typeof handler.onComplete !== "function") throw new InvalidArgumentError$28("invalid onComplete method"); - } - } - /** - * A body is disturbed if it has been read from and it cannot be re-used without - * losing state or data. - * @param {import('node:stream').Readable} body - * @returns {boolean} - */ - function isDisturbed$3(body) { - return !!(body && (stream$2.isDisturbed(body) || body[kBodyUsed$1])); - } - /** - * @typedef {object} SocketInfo - * @property {string} [localAddress] - * @property {number} [localPort] - * @property {string} [remoteAddress] - * @property {number} [remotePort] - * @property {string} [remoteFamily] - * @property {number} [timeout] - * @property {number} bytesWritten - * @property {number} bytesRead - */ - /** - * @param {import('net').Socket} socket - * @returns {SocketInfo} - */ - function getSocketInfo(socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - }; - } - /** - * @param {Iterable} iterable - * @returns {ReadableStream} - */ - function ReadableStreamFrom$3(iterable) { - let iterator; - return new ReadableStream({ - async start() { - iterator = iterable[Symbol.asyncIterator](); - }, - pull(controller) { - async function pull() { - const { done, value } = await iterator.next(); - if (done) queueMicrotask(() => { - controller.close(); - controller.byobRequest?.respond(0); - }); - else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); - else return await pull(); - } - } - return pull(); - }, - async cancel() { - await iterator.return(); - }, - type: "bytes" - }); - } - /** - * The object should be a FormData instance and contains all the required - * methods. - * @param {*} object - * @returns {object is FormData} - */ - function isFormDataLike$1(object) { - return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; - } - function addAbortListener$2(signal, listener) { - if ("addEventListener" in signal) { - signal.addEventListener("abort", listener, { once: true }); - return () => signal.removeEventListener("abort", listener); - } - signal.once("abort", listener); - return () => signal.removeListener("abort", listener); - } - /** - * @function - * @param {string} value - * @returns {string} - */ - const toUSVString$1 = (() => { - if (typeof String.prototype.toWellFormed === "function") - /** - * @param {string} value - * @returns {string} - */ - return (value) => `${value}`.toWellFormed(); - else - /** - * @param {string} value - * @returns {string} - */ - return nodeUtil$3.toUSVString; - })(); - /** - * @param {*} value - * @returns {boolean} - */ - const isUSVString$1 = (() => { - if (typeof String.prototype.isWellFormed === "function") - /** - * @param {*} value - * @returns {boolean} - */ - return (value) => `${value}`.isWellFormed(); - else - /** - * @param {*} value - * @returns {boolean} - */ - return (value) => toUSVString$1(value) === `${value}`; - })(); - /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - * @returns {boolean} - */ - function isTokenCharCode(c) { - switch (c) { - case 34: - case 40: - case 41: - case 44: - case 47: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 91: - case 92: - case 93: - case 123: - case 125: return false; - default: return c >= 33 && c <= 126; - } - } - /** - * @param {string} characters - * @returns {boolean} - */ - function isValidHTTPToken$3(characters) { - if (characters.length === 0) return false; - for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; - return true; - } - /** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ - const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - /** - * @param {string} characters - * @returns {boolean} - */ - function isValidHeaderValue$3(characters) { - return !headerCharRegex.test(characters); - } - const rangeHeaderRegex = /^bytes (\d+)-(\d+)\/(\d+)?$/; - /** - * @typedef {object} RangeHeader - * @property {number} start - * @property {number | null} end - * @property {number | null} size - */ - /** - * Parse accordingly to RFC 9110 - * @see https://www.rfc-editor.org/rfc/rfc9110#field.content-range - * @param {string} [range] - * @returns {RangeHeader|null} - */ - function parseRangeHeader$1(range) { - if (range == null || range === "") return { - start: 0, - end: null, - size: null - }; - const m = range ? range.match(rangeHeaderRegex) : null; - return m ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } : null; - } - /** - * @template {import("events").EventEmitter} T - * @param {T} obj - * @param {string} name - * @param {(...args: any[]) => void} listener - * @returns {T} - */ - function addListener(obj, name, listener) { - const listeners = obj[kListeners] ??= []; - listeners.push([name, listener]); - obj.on(name, listener); - return obj; - } - /** - * @template {import("events").EventEmitter} T - * @param {T} obj - * @returns {T} - */ - function removeAllListeners$1(obj) { - if (obj[kListeners] != null) { - for (const [name, listener] of obj[kListeners]) obj.removeListener(name, listener); - obj[kListeners] = null; - } - return obj; - } - /** - * @param {import ('../dispatcher/client')} client - * @param {import ('../core/request')} request - * @param {Error} err - */ - function errorRequest(client, request$1, err) { - try { - request$1.onError(err); - assert$29(request$1.aborted); - } catch (err$1) { - client.emit("error", err$1); - } - } - /** - * @param {WeakRef} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ - const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { - if (!opts.timeout) return noop$9; - let s1 = null; - let s2 = null; - const fastTimer = timers$1.setFastTimeout(() => { - s1 = setImmediate(() => { - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); - }); - }, opts.timeout); - return () => { - timers$1.clearFastTimeout(fastTimer); - clearImmediate(s1); - clearImmediate(s2); - }; - } : (socketWeakRef, opts) => { - if (!opts.timeout) return noop$9; - let s1 = null; - const fastTimer = timers$1.setFastTimeout(() => { - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts); - }); - }, opts.timeout); - return () => { - timers$1.clearFastTimeout(fastTimer); - clearImmediate(s1); - }; - }; - /** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ - function onConnectTimeout(socket, opts) { - if (socket == null) return; - let message = "Connect Timeout Error"; - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; - else message += ` (attempted address: ${opts.hostname}:${opts.port},`; - message += ` timeout: ${opts.timeout}ms)`; - destroy$1(socket, new ConnectTimeoutError(message)); - } - const kEnumerableProperty$11 = Object.create(null); - kEnumerableProperty$11.enumerable = true; - const normalizedMethodRecordsBase$2 = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" - }; - const normalizedMethodRecords$2 = { - ...normalizedMethodRecordsBase$2, - patch: "patch", - PATCH: "PATCH" - }; - Object.setPrototypeOf(normalizedMethodRecordsBase$2, null); - Object.setPrototypeOf(normalizedMethodRecords$2, null); - module.exports = { - kEnumerableProperty: kEnumerableProperty$11, - isDisturbed: isDisturbed$3, - toUSVString: toUSVString$1, - isUSVString: isUSVString$1, - isBlobLike: isBlobLike$1, - parseOrigin: parseOrigin$1, - parseURL, - getServerName: getServerName$1, - isStream: isStream$1, - isIterable: isIterable$1, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName: bufferToLowerCasedHeaderName$2, - addListener, - removeAllListeners: removeAllListeners$1, - errorRequest, - parseRawHeaders, - encodeRawHeaders, - parseHeaders: parseHeaders$1, - parseKeepAliveTimeout, - destroy: destroy$1, - bodyLength, - deepClone, - ReadableStreamFrom: ReadableStreamFrom$3, - isBuffer: isBuffer$1, - assertRequestHandler: assertRequestHandler$1, - getSocketInfo, - isFormDataLike: isFormDataLike$1, - serializePathWithQuery: serializePathWithQuery$3, - addAbortListener: addAbortListener$2, - isValidHTTPToken: isValidHTTPToken$3, - isValidHeaderValue: isValidHeaderValue$3, - isTokenCharCode, - parseRangeHeader: parseRangeHeader$1, - normalizedMethodRecordsBase: normalizedMethodRecordsBase$2, - normalizedMethodRecords: normalizedMethodRecords$2, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: Object.freeze([ - "GET", - "HEAD", - "OPTIONS", - "TRACE" - ]), - wrapRequestBody: wrapRequestBody$1, - setupConnectTimeout - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/stats.js -var require_stats = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/stats.js"(exports, module) { - const { kConnected: kConnected$5, kPending: kPending$4, kRunning: kRunning$5, kSize: kSize$6, kFree: kFree$1, kQueued: kQueued$1 } = require_symbols(); - var ClientStats$1 = class { - constructor(client) { - this.connected = client[kConnected$5]; - this.pending = client[kPending$4]; - this.running = client[kRunning$5]; - this.size = client[kSize$6]; - } - }; - var PoolStats$1 = class { - constructor(pool) { - this.connected = pool[kConnected$5]; - this.free = pool[kFree$1]; - this.pending = pool[kPending$4]; - this.queued = pool[kQueued$1]; - this.running = pool[kRunning$5]; - this.size = pool[kSize$6]; - } - }; - module.exports = { - ClientStats: ClientStats$1, - PoolStats: PoolStats$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/diagnostics.js -var require_diagnostics = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/diagnostics.js"(exports, module) { - const diagnosticsChannel = __require("node:diagnostics_channel"); - const util$22 = __require("node:util"); - const undiciDebugLog = util$22.debuglog("undici"); - const fetchDebuglog = util$22.debuglog("fetch"); - const websocketDebuglog = util$22.debuglog("websocket"); - const channels$8 = { - beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), - connected: diagnosticsChannel.channel("undici:client:connected"), - connectError: diagnosticsChannel.channel("undici:client:connectError"), - sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), - create: diagnosticsChannel.channel("undici:request:create"), - bodySent: diagnosticsChannel.channel("undici:request:bodySent"), - headers: diagnosticsChannel.channel("undici:request:headers"), - trailers: diagnosticsChannel.channel("undici:request:trailers"), - error: diagnosticsChannel.channel("undici:request:error"), - open: diagnosticsChannel.channel("undici:websocket:open"), - close: diagnosticsChannel.channel("undici:websocket:close"), - socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), - ping: diagnosticsChannel.channel("undici:websocket:ping"), - pong: diagnosticsChannel.channel("undici:websocket:pong") - }; - let isTrackingClientEvents = false; - function trackClientEvents(debugLog = undiciDebugLog) { - if (isTrackingClientEvents) return; - isTrackingClientEvents = true; - diagnosticsChannel.subscribe("undici:client:beforeConnect", (evt) => { - const { connectParams: { version, protocol, port, host } } = evt; - debugLog("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); - }); - diagnosticsChannel.subscribe("undici:client:connected", (evt) => { - const { connectParams: { version, protocol, port, host } } = evt; - debugLog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); - }); - diagnosticsChannel.subscribe("undici:client:connectError", (evt) => { - const { connectParams: { version, protocol, port, host }, error } = evt; - debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); - }); - diagnosticsChannel.subscribe("undici:client:sendHeaders", (evt) => { - const { request: { method, path: path$3, origin } } = evt; - debugLog("sending request to %s %s/%s", method, origin, path$3); - }); - } - let isTrackingRequestEvents = false; - function trackRequestEvents(debugLog = undiciDebugLog) { - if (isTrackingRequestEvents) return; - isTrackingRequestEvents = true; - diagnosticsChannel.subscribe("undici:request:headers", (evt) => { - const { request: { method, path: path$3, origin }, response: { statusCode } } = evt; - debugLog("received response to %s %s/%s - HTTP %d", method, origin, path$3, statusCode); - }); - diagnosticsChannel.subscribe("undici:request:trailers", (evt) => { - const { request: { method, path: path$3, origin } } = evt; - debugLog("trailers received from %s %s/%s", method, origin, path$3); - }); - diagnosticsChannel.subscribe("undici:request:error", (evt) => { - const { request: { method, path: path$3, origin }, error } = evt; - debugLog("request to %s %s/%s errored - %s", method, origin, path$3, error.message); - }); - } - let isTrackingWebSocketEvents = false; - function trackWebSocketEvents(debugLog = websocketDebuglog) { - if (isTrackingWebSocketEvents) return; - isTrackingWebSocketEvents = true; - diagnosticsChannel.subscribe("undici:websocket:open", (evt) => { - const { address: { address, port } } = evt; - debugLog("connection opened %s%s", address, port ? `:${port}` : ""); - }); - diagnosticsChannel.subscribe("undici:websocket:close", (evt) => { - const { websocket, code, reason } = evt; - debugLog("closed connection to %s - %s %s", websocket.url, code, reason); - }); - diagnosticsChannel.subscribe("undici:websocket:socket_error", (err) => { - debugLog("connection errored - %s", err.message); - }); - diagnosticsChannel.subscribe("undici:websocket:ping", (evt) => { - debugLog("ping received"); - }); - diagnosticsChannel.subscribe("undici:websocket:pong", (evt) => { - debugLog("pong received"); - }); - } - if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog); - trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog); - } - if (websocketDebuglog.enabled) { - trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog); - trackWebSocketEvents(websocketDebuglog); - } - module.exports = { channels: channels$8 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/request.js -var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/request.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$27, NotSupportedError: NotSupportedError$1 } = require_errors(); - const assert$28 = __require("node:assert"); - const { isValidHTTPToken: isValidHTTPToken$2, isValidHeaderValue: isValidHeaderValue$2, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, serializePathWithQuery: serializePathWithQuery$2, assertRequestHandler, getServerName, normalizedMethodRecords: normalizedMethodRecords$1 } = require_util$5(); - const { channels: channels$7 } = require_diagnostics(); - const { headerNameLowerCasedRecord } = require_constants$4(); - const invalidPathRegex = /[^\u0021-\u00ff]/; - const kHandler = Symbol("handler"); - var Request$4 = class { - constructor(origin, { path: path$3, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError }, handler) { - if (typeof path$3 !== "string") throw new InvalidArgumentError$27("path must be a string"); - else if (path$3[0] !== "/" && !(path$3.startsWith("http://") || path$3.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$27("path must be an absolute URL or start with a slash"); - else if (invalidPathRegex.test(path$3)) throw new InvalidArgumentError$27("invalid request path"); - if (typeof method !== "string") throw new InvalidArgumentError$27("method must be a string"); - else if (normalizedMethodRecords$1[method] === void 0 && !isValidHTTPToken$2(method)) throw new InvalidArgumentError$27("invalid request method"); - if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$27("upgrade must be a string"); - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$27("invalid headersTimeout"); - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$27("invalid bodyTimeout"); - if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError$27("invalid reset"); - if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError$27("invalid expectContinue"); - if (throwOnError != null) throw new InvalidArgumentError$27("invalid throwOnError"); - this.headersTimeout = headersTimeout; - this.bodyTimeout = bodyTimeout; - this.method = method; - this.abort = null; - if (body == null) this.body = null; - else if (isStream(body)) { - this.body = body; - const rState = this.body._readableState; - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy() { - destroy(this); - }; - this.body.on("end", this.endHandler); - } - this.errorHandler = (err) => { - if (this.abort) this.abort(err); - else this.error = err; - }; - this.body.on("error", this.errorHandler); - } else if (isBuffer(body)) this.body = body.byteLength ? body : null; - else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; - else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; - else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; - else throw new InvalidArgumentError$27("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); - this.completed = false; - this.aborted = false; - this.upgrade = upgrade$1 || null; - this.path = query ? serializePathWithQuery$2(path$3, query) : path$3; - this.origin = origin; - this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; - this.blocking = blocking ?? this.method !== "HEAD"; - this.reset = reset == null ? null : reset; - this.host = null; - this.contentLength = null; - this.contentType = null; - this.headers = []; - this.expectContinue = expectContinue != null ? expectContinue : false; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) throw new InvalidArgumentError$27("headers array must be even"); - for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); - } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError$27("headers must be in key-value pair format"); - processHeader(this, header[0], header[1]); - } - else { - const keys = Object.keys(headers); - for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); - } - else if (headers != null) throw new InvalidArgumentError$27("headers must be an object or an array"); - assertRequestHandler(handler, method, upgrade$1); - this.servername = servername || getServerName(this.host) || null; - this[kHandler] = handler; - if (channels$7.create.hasSubscribers) channels$7.create.publish({ request: this }); - } - onBodySent(chunk) { - if (this[kHandler].onBodySent) try { - return this[kHandler].onBodySent(chunk); - } catch (err) { - this.abort(err); - } - } - onRequestSent() { - if (channels$7.bodySent.hasSubscribers) channels$7.bodySent.publish({ request: this }); - if (this[kHandler].onRequestSent) try { - return this[kHandler].onRequestSent(); - } catch (err) { - this.abort(err); - } - } - onConnect(abort$1) { - assert$28(!this.aborted); - assert$28(!this.completed); - if (this.error) abort$1(this.error); - else { - this.abort = abort$1; - return this[kHandler].onConnect(abort$1); - } - } - onResponseStarted() { - return this[kHandler].onResponseStarted?.(); - } - onHeaders(statusCode, headers, resume$1, statusText) { - assert$28(!this.aborted); - assert$28(!this.completed); - if (channels$7.headers.hasSubscribers) channels$7.headers.publish({ - request: this, - response: { - statusCode, - headers, - statusText - } - }); - try { - return this[kHandler].onHeaders(statusCode, headers, resume$1, statusText); - } catch (err) { - this.abort(err); - } - } - onData(chunk) { - assert$28(!this.aborted); - assert$28(!this.completed); - try { - return this[kHandler].onData(chunk); - } catch (err) { - this.abort(err); - return false; - } - } - onUpgrade(statusCode, headers, socket) { - assert$28(!this.aborted); - assert$28(!this.completed); - return this[kHandler].onUpgrade(statusCode, headers, socket); - } - onComplete(trailers) { - this.onFinally(); - assert$28(!this.aborted); - assert$28(!this.completed); - this.completed = true; - if (channels$7.trailers.hasSubscribers) channels$7.trailers.publish({ - request: this, - trailers - }); - try { - return this[kHandler].onComplete(trailers); - } catch (err) { - this.onError(err); - } - } - onError(error) { - this.onFinally(); - if (channels$7.error.hasSubscribers) channels$7.error.publish({ - request: this, - error - }); - if (this.aborted) return; - this.aborted = true; - return this[kHandler].onError(error); - } - onFinally() { - if (this.errorHandler) { - this.body.off("error", this.errorHandler); - this.errorHandler = null; - } - if (this.endHandler) { - this.body.off("end", this.endHandler); - this.endHandler = null; - } - } - addHeader(key, value) { - processHeader(this, key, value); - return this; - } - }; - function processHeader(request$1, key, val) { - if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError$27(`invalid ${key} header`); - else if (val === void 0) return; - let headerName = headerNameLowerCasedRecord[key]; - if (headerName === void 0) { - headerName = key.toLowerCase(); - if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken$2(headerName)) throw new InvalidArgumentError$27("invalid header key"); - } - if (Array.isArray(val)) { - const arr = []; - for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { - if (!isValidHeaderValue$2(val[i])) throw new InvalidArgumentError$27(`invalid ${key} header`); - arr.push(val[i]); - } else if (val[i] === null) arr.push(""); - else if (typeof val[i] === "object") throw new InvalidArgumentError$27(`invalid ${key} header`); - else arr.push(`${val[i]}`); - val = arr; - } else if (typeof val === "string") { - if (!isValidHeaderValue$2(val)) throw new InvalidArgumentError$27(`invalid ${key} header`); - } else if (val === null) val = ""; - else val = `${val}`; - if (request$1.host === null && headerName === "host") { - if (typeof val !== "string") throw new InvalidArgumentError$27("invalid host header"); - request$1.host = val; - } else if (request$1.contentLength === null && headerName === "content-length") { - request$1.contentLength = parseInt(val, 10); - if (!Number.isFinite(request$1.contentLength)) throw new InvalidArgumentError$27("invalid content-length header"); - } else if (request$1.contentType === null && headerName === "content-type") { - request$1.contentType = val; - request$1.headers.push(key, val); - } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError$27(`invalid ${headerName} header`); - else if (headerName === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; - if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError$27("invalid connection header"); - if (value === "close") request$1.reset = true; - } else if (headerName === "expect") throw new NotSupportedError$1("expect header not supported"); - else request$1.headers.push(key, val); - } - module.exports = Request$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/wrap-handler.js -var require_wrap_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/wrap-handler.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$26 } = require_errors(); - module.exports = class WrapHandler$3 { - #handler; - constructor(handler) { - this.#handler = handler; - } - static wrap(handler) { - return handler.onRequestStart ? handler : new WrapHandler$3(handler); - } - onConnect(abort$1, context) { - return this.#handler.onConnect?.(abort$1, context); - } - onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { - return this.#handler.onHeaders?.(statusCode, rawHeaders, resume$1, statusMessage); - } - onUpgrade(statusCode, rawHeaders, socket) { - return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); - } - onData(data) { - return this.#handler.onData?.(data); - } - onComplete(trailers) { - return this.#handler.onComplete?.(trailers); - } - onError(err) { - if (!this.#handler.onError) throw err; - return this.#handler.onError?.(err); - } - onRequestStart(controller, context) { - this.#handler.onConnect?.((reason) => controller.abort(reason), context); - } - onRequestUpgrade(controller, statusCode, headers, socket) { - const rawHeaders = []; - for (const [key, val] of Object.entries(headers)) rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); - this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); - } - onResponseStart(controller, statusCode, headers, statusMessage) { - const rawHeaders = []; - for (const [key, val] of Object.entries(headers)) rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); - if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) controller.pause(); - } - onResponseData(controller, data) { - if (this.#handler.onData?.(data) === false) controller.pause(); - } - onResponseEnd(controller, trailers) { - const rawTrailers = []; - for (const [key, val] of Object.entries(trailers)) rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); - this.#handler.onComplete?.(rawTrailers); - } - onResponseError(controller, err) { - if (!this.#handler.onError) throw new InvalidArgumentError$26("invalid onError method"); - this.#handler.onError?.(err); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/dispatcher.js -var require_dispatcher = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module) { - const EventEmitter = __require("node:events"); - const WrapHandler$2 = require_wrap_handler(); - const wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler$2.wrap(handler)); - var Dispatcher$4 = class extends EventEmitter { - dispatch() { - throw new Error("not implemented"); - } - close() { - throw new Error("not implemented"); - } - destroy() { - throw new Error("not implemented"); - } - compose(...args) { - const interceptors = Array.isArray(args[0]) ? args[0] : args; - let dispatch = this.dispatch.bind(this); - for (const interceptor of interceptors) { - if (interceptor == null) continue; - if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); - dispatch = interceptor(dispatch); - dispatch = wrapInterceptor(dispatch); - if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); - } - return new Proxy(this, { get: (target, key) => key === "dispatch" ? dispatch : target[key] }); - } - }; - module.exports = Dispatcher$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/unwrap-handler.js -var require_unwrap_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/unwrap-handler.js"(exports, module) { - const { parseHeaders } = require_util$5(); - const { InvalidArgumentError: InvalidArgumentError$25 } = require_errors(); - const kResume$4 = Symbol("resume"); - var UnwrapController = class { - #paused = false; - #reason = null; - #aborted = false; - #abort; - [kResume$4] = null; - constructor(abort$1) { - this.#abort = abort$1; - } - pause() { - this.#paused = true; - } - resume() { - if (this.#paused) { - this.#paused = false; - this[kResume$4]?.(); - } - } - abort(reason) { - if (!this.#aborted) { - this.#aborted = true; - this.#reason = reason; - this.#abort(reason); - } - } - get aborted() { - return this.#aborted; - } - get reason() { - return this.#reason; - } - get paused() { - return this.#paused; - } - }; - module.exports = class UnwrapHandler$1 { - #handler; - #controller; - constructor(handler) { - this.#handler = handler; - } - static unwrap(handler) { - return !handler.onRequestStart ? handler : new UnwrapHandler$1(handler); - } - onConnect(abort$1, context) { - this.#controller = new UnwrapController(abort$1); - this.#handler.onRequestStart?.(this.#controller, context); - } - onUpgrade(statusCode, rawHeaders, socket) { - this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket); - } - onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { - this.#controller[kResume$4] = resume$1; - this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage); - return !this.#controller.paused; - } - onData(data) { - this.#handler.onResponseData?.(this.#controller, data); - return !this.#controller.paused; - } - onComplete(rawTrailers) { - this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers)); - } - onError(err) { - if (!this.#handler.onResponseError) throw new InvalidArgumentError$25("invalid onError method"); - this.#handler.onResponseError?.(this.#controller, err); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/dispatcher-base.js -var require_dispatcher_base = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module) { - const Dispatcher$3 = require_dispatcher(); - const UnwrapHandler = require_unwrap_handler(); - const { ClientDestroyedError: ClientDestroyedError$1, ClientClosedError, InvalidArgumentError: InvalidArgumentError$24 } = require_errors(); - const { kDestroy: kDestroy$6, kClose: kClose$8, kClosed: kClosed$3, kDestroyed: kDestroyed$1, kDispatch: kDispatch$4 } = require_symbols(); - const kOnDestroyed = Symbol("onDestroyed"); - const kOnClosed = Symbol("onClosed"); - var DispatcherBase$6 = class extends Dispatcher$3 { - constructor() { - super(); - this[kDestroyed$1] = false; - this[kOnDestroyed] = null; - this[kClosed$3] = false; - this[kOnClosed] = []; - } - get destroyed() { - return this[kDestroyed$1]; - } - get closed() { - return this[kClosed$3]; - } - close(callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new InvalidArgumentError$24("invalid callback"); - if (this[kDestroyed$1]) { - queueMicrotask(() => callback(new ClientDestroyedError$1(), null)); - return; - } - if (this[kClosed$3]) { - if (this[kOnClosed]) this[kOnClosed].push(callback); - else queueMicrotask(() => callback(null, null)); - return; - } - this[kClosed$3] = true; - this[kOnClosed].push(callback); - const onClosed = () => { - const callbacks = this[kOnClosed]; - this[kOnClosed] = null; - for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); - }; - this[kClose$8]().then(() => this.destroy()).then(() => { - queueMicrotask(onClosed); - }); - } - destroy(err, callback) { - if (typeof err === "function") { - callback = err; - err = null; - } - if (callback === void 0) return new Promise((resolve, reject) => { - this.destroy(err, (err$1, data) => { - return err$1 ? reject(err$1) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new InvalidArgumentError$24("invalid callback"); - if (this[kDestroyed$1]) { - if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); - else queueMicrotask(() => callback(null, null)); - return; - } - if (!err) err = new ClientDestroyedError$1(); - this[kDestroyed$1] = true; - this[kOnDestroyed] = this[kOnDestroyed] || []; - this[kOnDestroyed].push(callback); - const onDestroyed = () => { - const callbacks = this[kOnDestroyed]; - this[kOnDestroyed] = null; - for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); - }; - this[kDestroy$6](err).then(() => { - queueMicrotask(onDestroyed); - }); - } - dispatch(opts, handler) { - if (!handler || typeof handler !== "object") throw new InvalidArgumentError$24("handler must be an object"); - handler = UnwrapHandler.unwrap(handler); - try { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$24("opts must be an object."); - if (this[kDestroyed$1] || this[kOnDestroyed]) throw new ClientDestroyedError$1(); - if (this[kClosed$3]) throw new ClientClosedError(); - return this[kDispatch$4](opts, handler); - } catch (err) { - if (typeof handler.onError !== "function") throw err; - handler.onError(err); - return false; - } - } - }; - module.exports = DispatcherBase$6; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/connect.js -var require_connect = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/connect.js"(exports, module) { - const net$1 = __require("node:net"); - const assert$27 = __require("node:assert"); - const util$21 = require_util$5(); - const { InvalidArgumentError: InvalidArgumentError$23 } = require_errors(); - let tls; - let SessionCache; - if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) SessionCache = class WeakSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) return; - const ref = this._sessionCache.get(key); - if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); - }); - } - get(sessionKey) { - const ref = this._sessionCache.get(sessionKey); - return ref ? ref.deref() : null; - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - this._sessionCache.set(sessionKey, new WeakRef(session)); - this._sessionRegistry.register(session, sessionKey); - } - }; - else SessionCache = class SimpleSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); - } - get(sessionKey) { - return this._sessionCache.get(sessionKey); - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - if (this._sessionCache.size >= this._maxCachedSessions) { - const { value: oldestKey } = this._sessionCache.keys().next(); - this._sessionCache.delete(oldestKey); - } - this._sessionCache.set(sessionKey, session); - } - }; - function buildConnector$4({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession,...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError$23("maxCachedSessions must be a positive integer or zero"); - const options = { - path: socketPath, - ...opts - }; - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); - timeout = timeout == null ? 1e4 : timeout; - allowH2 = allowH2 != null ? allowH2 : false; - return function connect$3({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket; - if (protocol === "https:") { - if (!tls) tls = __require("node:tls"); - servername = servername || options.servername || util$21.getServerName(host) || null; - const sessionKey = servername || hostname; - assert$27(sessionKey); - const session = customSession || sessionCache.get(sessionKey) || null; - port = port || 443; - socket = tls.connect({ - highWaterMark: 16384, - ...options, - servername, - session, - localAddress, - ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], - socket: httpSocket, - port, - host: hostname - }); - socket.on("session", function(session$1) { - sessionCache.set(sessionKey, session$1); - }); - } else { - assert$27(!httpSocket, "httpSocket can only be sent on TLS update"); - port = port || 80; - socket = net$1.connect({ - highWaterMark: 64 * 1024, - ...options, - localAddress, - port, - host: hostname - }); - } - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; - socket.setKeepAlive(true, keepAliveInitialDelay); - } - const clearConnectTimeout = util$21.setupConnectTimeout(new WeakRef(socket), { - timeout, - hostname, - port - }); - socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { - queueMicrotask(clearConnectTimeout); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - queueMicrotask(clearConnectTimeout); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }; - } - module.exports = buildConnector$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/utils.js -var require_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/utils.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.enumToMap = void 0; - function enumToMap(obj, filter = [], exceptions = []) { - var _a, _b; - const emptyFilter = ((_a = filter === null || filter === void 0 ? void 0 : filter.length) !== null && _a !== void 0 ? _a : 0) === 0; - const emptyExceptions = ((_b = exceptions === null || exceptions === void 0 ? void 0 : exceptions.length) !== null && _b !== void 0 ? _b : 0) === 0; - return Object.fromEntries(Object.entries(obj).filter(([, value]) => { - return typeof value === "number" && (emptyFilter || filter.includes(value)) && (emptyExceptions || !exceptions.includes(value)); - })); - } - exports.enumToMap = enumToMap; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/constants.js -var require_constants$3 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/constants.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SPECIAL_HEADERS = exports.MINOR = exports.MAJOR = exports.HTAB_SP_VCHAR_OBS_TEXT = exports.QUOTED_STRING = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.HEX = exports.URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.STATUSES_HTTP = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.HEADER_STATE = exports.FINISH = exports.STATUSES = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; - const utils_1 = require_utils(); - exports.ERROR = { - OK: 0, - INTERNAL: 1, - STRICT: 2, - CR_EXPECTED: 25, - LF_EXPECTED: 3, - UNEXPECTED_CONTENT_LENGTH: 4, - UNEXPECTED_SPACE: 30, - CLOSED_CONNECTION: 5, - INVALID_METHOD: 6, - INVALID_URL: 7, - INVALID_CONSTANT: 8, - INVALID_VERSION: 9, - INVALID_HEADER_TOKEN: 10, - INVALID_CONTENT_LENGTH: 11, - INVALID_CHUNK_SIZE: 12, - INVALID_STATUS: 13, - INVALID_EOF_STATE: 14, - INVALID_TRANSFER_ENCODING: 15, - CB_MESSAGE_BEGIN: 16, - CB_HEADERS_COMPLETE: 17, - CB_MESSAGE_COMPLETE: 18, - CB_CHUNK_HEADER: 19, - CB_CHUNK_COMPLETE: 20, - PAUSED: 21, - PAUSED_UPGRADE: 22, - PAUSED_H2_UPGRADE: 23, - USER: 24, - CB_URL_COMPLETE: 26, - CB_STATUS_COMPLETE: 27, - CB_METHOD_COMPLETE: 32, - CB_VERSION_COMPLETE: 33, - CB_HEADER_FIELD_COMPLETE: 28, - CB_HEADER_VALUE_COMPLETE: 29, - CB_CHUNK_EXTENSION_NAME_COMPLETE: 34, - CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35, - CB_RESET: 31 - }; - exports.TYPE = { - BOTH: 0, - REQUEST: 1, - RESPONSE: 2 - }; - exports.FLAGS = { - CONNECTION_KEEP_ALIVE: 1, - CONNECTION_CLOSE: 2, - CONNECTION_UPGRADE: 4, - CHUNKED: 8, - UPGRADE: 16, - CONTENT_LENGTH: 32, - SKIPBODY: 64, - TRAILING: 128, - TRANSFER_ENCODING: 512 - }; - exports.LENIENT_FLAGS = { - HEADERS: 1, - CHUNKED_LENGTH: 2, - KEEP_ALIVE: 4, - TRANSFER_ENCODING: 8, - VERSION: 16, - DATA_AFTER_CLOSE: 32, - OPTIONAL_LF_AFTER_CR: 64, - OPTIONAL_CRLF_AFTER_CHUNK: 128, - OPTIONAL_CR_BEFORE_LF: 256, - SPACES_AFTER_CHUNK_SIZE: 512 - }; - exports.METHODS = { - "DELETE": 0, - "GET": 1, - "HEAD": 2, - "POST": 3, - "PUT": 4, - "CONNECT": 5, - "OPTIONS": 6, - "TRACE": 7, - "COPY": 8, - "LOCK": 9, - "MKCOL": 10, - "MOVE": 11, - "PROPFIND": 12, - "PROPPATCH": 13, - "SEARCH": 14, - "UNLOCK": 15, - "BIND": 16, - "REBIND": 17, - "UNBIND": 18, - "ACL": 19, - "REPORT": 20, - "MKACTIVITY": 21, - "CHECKOUT": 22, - "MERGE": 23, - "M-SEARCH": 24, - "NOTIFY": 25, - "SUBSCRIBE": 26, - "UNSUBSCRIBE": 27, - "PATCH": 28, - "PURGE": 29, - "MKCALENDAR": 30, - "LINK": 31, - "UNLINK": 32, - "SOURCE": 33, - "PRI": 34, - "DESCRIBE": 35, - "ANNOUNCE": 36, - "SETUP": 37, - "PLAY": 38, - "PAUSE": 39, - "TEARDOWN": 40, - "GET_PARAMETER": 41, - "SET_PARAMETER": 42, - "REDIRECT": 43, - "RECORD": 44, - "FLUSH": 45, - "QUERY": 46 - }; - exports.STATUSES = { - CONTINUE: 100, - SWITCHING_PROTOCOLS: 101, - PROCESSING: 102, - EARLY_HINTS: 103, - RESPONSE_IS_STALE: 110, - REVALIDATION_FAILED: 111, - DISCONNECTED_OPERATION: 112, - HEURISTIC_EXPIRATION: 113, - MISCELLANEOUS_WARNING: 199, - OK: 200, - CREATED: 201, - ACCEPTED: 202, - NON_AUTHORITATIVE_INFORMATION: 203, - NO_CONTENT: 204, - RESET_CONTENT: 205, - PARTIAL_CONTENT: 206, - MULTI_STATUS: 207, - ALREADY_REPORTED: 208, - TRANSFORMATION_APPLIED: 214, - IM_USED: 226, - MISCELLANEOUS_PERSISTENT_WARNING: 299, - MULTIPLE_CHOICES: 300, - MOVED_PERMANENTLY: 301, - FOUND: 302, - SEE_OTHER: 303, - NOT_MODIFIED: 304, - USE_PROXY: 305, - SWITCH_PROXY: 306, - TEMPORARY_REDIRECT: 307, - PERMANENT_REDIRECT: 308, - BAD_REQUEST: 400, - UNAUTHORIZED: 401, - PAYMENT_REQUIRED: 402, - FORBIDDEN: 403, - NOT_FOUND: 404, - METHOD_NOT_ALLOWED: 405, - NOT_ACCEPTABLE: 406, - PROXY_AUTHENTICATION_REQUIRED: 407, - REQUEST_TIMEOUT: 408, - CONFLICT: 409, - GONE: 410, - LENGTH_REQUIRED: 411, - PRECONDITION_FAILED: 412, - PAYLOAD_TOO_LARGE: 413, - URI_TOO_LONG: 414, - UNSUPPORTED_MEDIA_TYPE: 415, - RANGE_NOT_SATISFIABLE: 416, - EXPECTATION_FAILED: 417, - IM_A_TEAPOT: 418, - PAGE_EXPIRED: 419, - ENHANCE_YOUR_CALM: 420, - MISDIRECTED_REQUEST: 421, - UNPROCESSABLE_ENTITY: 422, - LOCKED: 423, - FAILED_DEPENDENCY: 424, - TOO_EARLY: 425, - UPGRADE_REQUIRED: 426, - PRECONDITION_REQUIRED: 428, - TOO_MANY_REQUESTS: 429, - REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, - REQUEST_HEADER_FIELDS_TOO_LARGE: 431, - LOGIN_TIMEOUT: 440, - NO_RESPONSE: 444, - RETRY_WITH: 449, - BLOCKED_BY_PARENTAL_CONTROL: 450, - UNAVAILABLE_FOR_LEGAL_REASONS: 451, - CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, - INVALID_X_FORWARDED_FOR: 463, - REQUEST_HEADER_TOO_LARGE: 494, - SSL_CERTIFICATE_ERROR: 495, - SSL_CERTIFICATE_REQUIRED: 496, - HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, - INVALID_TOKEN: 498, - CLIENT_CLOSED_REQUEST: 499, - INTERNAL_SERVER_ERROR: 500, - NOT_IMPLEMENTED: 501, - BAD_GATEWAY: 502, - SERVICE_UNAVAILABLE: 503, - GATEWAY_TIMEOUT: 504, - HTTP_VERSION_NOT_SUPPORTED: 505, - VARIANT_ALSO_NEGOTIATES: 506, - INSUFFICIENT_STORAGE: 507, - LOOP_DETECTED: 508, - BANDWIDTH_LIMIT_EXCEEDED: 509, - NOT_EXTENDED: 510, - NETWORK_AUTHENTICATION_REQUIRED: 511, - WEB_SERVER_UNKNOWN_ERROR: 520, - WEB_SERVER_IS_DOWN: 521, - CONNECTION_TIMEOUT: 522, - ORIGIN_IS_UNREACHABLE: 523, - TIMEOUT_OCCURED: 524, - SSL_HANDSHAKE_FAILED: 525, - INVALID_SSL_CERTIFICATE: 526, - RAILGUN_ERROR: 527, - SITE_IS_OVERLOADED: 529, - SITE_IS_FROZEN: 530, - IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, - NETWORK_READ_TIMEOUT: 598, - NETWORK_CONNECT_TIMEOUT: 599 - }; - exports.FINISH = { - SAFE: 0, - SAFE_WITH_CB: 1, - UNSAFE: 2 - }; - exports.HEADER_STATE = { - GENERAL: 0, - CONNECTION: 1, - CONTENT_LENGTH: 2, - TRANSFER_ENCODING: 3, - UPGRADE: 4, - CONNECTION_KEEP_ALIVE: 5, - CONNECTION_CLOSE: 6, - CONNECTION_UPGRADE: 7, - TRANSFER_ENCODING_CHUNKED: 8 - }; - exports.METHODS_HTTP = [ - exports.METHODS.DELETE, - exports.METHODS.GET, - exports.METHODS.HEAD, - exports.METHODS.POST, - exports.METHODS.PUT, - exports.METHODS.CONNECT, - exports.METHODS.OPTIONS, - exports.METHODS.TRACE, - exports.METHODS.COPY, - exports.METHODS.LOCK, - exports.METHODS.MKCOL, - exports.METHODS.MOVE, - exports.METHODS.PROPFIND, - exports.METHODS.PROPPATCH, - exports.METHODS.SEARCH, - exports.METHODS.UNLOCK, - exports.METHODS.BIND, - exports.METHODS.REBIND, - exports.METHODS.UNBIND, - exports.METHODS.ACL, - exports.METHODS.REPORT, - exports.METHODS.MKACTIVITY, - exports.METHODS.CHECKOUT, - exports.METHODS.MERGE, - exports.METHODS["M-SEARCH"], - exports.METHODS.NOTIFY, - exports.METHODS.SUBSCRIBE, - exports.METHODS.UNSUBSCRIBE, - exports.METHODS.PATCH, - exports.METHODS.PURGE, - exports.METHODS.MKCALENDAR, - exports.METHODS.LINK, - exports.METHODS.UNLINK, - exports.METHODS.PRI, - exports.METHODS.SOURCE, - exports.METHODS.QUERY - ]; - exports.METHODS_ICE = [exports.METHODS.SOURCE]; - exports.METHODS_RTSP = [ - exports.METHODS.OPTIONS, - exports.METHODS.DESCRIBE, - exports.METHODS.ANNOUNCE, - exports.METHODS.SETUP, - exports.METHODS.PLAY, - exports.METHODS.PAUSE, - exports.METHODS.TEARDOWN, - exports.METHODS.GET_PARAMETER, - exports.METHODS.SET_PARAMETER, - exports.METHODS.REDIRECT, - exports.METHODS.RECORD, - exports.METHODS.FLUSH, - exports.METHODS.GET, - exports.METHODS.POST - ]; - exports.METHOD_MAP = (0, utils_1.enumToMap)(exports.METHODS); - exports.H_METHOD_MAP = Object.fromEntries(Object.entries(exports.METHODS).filter(([k]) => k.startsWith("H"))); - exports.STATUSES_HTTP = [ - exports.STATUSES.CONTINUE, - exports.STATUSES.SWITCHING_PROTOCOLS, - exports.STATUSES.PROCESSING, - exports.STATUSES.EARLY_HINTS, - exports.STATUSES.RESPONSE_IS_STALE, - exports.STATUSES.REVALIDATION_FAILED, - exports.STATUSES.DISCONNECTED_OPERATION, - exports.STATUSES.HEURISTIC_EXPIRATION, - exports.STATUSES.MISCELLANEOUS_WARNING, - exports.STATUSES.OK, - exports.STATUSES.CREATED, - exports.STATUSES.ACCEPTED, - exports.STATUSES.NON_AUTHORITATIVE_INFORMATION, - exports.STATUSES.NO_CONTENT, - exports.STATUSES.RESET_CONTENT, - exports.STATUSES.PARTIAL_CONTENT, - exports.STATUSES.MULTI_STATUS, - exports.STATUSES.ALREADY_REPORTED, - exports.STATUSES.TRANSFORMATION_APPLIED, - exports.STATUSES.IM_USED, - exports.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING, - exports.STATUSES.MULTIPLE_CHOICES, - exports.STATUSES.MOVED_PERMANENTLY, - exports.STATUSES.FOUND, - exports.STATUSES.SEE_OTHER, - exports.STATUSES.NOT_MODIFIED, - exports.STATUSES.USE_PROXY, - exports.STATUSES.SWITCH_PROXY, - exports.STATUSES.TEMPORARY_REDIRECT, - exports.STATUSES.PERMANENT_REDIRECT, - exports.STATUSES.BAD_REQUEST, - exports.STATUSES.UNAUTHORIZED, - exports.STATUSES.PAYMENT_REQUIRED, - exports.STATUSES.FORBIDDEN, - exports.STATUSES.NOT_FOUND, - exports.STATUSES.METHOD_NOT_ALLOWED, - exports.STATUSES.NOT_ACCEPTABLE, - exports.STATUSES.PROXY_AUTHENTICATION_REQUIRED, - exports.STATUSES.REQUEST_TIMEOUT, - exports.STATUSES.CONFLICT, - exports.STATUSES.GONE, - exports.STATUSES.LENGTH_REQUIRED, - exports.STATUSES.PRECONDITION_FAILED, - exports.STATUSES.PAYLOAD_TOO_LARGE, - exports.STATUSES.URI_TOO_LONG, - exports.STATUSES.UNSUPPORTED_MEDIA_TYPE, - exports.STATUSES.RANGE_NOT_SATISFIABLE, - exports.STATUSES.EXPECTATION_FAILED, - exports.STATUSES.IM_A_TEAPOT, - exports.STATUSES.PAGE_EXPIRED, - exports.STATUSES.ENHANCE_YOUR_CALM, - exports.STATUSES.MISDIRECTED_REQUEST, - exports.STATUSES.UNPROCESSABLE_ENTITY, - exports.STATUSES.LOCKED, - exports.STATUSES.FAILED_DEPENDENCY, - exports.STATUSES.TOO_EARLY, - exports.STATUSES.UPGRADE_REQUIRED, - exports.STATUSES.PRECONDITION_REQUIRED, - exports.STATUSES.TOO_MANY_REQUESTS, - exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL, - exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE, - exports.STATUSES.LOGIN_TIMEOUT, - exports.STATUSES.NO_RESPONSE, - exports.STATUSES.RETRY_WITH, - exports.STATUSES.BLOCKED_BY_PARENTAL_CONTROL, - exports.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS, - exports.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST, - exports.STATUSES.INVALID_X_FORWARDED_FOR, - exports.STATUSES.REQUEST_HEADER_TOO_LARGE, - exports.STATUSES.SSL_CERTIFICATE_ERROR, - exports.STATUSES.SSL_CERTIFICATE_REQUIRED, - exports.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT, - exports.STATUSES.INVALID_TOKEN, - exports.STATUSES.CLIENT_CLOSED_REQUEST, - exports.STATUSES.INTERNAL_SERVER_ERROR, - exports.STATUSES.NOT_IMPLEMENTED, - exports.STATUSES.BAD_GATEWAY, - exports.STATUSES.SERVICE_UNAVAILABLE, - exports.STATUSES.GATEWAY_TIMEOUT, - exports.STATUSES.HTTP_VERSION_NOT_SUPPORTED, - exports.STATUSES.VARIANT_ALSO_NEGOTIATES, - exports.STATUSES.INSUFFICIENT_STORAGE, - exports.STATUSES.LOOP_DETECTED, - exports.STATUSES.BANDWIDTH_LIMIT_EXCEEDED, - exports.STATUSES.NOT_EXTENDED, - exports.STATUSES.NETWORK_AUTHENTICATION_REQUIRED, - exports.STATUSES.WEB_SERVER_UNKNOWN_ERROR, - exports.STATUSES.WEB_SERVER_IS_DOWN, - exports.STATUSES.CONNECTION_TIMEOUT, - exports.STATUSES.ORIGIN_IS_UNREACHABLE, - exports.STATUSES.TIMEOUT_OCCURED, - exports.STATUSES.SSL_HANDSHAKE_FAILED, - exports.STATUSES.INVALID_SSL_CERTIFICATE, - exports.STATUSES.RAILGUN_ERROR, - exports.STATUSES.SITE_IS_OVERLOADED, - exports.STATUSES.SITE_IS_FROZEN, - exports.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR, - exports.STATUSES.NETWORK_READ_TIMEOUT, - exports.STATUSES.NETWORK_CONNECT_TIMEOUT - ]; - exports.ALPHA = []; - for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { - exports.ALPHA.push(String.fromCharCode(i)); - exports.ALPHA.push(String.fromCharCode(i + 32)); - } - exports.NUM_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9 - }; - exports.HEX_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - A: 10, - B: 11, - C: 12, - D: 13, - E: 14, - F: 15, - a: 10, - b: 11, - c: 12, - d: 13, - e: 14, - f: 15 - }; - exports.NUM = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9" - ]; - exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); - exports.MARK = [ - "-", - "_", - ".", - "!", - "~", - "*", - "'", - "(", - ")" - ]; - exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ - "%", - ";", - ":", - "&", - "=", - "+", - "$", - "," - ]); - exports.URL_CHAR = [ - "!", - "\"", - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~" - ].concat(exports.ALPHANUM); - exports.HEX = exports.NUM.concat([ - "a", - "b", - "c", - "d", - "e", - "f", - "A", - "B", - "C", - "D", - "E", - "F" - ]); - exports.TOKEN = [ - "!", - "#", - "$", - "%", - "&", - "'", - "*", - "+", - "-", - ".", - "^", - "_", - "`", - "|", - "~" - ].concat(exports.ALPHANUM); - exports.HEADER_CHARS = [" "]; - for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); - exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); - exports.QUOTED_STRING = [" ", " "]; - for (let i = 33; i <= 255; i++) if (i !== 34 && i !== 92) exports.QUOTED_STRING.push(i); - exports.HTAB_SP_VCHAR_OBS_TEXT = [" ", " "]; - for (let i = 33; i <= 126; i++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); - for (let i = 128; i <= 255; i++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); - exports.MAJOR = exports.NUM_MAP; - exports.MINOR = exports.MAJOR; - exports.SPECIAL_HEADERS = { - "connection": exports.HEADER_STATE.CONNECTION, - "content-length": exports.HEADER_STATE.CONTENT_LENGTH, - "proxy-connection": exports.HEADER_STATE.CONNECTION, - "transfer-encoding": exports.HEADER_STATE.TRANSFER_ENCODING, - "upgrade": exports.HEADER_STATE.UPGRADE - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/llhttp-wasm.js -var require_llhttp_wasm = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { - const { Buffer: Buffer$2 } = __require("node:buffer"); - const wasmBase64$1 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdm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CABIAA2AgwgASACNgIIDAELQR8hAiAEQf///wdNBEAgBEEmIARBCHZnIgBrdkEBcSAAQQF0a0E+aiECCyABIAI2AhwgAUIANwIQIAJBAnRBsNYAaiEAAkBBhNQAKAIAIgNBASACdCIHcUUEQCAAIAE2AgBBhNQAIAMgB3I2AgAgASAANgIYIAEgATYCCCABIAE2AgwMAQsgBEEZIAJBAXZrQQAgAkEfRxt0IQIgACgCACEAAkADQCAAIgMoAgRBeHEgBEYNASACQR12IQAgAkEBdCECIAMgAEEEcWpBEGoiBygCACIADQALIAcgATYCACABIAM2AhggASABNgIMIAEgATYCCAwBCyADKAIIIgAgATYCDCADIAE2AgggAUEANgIYIAEgAzYCDCABIAA2AggLQaDUAEGg1AAoAgBBAWsiAEF/IAAbNgIACwsHACAALQAoCwcAIAAtACoLBwAgAC0AKwsHACAALQApCwcAIAAvATQLBwAgAC0AMAtAAQR/IAAoAhghASAALwEuIQIgAC0AKCEDIAAoAjghBCAAEDcgACAENgI4IAAgAzoAKCAAIAI7AS4gACABNgIYC8X4AQIHfwN+IAEgAmohBAJAIAAiAygCDCIADQAgAygCBARAIAMgATYCBAsjAEEQayIJJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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kLQbcBDBgLQbgBDBcLQQEMFgtBuQEMFQtBugEMFAtBuwEMEwtBvAEMEgtBvQEMEQtBvgEMEAtBvwEMDwtBwAEMDgtBwQEMDQtBwgEMDAtBwwEMCwtBxAEMCgtBxQEMCQtBxgEMCAtB1AEMBwtBxwEMBgtByAEMBQtByQEMBAtBygEMAwtBywEMAgtBzQEMAQtBzAELIQIDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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2oiARAxIgBFDSsgA0EHNgIcIAMgATYCFCADIAA2AgwM+wILIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAARQ0rIABBFUYEQCADQQo2AhwgAyABNgIUIANB8Rg2AhAgA0EVNgIMQQAhAgz6AgtBACECIANBADYCHCADIAE2AhQgA0GLDDYCECADQRM2AgwM+QILQQAhAiADQQA2AhwgAyABNgIUIANBsRQ2AhAgA0ECNgIMDPgCC0EAIQIgA0EANgIcIAMgATYCFCADQYwUNgIQIANBGTYCDAz3AgtBACECIANBADYCHCADIAE2AhQgA0HRHDYCECADQRk2AgwM9gILIABBFUYNPUEAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAz1AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQ0oIANBDTYCHCADIAE2AhQgAyAANgIMDPQCCyAAQRVGDTpBACECIANBADYCHCADIAE2AhQgA0GiDzYCECADQSI2AgwM8wILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDIiAEUEQCABQQFqIQEMKAsgA0EONgIcIAMgADYCDCADIAFBAWo2AhQM8gILIABBFUYNN0EAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAzxAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQRAIAFBAWohAQwnCyADQQ82AhwgAyAANgIMIAMgAUEBajYCFAzwAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM7wILIABBFUYNM0EAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzuAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQ0lIANBETYCHCADIAE2AhQgAyAANgIMDO0CCyAAQRVGDTBBACECIANBADYCHCADIAE2AhQgA0HODDYCECADQSM2AgwM7AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEMJQsgA0ESNgIcIAMgADYCDCADIAFBAWo2AhQM6wILIANBL2otAABBAXFFDQELQRUhAgzPAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM6AILIABBO0cNACABQQFqIQEMDAtBACECIANBADYCHCADIAE2AhQgA0GYFzYCECADQQI2AgwM5gILIABBFUYNKEEAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzlAgsgA0EUNgIcIAMgATYCFCADIAA2AgwM5AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEM3AILIANBFTYCHCADIAA2AgwgAyABQQFqNgIUDOMCCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNoCCyADQRc2AhwgAyAANgIMIAMgAUEBajYCFAziAgsgAEEVRg0jQQAhAiADQQA2AhwgAyABNgIUIANBzgw2AhAgA0EjNgIMDOECCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDB0LIANBGTYCHCADIAA2AgwgAyABQQFqNgIUDOACCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNYCCyADQRo2AhwgAyAANgIMIAMgAUEBajYCFAzfAgsgAEEVRg0fQQAhAiADQQA2AhwgAyABNgIUIANBog82AhAgA0EiNgIMDN4CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUDN0CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDNICCyADQR02AhwgAyAANgIMIAMgAUEBajYCFAzcAgsgAEE7Rw0BIAFBAWohAQtBJCECDMACC0EAIQIgA0EANgIcIAMgATYCFCADQc4UNgIQIANBDDYCDAzZAgsgASAERwRAA0AgAS0AAEEgRw3xASAEIAFBAWoiAUcNAAtBLCECDNkCC0EsIQIM2AILIAEgBEYEQEE0IQIM2AILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBR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IQIANBFTYCDEEAIQIMvgILIANBIDYCHCADIAE2AhQgA0GeGTYCECADQRU2AgxBACECDL0CCyADQRM2AhwgAyABNgIUIANBnhk2AhAgA0EVNgIMQQAhAgy8AgsgA0ELNgIcIAMgATYCFCADQZ4ZNgIQIANBFTYCDEEAIQIMuwILIANBEDYCHCADIAE2AhQgA0GeGTYCECADQRU2AgxBACECDLoCCyADQSA2AhwgAyABNgIUIANBjxs2AhAgA0EVNgIMQQAhAgy5AgsgA0ELNgIcIAMgATYCFCADQY8bNgIQIANBFTYCDEEAIQIMuAILIANBDDYCHCADIAE2AhQgA0GPGzYCECADQRU2AgxBACECDLcCC0EAIQIgA0EANgIcIAMgATYCFCADQa8ONgIQIANBEjYCDAy2AgsCQANAAkAgAS0AAEEKaw4EAAICAAILIAQgAUEBaiIBRw0AC0HsASECDLYCCwJAAkAgAy0ANkEBRw0AQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB6wE2AhwgAyABNgIUIANB4hg2AhAgA0EVNgIMQQAhAgy3AgtBzAEhAgycAgsgA0EANgIcIAMgATYCFCADQfELNgIQIANBHzYCDEEAIQIMtQILAkACQCADLQAoQQFrDgIEAQALQcsBIQIMmwILQcQBIQIMmgILIANBAjoAMUEAIQACQCADKAI4IgJFDQAgAigCACICRQ0AIAMgAhEAACEACyAARQRAQc0BIQIMmgILIABBFUcEQCADQQA2AhwgAyABNgIUIANBrAw2AhAgA0EQNgIMQQAhAgy0AgsgA0HqATYCHCADIAE2AhQgA0GHGTYCECADQRU2AgxBACECDLMCCyABIARGBEBB6QEhAgyzAgsgAS0AAEHIAEYNASADQQE6ACgLQbYBIQIMlwILQcoBIQIMlgILIAEgBEcEQCADQQw2AgggAyABNgIEQckBIQIMlgILQegBIQIMrwILIAEgBEYEQEHnASECDK8CCyABLQAAQcgARw0EIAFBAWohAUHIASECDJQCCyABIARGBEBB5gEhAgyuAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQcYBIQIMlAILIAFBAWohAUHHASECDJMCC0HlASECIAEgBEYNrAIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB99MAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMrQILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAtIgBFBEBB1AEhAgyTAgsgA0HkATYCHCADIAE2AhQgAyAANgIMQQAhAgysAgtB4wEhAiABIARGDasCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQfXTAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADKwCCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAtIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB0B42AhAgA0EINgIMDKkCC0HFASECDI4CCyADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDKcCC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQ1lIABBFUcEQCADQQA2AhwgAyABNgIUIANB1A42AhAgA0EgNgIMQQAhAgynAgsgA0GFATYCHCADIAE2AhQgA0HXGjYCECADQRU2AgxBACECDKYCC0HhASECIAQgASIARg2lAiAEIAFrIAMoAgAiAWohBSAAIAFrQQRqIQYCQANAIAAtAAAgAUHw0wBqLQAARw0BIAFBBEYNAyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBTYCAAymAgsgA0EANgIcIAMgADYCFCADQYQ3NgIQIANBCDYCDCADQQA2AgBBACECDKUCCyABIARHBEAgA0ENNgIIIAMgATYCBEHCASECDIsCC0HgASECDKQCCyADQQA2AgAgBkEBaiEBC0HDASECDIgCCyABIARGBEBB3wEhAgyiAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBwQEhAgyIAgsgAygCBCEAIANBADYCBCADIAAgAR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AkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQYAdNgIQIANBDTYCDAyeAgsgA0EANgIcIAMgATYCFCADQYAdNgIQIANBDTYCDEEAIQIMnQILQbwBIQIMggILIAEgBEYEQEHVASECDJwCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GAHTYCECADQQ02AgwMnQILIANBADYCHCADIAE2AhQgA0GAHTYCECADQQ02AgxBACECDJwCC0G7ASECDIECCyABIARGBEBB1AEhAgybAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBgB02AhAgA0ENNgIMDJwCCyADQQA2AhwgAyABNgIUIANBgB02AhAgA0ENNgIMQQAhAgybAgtBugEhAgyAAgsgASAERgRAQdMBIQIMmgILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUG5ASECDIECCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GFCzYCECADQQ02AgxBACECDJoCCyADQQA2AhwgAyABNgIUIANBhQs2AhAgA0ENNgIMQQAhAgyZAgsgASAERwRAIANBDjYCCCADIAE2AgRBASECDP8BC0HSASECDJgCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB0QEhAgyZAgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFBEAgAUEBaiEBDAQLIANB0AE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMmAILIAMoAgQhACADQQA2AgQgAyAAIAEQLCIADQEgAUEBagshAUG3ASECDPwBC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BaiEBQZoBIQIM2gELIAEgBEYEQEGyASECDPQBCwJAAkAgAS0AAEHSAGsOAwAwATALIAFBAWohAUGZASECDNoBCyABQQFqIQFBBAwtC0GxASECIAEgBEYN8gEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBsNMAai0AAEcNLCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM8wELIANBADYCACAGQQFqIQFBHQwsCyABIARGBEBBsAEhAgzyAQsCQAJAIAEtAABByQBrDgcBLi4uLi4ALgsgAUEBaiEBQZcBIQIM2AELIAFBAWohAUEiDCsLIAEgBEYEQEGvASECDPEBCyABLQAAQdAARw0rIAFBAWohAUGWASECDNYBCyABIARGBEBBrgEhAgzwAQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGUASECDNYBCyABQQFqIQFBlQEhAgzVAQtBrQEhAiABIARGDe4BIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQazTAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO8BCyADQQA2AgAgBkEBaiEBQQ0MKAtBrAEhAiABIARGDe0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQeHTAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO4BCyADQQA2AgAgBkEBaiEBQQwMJwtBqwEhAiABIARGDewBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQarTAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO0BCyADQQA2AgAgBkEBaiEBQQMMJgtBqgEhAiABIARGDesBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQajTAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOwBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQakBIQIM6wELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBjwEhAgzRAQsgAUEBaiEBQZABIQIM0AELQagBIQIgASAERg3pASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm0wBqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzqAQsgA0EANgIAIAZBAWohAUEnDCMLQacBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk0wBqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEcDCILQaYBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGe0wBqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEGDCELQaUBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEGZ0wBqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGkASECDOYBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQYQBIQIMzgELIAFBAWohAUGFASECDM0BCyABQQFqIQFBigEhAgzMAQsgAUEBaiEBQYsBIQIMywELQaMBIQIgASAERg3kASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGX0wBqLQAARw0eIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzlAQsgA0EANgIAIAZBAWohAUELDB4LIAEgBEYEQEGiASECDOQBCwJAAkAgAS0AAEHBAGsOAwAgASALIAFBAWohAUGGASECDMoBCyABQQFqIQFB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eDKAGotAAAiAEECRwRAIABBAUcEQEHfACECDIsBCwwnCyAEIAFBAWoiAUcNAAtB9QAhAgyiAQsgASAERgRAQfQAIQIMogELAkAgAS0AAEEJaw43JQMGJQQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDIYBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMngELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMnQELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB8AA2AhwgAyABNgIUIAMgADYCDEEAIQIMnAELIANBADYCHCADIAE2AhQgA0G8EzYCECADQQc2AgxBACECDJsBCwJAAkACQAJAA0AgAS0AAEHgyABqLQAAIgBBBUcEQAJAIABBAWsOBiQDBAUGAAYLQd4AIQIMhgELIAQgAUEBaiIBRw0AC0HzACECDJ4BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDJ0BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDJwBCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQfAANgIcIAMgATYCFCADIAA2AgxBACECDJsBCyADQQA2AhwgAyABNgIUIANB3Ag2AhAgA0EHNgIMQQAhAgyaAQsgASAERg0BIAFBAWoLIQFBBiECDH4LQfIAIQIMlwELAkACQAJAAkADQCABLQAAQeDGAGotAAAiAEEFRwRAIABBAWsOBB8CAwQFCyAEIAFBAWoiAUcNAAtB8QAhAgyaAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyZAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyYAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HwADYCHCADIAE2AhQgAyAANgIMQQAhAgyXAQsgA0EANgIcIAMgATYCFCADQbQKNgIQIANBBzYCDEEAIQIMlgELQc4AIQIMewtB0AAhAgx6C0HdACECDHkLIAEgBEYEQEHwACECDJMBCwJAIAEtAABBCWsOBBYAABYACyABQQFqIQFB3AAhAgx4CyABIARGBEBB7wAhAgySAQsCQCABLQAAQQlrDgQVAAAVAAtBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUEQEHTASECDHgLIABBFUcEQCADQQA2AhwgAyABNgIUIANBwQ02AhAgA0EaNgIMQQAhAgySAQsgA0HuADYCHCADIAE2AhQgA0HwGTYCECADQRU2AgxBACECDJEBC0HtACECIAEgBEYNkAEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB18YAai0AAEcNBCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkQELIANBADYCACAGQQFqIQEgAy0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACECIANBADYCHCADIAE2AhQgA0HlCTYCECADQQg2AgwMkAELQewAIQIgASAERg2PASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHUxgBqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyQAQsgA0EANgIAIAZBAWohASADLQApQSFGDQMgA0EANgIcIAMgATYCFCADQYkKNgIQIANBCDYCDEEAIQIMjwELQesAIQIgASAERg2OASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHQxgBqLQAARw0CIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyPAQsgA0EANgIAIAZBAWohASADLQApIgBBI0kNAiAAQS5GDQIgA0EANgIcIAMgATYCFCADQcEJNgIQIANBCDYCDEEAIQIMjgELIANBADYCAAtBACECIANBADYCHCADIAE2AhQgA0GENzYCECADQQg2AgwMjAELQdgAIQIMcQsgASAERwRAIANBDTYCCCADIAE2AgRB1wAhAgxxC0HqACECDIoBCyABIARGBEBB6QAhAgyKAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1gAhAgxwCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdCADQegANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyABIARGBEBB5wAhAgyJAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLiIARQ11IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMiQELQdUAIQIMbgsgASAERgRAQeUAIQIMiAELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDIoBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdyADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdSADQeQANgIcIAMgATYCFCADIAA2AgwMiAELQdMAIQIMbQsgAy0AKUEiRg2AAUHSACECDGwLQQAhAAJAIAMoAjgiAkUNACACKAI8IgJFDQAgAyACEQAAIQALIABFBEBB1AAhAgxsCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQZwNNgIQIANBITYCDEEAIQIMhgELIANB4QA2AhwgAyABNgIUIANB1hk2AhAgA0EVNgIMQQAhAgyFAQsgASAERgRAQeAAIQIMhQELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HRACECDGwLIANBADYCHCADIAE2AhQgA0GIETYCECADQQk2AgxBACECDIUBCyADQQA2AhwgAyABNgIUIANBiBE2AhAgA0EJNgIMQQAhAgyEAQsgASAERgRAQd8AIQIMhAELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBiBE2AhAgA0ECNgIMQQAhAgyDAQsgASAERgRAQd0AIQIMgwELIAEtAAAiAkENRgRAIAFBAWohAUHPACECDGkLIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyCAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0G1LDYCECADQQc2AgwMgAELIAEgBEYEQEHbACECDIABCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc0AIQIMZAsgASAERgRAQdoAIQIMfgsgAS0AAEEJaw4EAAEBAAELQQAhAiADQQA2AhwgA0HsETYCECADQQc2AgwgAyABQQFqNgIUDHwLIANBgBI7ASpBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HZADYCHCADIAE2AhQgA0HwGTYCECADQRU2AgxBACECDHsLQcwAIQIMYAsgA0EANgIcIAMgATYCFCADQcENNgIQIANBGjYCDEEAIQIMeQsgASAERgRAQdkAIQIMeQsgAS0AAEEgRw06IAFBAWohASADLQAuQQFxDTogA0EANgIcIAMgATYCFCADQa0bNgIQIANBHjYCDEEAIQIMeAsgASAERgRAQdgAIQIMeAsCQAJAAkACQAJAIAEtAAAiAEEKaw4EAgMDAAELIAFBAWohAUErIQIMYQsgAEE6Rw0BIANBADYCHCADIAE2AhQgA0G5ETYCECADQQo2AgxBACECDHoLIAFBAWohASADQS9qLQAAQQFxRQ1tIAMtADJB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BEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQekPNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLiECDCoLIANBADYCHCADIAE2AhQgA0GzEjYCECADQQs2AgxBACECDEMLQdIBIQIMKAsgASAERgRAQS4hAgxCCyADQQA2AgQgA0ERNgIIIAMgASABEDAiAA0BC0EtIQIMJgsgA0EtNgIcIAMgATYCFCADIAA2AgxBACECDD8LQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2AA2AhwgAyABNgIUIANBnho2AhAgA0EVNgIMQQAhAgw+C0HLACECDCMLIANBADYCHCADIAE2AhQgA0GFDjYCECADQR02AgxBACECDDwLIAEgBEYEQEHOACECDDwLIAEtAAAiAEEgRg0CIABBOkYNAQsgA0EAOgAsQQkhAgwgCyADKAIEIQAgA0EANgIEIAMgACABEC8iAA0BDAILIAMtAC5BAXEEQEHPASECDB8LIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ0CIANBKjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgw4CyADQcsANgIcIAMgADYCDCADIAFBAWo2AhRBACECDDcLIAFBAWohAUE/IQIMHAsgAUEBaiEBDCkLIAEgBEYEQEErIQIMNQsCQCABLQAAQQpGBEAgAUEBaiEBDAELIAMtAC5BwABxRQ0GCyADLQAyQYABcQRAQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIABFDREgAEEVRgRAIANBBTYCHCADIAE2AhQgA0GGGjYCECADQRU2AgxBACECDDYLIANBADYCHCADIAE2AhQgA0HiDTYCECADQRQ2AgxBACECDDULIANBMmohAiADEDRBACEAAkAgAygCOCIGRQ0AIAYoAiQiBkU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tBACECIANBADYCHCADIAE2AhQgA0HXCjYCECADQQk2AgwMFwtBACECIANBADYCHCADIAE2AhQgA0G/EDYCECADQQk2AgwMFgtBACECIANBADYCHCADIAE2AhQgA0GkETYCECADQQk2AgwMFQtBACECIANBADYCHCADIAE2AhQgA0HVEDYCECADQQk2AgwMFAtBACECIANBADYCHCADIAE2AhQgA0HXCjYCECADQQk2AgwMEwtBACECIANBADYCHCADIAE2AhQgA0G/EDYCECADQQk2AgwMEgtBACECIANBADYCHCADIAE2AhQgA0GkETYCECADQQk2AgwMEQtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMEAtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMDwtBACECIANBADYCHCADIAE2AhQgA0HIEjYCECADQQs2AgwMDgtBACECIANBADYCHCADIAE2AhQgA0GVCTYCECADQQs2AgwMDQtBACECIANBADYCHCADIAE2AhQgA0HpDzYCECADQQo2AgwMDAtBACECIANBADYCHCADIAE2AhQgA0GDEDYCECADQQo2AgwMCwtBACECIANBADYCHCADIAE2AhQgA0GmHDYCECADQQI2AgwMCgtBACECIANBADYCHCADIAE2AhQgA0HFFTYCECADQQI2AgwMCQtBACECIANBADYCHCADIAE2AhQgA0H/FzYCECADQQI2AgwMCAtBACECIANBADYCHCADIAE2AhQgA0HKFzYCECADQQI2AgwMBwsgA0ECNgIcIAMgATYCFCADQZQdNgIQIANBFjYCDEEAIQIMBgtB3gAhAiABIARGDQUgCUEIaiEHIAMoAgAhBQJAAkAgASAERwRAIAVBxsYAaiEIIAQgBWogAWshBiAFQX9zQQpqIgUgAWohAANAIAEtAAAgCC0AAEcEQEECIQgMAwsgBUUEQEEAIQggACEBDAMLIAVBAWshBSAIQQFqIQggBCABQQFqIgFHDQALIAYhBSAEIQELIAdBATYCACADIAU2AgAMAQsgA0EANgIAIAcgCDYCAAsgByABNgIEIAkoAgwhACAJKAIIDgMBBQIACwALIANBADYCHCADQa0dNgIQIANBFzYCDCADIABBAWo2A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AUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEHpzgALBQEBAAEBAEGAzwALAQEAQZrPAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQenQAAsFAQEAAQEAQYDRAAsBAQBBitEACwYCAAAAAAIAQaHRAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB4NIAC5oBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="; - let wasmBuffer$1; - Object.defineProperty(module, "exports", { get: () => { - return wasmBuffer$1 ? wasmBuffer$1 : wasmBuffer$1 = Buffer$2.from(wasmBase64$1, "base64"); - } }); -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js -var require_llhttp_simd_wasm = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) { - const { Buffer: Buffer$1 } = __require("node:buffer"); - const wasmBase64 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWF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gATYCCCABIAA2AgwgASACNgIIDAELQR8hAiAEQf///wdNBEAgBEEmIARBCHZnIgBrdkEBcSAAQQF0a0E+aiECCyABIAI2AhwgAUIANwIQIAJBAnRBsNYAaiEAAkBBhNQAKAIAIgNBASACdCIHcUUEQCAAIAE2AgBBhNQAIAMgB3I2AgAgASAANgIYIAEgATYCCCABIAE2AgwMAQsgBEEZIAJBAXZrQQAgAkEfRxt0IQIgACgCACEAAkADQCAAIgMoAgRBeHEgBEYNASACQR12IQAgAkEBdCECIAMgAEEEcWpBEGoiBygCACIADQALIAcgATYCACABIAM2AhggASABNgIMIAEgATYCCAwBCyADKAIIIgAgATYCDCADIAE2AgggAUEANgIYIAEgAzYCDCABIAA2AggLQaDUAEGg1AAoAgBBAWsiAEF/IAAbNgIACwsHACAALQAoCwcAIAAtACoLBwAgAC0AKwsHACAALQApCwcAIAAvATQLBwAgAC0AMAtAAQR/IAAoAhghASAALwEuIQIgAC0AKCEDIAAoAjghBCAAEDcgACAENgI4IAAgAzoAKCAAIAI7AS4gACABNgIYC8X4AQIHfwN+IAEgAmohBAJAIAAiAygCDCIADQAgAygCBARAIAMgATYCBAsjAEEQayIJJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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bYBDBkLQbcBDBgLQbgBDBcLQQEMFgtBuQEMFQtBugEMFAtBuwEMEwtBvAEMEgtBvQEMEQtBvgEMEAtBvwEMDwtBwAEMDgtBwQEMDQtBwgEMDAtBwwEMCwtBxAEMCgtBxQEMCQtBxgEMCAtB1AEMBwtBxwEMBgtByAEMBQtByQEMBAtBygEMAwtBywEMAgtBzQEMAQtBzAELIQIDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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gASAMp2oiARAxIgBFDSsgA0EHNgIcIAMgATYCFCADIAA2AgwM+wILIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAARQ0rIABBFUYEQCADQQo2AhwgAyABNgIUIANB8Rg2AhAgA0EVNgIMQQAhAgz6AgtBACECIANBADYCHCADIAE2AhQgA0GLDDYCECADQRM2AgwM+QILQQAhAiADQQA2AhwgAyABNgIUIANBsRQ2AhAgA0ECNgIMDPgCC0EAIQIgA0EANgIcIAMgATYCFCADQYwUNgIQIANBGTYCDAz3AgtBACECIANBADYCHCADIAE2AhQgA0HRHDYCECADQRk2AgwM9gILIABBFUYNPUEAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAz1AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQ0oIANBDTYCHCADIAE2AhQgAyAANgIMDPQCCyAAQRVGDTpBACECIANBADYCHCADIAE2AhQgA0GiDzYCECADQSI2AgwM8wILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDIiAEUEQCABQQFqIQEMKAsgA0EONgIcIAMgADYCDCADIAFBAWo2AhQM8gILIABBFUYNN0EAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAzxAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQRAIAFBAWohAQwnCyADQQ82AhwgAyAANgIMIAMgAUEBajYCFAzwAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM7wILIABBFUYNM0EAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzuAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQ0lIANBETYCHCADIAE2AhQgAyAANgIMDO0CCyAAQRVGDTBBACECIANBADYCHCADIAE2AhQgA0HODDYCECADQSM2AgwM7AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEMJQsgA0ESNgIcIAMgADYCDCADIAFBAWo2AhQM6wILIANBL2otAABBAXFFDQELQRUhAgzPAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM6AILIABBO0cNACABQQFqIQEMDAtBACECIANBADYCHCADIAE2AhQgA0GYFzYCECADQQI2AgwM5gILIABBFUYNKEEAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzlAgsgA0EUNgIcIAMgATYCFCADIAA2AgwM5AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEM3AILIANBFTYCHCADIAA2AgwgAyABQQFqNgIUDOMCCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNoCCyADQRc2AhwgAyAANgIMIAMgAUEBajYCFAziAgsgAEEVRg0jQQAhAiADQQA2AhwgAyABNgIUIANBzgw2AhAgA0EjNgIMDOECCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDB0LIANBGTYCHCADIAA2AgwgAyABQQFqNgIUDOACCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNYCCyADQRo2AhwgAyAANgIMIAMgAUEBajYCFAzfAgsgAEEVRg0fQQAhAiADQQA2AhwgAyABNgIUIANBog82AhAgA0EiNgIMDN4CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUDN0CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDNICCyADQR02AhwgAyAANgIMIAMgAUEBajYCFAzcAgsgAEE7Rw0BIAFBAWohAQtBJCECDMACC0EAIQIgA0EANgIcIAMgATYCFCADQc4UNgIQIANBDDYCDAzZAgsgASAERwRAA0AgAS0AAEEgRw3xASAEIAFBAWoiAUcNAAtBLCECDNkCC0EsIQIM2AILIAEgBEYEQEE0IQIM2AILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEB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Y8bNgIQIANBFTYCDEEAIQIMvgILIANBIDYCHCADIAE2AhQgA0GeGTYCECADQRU2AgxBACECDL0CCyADQRM2AhwgAyABNgIUIANBnhk2AhAgA0EVNgIMQQAhAgy8AgsgA0ELNgIcIAMgATYCFCADQZ4ZNgIQIANBFTYCDEEAIQIMuwILIANBEDYCHCADIAE2AhQgA0GeGTYCECADQRU2AgxBACECDLoCCyADQSA2AhwgAyABNgIUIANBjxs2AhAgA0EVNgIMQQAhAgy5AgsgA0ELNgIcIAMgATYCFCADQY8bNgIQIANBFTYCDEEAIQIMuAILIANBDDYCHCADIAE2AhQgA0GPGzYCECADQRU2AgxBACECDLcCC0EAIQIgA0EANgIcIAMgATYCFCADQa8ONgIQIANBEjYCDAy2AgsCQANAAkAgAS0AAEEKaw4EAAICAAILIAQgAUEBaiIBRw0AC0HsASECDLYCCwJAAkAgAy0ANkEBRw0AQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB6wE2AhwgAyABNgIUIANB4hg2AhAgA0EVNgIMQQAhAgy3AgtBzAEhAgycAgsgA0EANgIcIAMgATYCFCADQfELNgIQIANBHzYCDEEAIQIMtQILAkACQCADLQAoQQFrDgIEAQALQcsBIQIMmwILQcQBIQIMmgILIANBAjoAMUEAIQACQCADKAI4IgJFDQAgAigCACICRQ0AIAMgAhEAACEACyAARQRAQc0BIQIMmgILIABBFUcEQCADQQA2AhwgAyABNgIUIANBrAw2AhAgA0EQNgIMQQAhAgy0AgsgA0HqATYCHCADIAE2AhQgA0GHGTYCECADQRU2AgxBACECDLMCCyABIARGBEBB6QEhAgyzAgsgAS0AAEHIAEYNASADQQE6ACgLQbYBIQIMlwILQcoBIQIMlgILIAEgBEcEQCADQQw2AgggAyABNgIEQckBIQIMlgILQegBIQIMrwILIAEgBEYEQEHnASECDK8CCyABLQAAQcgARw0EIAFBAWohAUHIASECDJQCCyABIARGBEBB5gEhAgyuAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQcYBIQIMlAILIAFBAWohAUHHASECDJMCC0HlASECIAEgBEYNrAIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB99MAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMrQILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAtIgBFBEBB1AEhAgyTAgsgA0HkATYCHCADIAE2AhQgAyAANgIMQQAhAgysAgtB4wEhAiABIARGDasCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQfXTAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADKwCCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAtIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB0B42AhAgA0EINgIMDKkCC0HFASECDI4CCyADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDKcCC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQ1lIABBFUcEQCADQQA2AhwgAyABNgIUIANB1A42AhAgA0EgNgIMQQAhAgynAgsgA0GFATYCHCADIAE2AhQgA0HXGjYCECADQRU2AgxBACECDKYCC0HhASECIAQgASIARg2lAiAEIAFrIAMoAgAiAWohBSAAIAFrQQRqIQYCQANAIAAtAAAgAUHw0wBqLQAARw0BIAFBBEYNAyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBTYCAAymAgsgA0EANgIcIAMgADYCFCADQYQ3NgIQIANBCDYCDCADQQA2AgBBACECDKUCCyABIARHBEAgA0ENNgIIIAMgATYCBEHCASECDIsCC0HgASECDKQCCyADQQA2AgAgBkEBaiEBC0HDASECDIgCCyABIARGBEBB3wEhAgyiAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBwQEhAgyIAgsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYgCIANB3gE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILIAEgBEYEQEHdASECDKECCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYkCIANB3AE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILQcABIQIMhgILIAEgBEYEQEHbASECDKACC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDQIgA0HYATYCHCADIAE2AhQgAyAANgIMQQAhAgyiAgsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYsCIANB2QE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILIAMoAgQhACADQQA2AgQgAyAAIAEQLiIARQ2JAiADQdoBNgIcIAMgATYCFCADIAA2AgwMoAILQb8BIQIMhQILQQAhAAJAIAMoAjgiAkUNACACKAI8IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBnA02AhAgA0EhNgIMQQAhAgygAgtBvgEhAgyFAgsgA0HXATYCHCADIAE2AhQgA0HWGTYCECADQRU2AgxBACECDJ4CCyABIARGBEBB1wEhAgyeAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANB6xA2AhAgA0EJNgIMQQAhAgyeAgtBvQEhAgyDAgsgASAERgRAQdYBIQIMnQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQYAdNgIQIANBDTYCDAyeAgsgA0EANgIcIAMgATYCFCADQYAdNgIQIANBDTYCDEEAIQIMnQILQbwBIQIMggILIAEgBEYEQEHVASECDJwCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GAHTYCECADQQ02AgwMnQILIANBADYCHCADIAE2AhQgA0GAHTYCECADQQ02AgxBACECDJwCC0G7ASECDIECCyABIARGBEBB1AEhAgybAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBgB02AhAgA0ENNgIMDJwCCyADQQA2AhwgAyABNgIUIANBgB02AhAgA0ENNgIMQQAhAgybAgtBugEhAgyAAgsgASAERgRAQdMBIQIMmgILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUG5ASECDIECCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GFCzYCECADQQ02AgxBACECDJoCCyADQQA2AhwgAyABNgIUIANBhQs2AhAgA0ENNgIMQQAhAgyZAgsgASAERwRAIANBDjYCCCADIAE2AgRBASECDP8BC0HSASECDJgCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB0QEhAgyZAgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFBEAgAUEBaiEBDAQLIANB0AE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMmAILIAMoAgQhACADQQA2AgQgAyAAIAEQLCIADQEgAUEBagshAUG3ASEC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sgAUEBaiEBQZoBIQIM2gELIAEgBEYEQEGyASECDPQBCwJAAkAgAS0AAEHSAGsOAwAwATALIAFBAWohAUGZASECDNoBCyABQQFqIQFBBAwtC0GxASECIAEgBEYN8gEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBsNMAai0AAEcNLCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM8wELIANBADYCACAGQQFqIQFBHQwsCyABIARGBEBBsAEhAgzyAQsCQAJAIAEtAABByQBrDgcBLi4uLi4ALgsgAUEBaiEBQZcBIQIM2AELIAFBAWohAUEiDCsLIAEgBEYEQEGvASECDPEBCyABLQAAQdAARw0rIAFBAWohAUGWASECDNYBCyABIARGBEBBrgEhAgzwAQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGUASECDNYBCyABQQFqIQFBlQEhAgzVAQtBrQEhAiABIARGDe4BIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQazTAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO8BCyADQQA2AgAgBkEBaiEBQQ0MKAtBrAEhAiABIARGDe0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQeHTAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO4BCyADQQA2AgAgBkEBaiEBQQwMJwtBqwEhAiABIARGDewBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQarTAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO0BCyADQQA2AgAgBkEBaiEBQQMMJgtBqgEhAiABIARGDesBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQajTAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOwBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQakBIQIM6wELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBjwEhAgzRAQsgAUEBaiEBQZABIQIM0AELQagBIQIgASAERg3pASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm0wBqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzqAQsgA0EANgIAIAZBAWohAUEnDCMLQacBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk0wBqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEcDCILQaYBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGe0wBqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEGDCELQaUBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEGZ0wBqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGkASECDOYBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQYQBIQIMzgELIAFBAWohAUGFASECDM0BCyABQQFqIQFBigEhAgzMAQsgAUEBaiEBQYsBIQIMywELQaMBIQIgASAERg3kASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGX0wBqLQAARw0eIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzlAQsgA0EANgIAIAZBAWohAUELDB4LIAEgBEYEQEGiASECDOQBCwJAAkAgAS0AAEHBAGsOAwAgASALIAFBAWohAUGGASECDMoBCyABQQF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LQAAQeDKAGotAAAiAEECRwRAIABBAUcEQEHfACECDIsBCwwnCyAEIAFBAWoiAUcNAAtB9QAhAgyiAQsgASAERgRAQfQAIQIMogELAkAgAS0AAEEJaw43JQMGJQQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDIYBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMngELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMnQELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB8AA2AhwgAyABNgIUIAMgADYCDEEAIQIMnAELIANBADYCHCADIAE2AhQgA0G8EzYCECADQQc2AgxBACECDJsBCwJAAkACQAJAA0AgAS0AAEHgyABqLQAAIgBBBUcEQAJAIABBAWsOBiQDBAUGAAYLQd4AIQIMhgELIAQgAUEBaiIBRw0AC0HzACECDJ4BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDJ0BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDJwBCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQfAANgIcIAMgATYCFCADIAA2AgxBACECDJsBCyADQQA2AhwgAyABNgIUIANB3Ag2AhAgA0EHNgIMQQAhAgyaAQsgASAERg0BIAFBAWoLIQFBBiECDH4LQfIAIQIMlwELAkACQAJAAkADQCABLQAAQeDGAGotAAAiAEEFRwRAIABBAWsOBB8CAwQFCyAEIAFBAWoiAUcNAAtB8QAhAgyaAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyZAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyYAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HwADYCHCADIAE2AhQgAyAANgIMQQAhAgyXAQsgA0EANgIcIAMgATYCFCADQbQKNgIQIANBBzYCDEEAIQIMlgELQc4AIQIMewtB0AAhAgx6C0HdACECDHkLIAEgBEYEQEHwACECDJMBCwJAIAEtAABBCWsOBBYAABYACyABQQFqIQFB3AAhAgx4CyABIARGBEBB7wAhAgySAQsCQCABLQAAQQlrDgQVAAAVAAtBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUEQEHTASECDHgLIABBFUcEQCADQQA2AhwgAyABNgIUIANBwQ02AhAgA0EaNgIMQQAhAgySAQsgA0HuADYCHCADIAE2AhQgA0HwGTYCECADQRU2AgxBACECDJEBC0HtACECIAEgBEYNkAEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB18YAai0AAEcNBCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkQELIANBADYCACAGQQFqIQEgAy0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACECIANBADYCHCADIAE2AhQgA0HlCTYCECADQQg2AgwMkAELQewAIQIgASAERg2PASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHUxgBqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyQAQsgA0EANgIAIAZBAWohASADLQApQSFGDQMgA0EANgIcIAMgATYCFCADQYkKNgIQIANBCDYCDEEAIQIMjwELQesAIQIgASAERg2OASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHQxgBqLQAARw0CIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyPAQsgA0EANgIAIAZBAWohASADLQApIgBBI0kNAiAAQS5GDQIgA0EANgIcIAMgATYCFCADQcEJNgIQIANBCDYCDEEAIQIMjgELIANBADYCAAtBACECIANBADYCHCADIAE2AhQgA0GENzYCECADQQg2AgwMjAELQdgAIQIMcQsgASAERwRAIANBDTYCCCADIAE2AgRB1wAhAgxxC0HqACECDIoBCyABIARGBEBB6QAhAgyKAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1gAhAgxwCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdCADQegANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyABIARGBEBB5wAhAgyJAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLiIARQ11IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMiQELQdUAIQIMbgsgASAERgRAQeUAIQIMiAELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDIoBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdyADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdSADQeQANgIcIAMgATYCFCADIAA2AgwMiAELQdMAIQIMbQsgAy0AKUEiRg2AAUHSACECDGwLQQAhAAJAIAMoAjgiAkUNACACKAI8IgJFDQAgAyACEQAAIQALIABFBEBB1AAhAgxsCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQZwNNgIQIANBITYCDEEAIQIMhgELIANB4QA2AhwgAyABNgIUIANB1hk2AhAgA0EVNgIMQQAhAgyFAQsgASAERgRAQeAAIQIMhQELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HRACECDGwLIANBADYCHCADIAE2AhQgA0GIETYCECADQQk2AgxBACECDIUBCyADQQA2AhwgAyABNgIUIANBiBE2AhAgA0EJNgIMQQAhAgyEAQsgASAERgRAQd8AIQIMhAELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBiBE2AhAgA0ECNgIMQQAhAgyDAQsgASAERgRAQd0AIQIMgwELIAEtAAAiAkENRgRAIAFBAWohAUHPACECDGkLIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyCAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0G1LDYCECADQQc2AgwMgAELIAEgBEYEQEHbACECDIABCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc0AIQIMZAsgASAERgRAQdoAIQIMfgsgAS0AAEEJaw4EAAEBAAELQQAhAiADQQA2AhwgA0HsETYCECADQQc2AgwgAyABQQFqNgIUDHwLIANBgBI7ASpBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HZADYCHCADIAE2AhQgA0HwGTYCECADQRU2AgxBACECDHsLQcwAIQIMYAsgA0EANgIcIAMgATYCFCADQcENNgIQIANBGjYCDEEAIQIMeQsgASAERgRAQdkAIQIMeQsgAS0AAEEgRw06IAFBAWohASADLQAuQQFxDTogA0EANgIcIAMgATYCFCADQa0bNgIQIANBHjYCDEEAIQIMeAsgASAERgRAQdgAIQIMeAsCQAJAAkACQAJAIAEtAAAiAEEKaw4EAgMDAAELIAFBAWohAUErIQIMYQsgAEE6Rw0BIANBADYCHCADIAE2AhQgA0G5ETYCECADQQo2AgxBACECDHoLIAFBAWohASADQS9qLQAAQQFxRQ1tIA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LIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQekPNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLiECDCoLIANBADYCHCADIAE2AhQgA0GzEjYCECADQQs2AgxBACECDEMLQdIBIQIMKAsgASAERgRAQS4hAgxCCyADQQA2AgQgA0ERNgIIIAMgASABEDAiAA0BC0EtIQIMJgsgA0EtNgIcIAMgATYCFCADIAA2AgxBACECDD8LQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2AA2AhwgAyABNgIUIANBnho2AhAgA0EVNgIMQQAhAgw+C0HLACECDCMLIANBADYCHCADIAE2AhQgA0GFDjYCECADQR02AgxBACECDDwLIAEgBEYEQEHOACECDDwLIAEtAAAiAEEgRg0CIABBOkYNAQsgA0EAOgAsQQkhAgwgCyADKAIEIQAgA0EANgIEIAMgACABEC8iAA0BDAILIAMtAC5BAXEEQEHPASECDB8LIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ0CIANBKjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgw4CyADQcsANgIcIAMgADYCDCADIAFBAWo2AhRBACECDDcLIAFBAWohAUE/IQIMHAsgAUEBaiEBDCkLIAEgBEYEQEErIQIMNQsCQCABLQAAQQpGBEAgAUEBaiEBDAELIAMtAC5BwABxRQ0GCyADLQAyQYABcQRAQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIABFDREgAEEVRgRAIANBBTYCHCADIAE2AhQgA0GGGjYCECADQRU2AgxBACECDDYLIANBADYCHCADIAE2AhQgA0HiDTYCECADQRQ2AgxBACECDDULIANBMmohAiADEDRBACEAAkAgAygCOCIGRQ0AIAYoAi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gwMGAtBACECIANBADYCHCADIAE2AhQgA0HXCjYCECADQQk2AgwMFwtBACECIANBADYCHCADIAE2AhQgA0G/EDYCECADQQk2AgwMFgtBACECIANBADYCHCADIAE2AhQgA0GkETYCECADQQk2AgwMFQtBACECIANBADYCHCADIAE2AhQgA0HVEDYCECADQQk2AgwMFAtBACECIANBADYCHCADIAE2AhQgA0HXCjYCECADQQk2AgwMEwtBACECIANBADYCHCADIAE2AhQgA0G/EDYCECADQQk2AgwMEgtBACECIANBADYCHCADIAE2AhQgA0GkETYCECADQQk2AgwMEQtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMEAtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMDwtBACECIANBADYCHCADIAE2AhQgA0HIEjYCECADQQs2AgwMDgtBACECIANBADYCHCADIAE2AhQgA0GVCTYCECADQQs2AgwMDQtBACECIANBADYCHCADIAE2AhQgA0HpDzYCECADQQo2AgwMDAtBACECIANBADYCHCADIAE2AhQgA0GDEDYCECADQQo2AgwMCwtBACECIANBADYCHCADIAE2AhQgA0GmHDYCECADQQI2AgwMCgtBACECIANBADYCHCADIAE2AhQgA0HFFTYCECADQQI2AgwMCQtBACECIANBADYCHCADIAE2AhQgA0H/FzYCECADQQI2AgwMCAtBACECIANBADYCHCADIAE2AhQgA0HKFzYCECADQQI2AgwMBwsgA0ECNgIcIAMgATYCFCADQZQdNgIQIANBFjYCDEEAIQIMBgtB3gAhAiABIARGDQUgCUEIaiEHIAMoAgAhBQJAAkAgASAERwRAIAVBxsYAaiEIIAQgBWogAWshBiAFQX9zQQpqIgUgAWohAANAIAEtAAAgCC0AAEcEQEECIQgMAwsgBUUEQEEAIQggACEBDAMLIAVBAWshBSAIQQFqIQggBCABQQFqIgFHDQALIAYhBSAEIQELIAdBATYCACADIAU2AgAMAQsgA0EANgIAIAcgCDYCAAsgByABNgIEIAkoAgwhACAJKAIIDgMBBQIACwALIANBADYCHCADQa0dNgIQIANBFzYCDCADIABB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AUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFAAAABQBB6c4ACwUBAQABAQBBgM8ACwEBAEGazwALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEHp0AALBQEBAAEBAEGA0QALAQEAQYrRAAsGAgAAAAACAEGh0QALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQeDSAAuaAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VVRVJZT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; - let wasmBuffer; - Object.defineProperty(module, "exports", { get: () => { - return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer$1.from(wasmBase64, "base64"); - } }); -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/constants.js -var require_constants$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/constants.js"(exports, module) { - const corsSafeListedMethods = [ - "GET", - "HEAD", - "POST" - ]; - const corsSafeListedMethodsSet$1 = new Set(corsSafeListedMethods); - const nullBodyStatus$2 = [ - 101, - 204, - 205, - 304 - ]; - const redirectStatus = [ - 301, - 302, - 303, - 307, - 308 - ]; - const redirectStatusSet$3 = new Set(redirectStatus); - /** - * @see https://fetch.spec.whatwg.org/#block-bad-port - */ - const badPorts = [ - "1", - "7", - "9", - "11", - "13", - "15", - "17", - "19", - "20", - "21", - "22", - "23", - "25", - "37", - "42", - "43", - "53", - "69", - "77", - "79", - "87", - "95", - "101", - "102", - "103", - "104", - "109", - "110", - "111", - "113", - "115", - "117", - "119", - "123", - "135", - "137", - "139", - "143", - "161", - "179", - "389", - "427", - "465", - "512", - "513", - "514", - "515", - "526", - "530", - "531", - "532", - "540", - "548", - "554", - "556", - "563", - "587", - "601", - "636", - "989", - "990", - "993", - "995", - "1719", - "1720", - "1723", - "2049", - "3659", - "4045", - "4190", - "5060", - "5061", - "6000", - "6566", - "6665", - "6666", - "6667", - "6668", - "6669", - "6679", - "6697", - "10080" - ]; - const badPortsSet$1 = new Set(badPorts); - /** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header - */ - const referrerPolicyTokens$1 = [ - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ]; - /** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ - const referrerPolicy$1 = ["", ...referrerPolicyTokens$1]; - const referrerPolicyTokensSet = new Set(referrerPolicyTokens$1); - const requestRedirect$1 = [ - "follow", - "manual", - "error" - ]; - const safeMethods = [ - "GET", - "HEAD", - "OPTIONS", - "TRACE" - ]; - const safeMethodsSet$1 = new Set(safeMethods); - const requestMode$1 = [ - "navigate", - "same-origin", - "no-cors", - "cors" - ]; - const requestCredentials$1 = [ - "omit", - "same-origin", - "include" - ]; - const requestCache$1 = [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" - ]; - /** - * @see https://fetch.spec.whatwg.org/#request-body-header-name - */ - const requestBodyHeader$1 = [ - "content-encoding", - "content-language", - "content-location", - "content-type", - "content-length" - ]; - /** - * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex - */ - const requestDuplex$1 = ["half"]; - /** - * @see http://fetch.spec.whatwg.org/#forbidden-method - */ - const forbiddenMethods = [ - "CONNECT", - "TRACE", - "TRACK" - ]; - const forbiddenMethodsSet$1 = new Set(forbiddenMethods); - const subresource = [ - "audio", - "audioworklet", - "font", - "image", - "manifest", - "paintworklet", - "script", - "style", - "track", - "video", - "xslt", - "" - ]; - const subresourceSet$1 = new Set(subresource); - module.exports = { - subresource, - forbiddenMethods, - requestBodyHeader: requestBodyHeader$1, - referrerPolicy: referrerPolicy$1, - requestRedirect: requestRedirect$1, - requestMode: requestMode$1, - requestCredentials: requestCredentials$1, - requestCache: requestCache$1, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus: nullBodyStatus$2, - safeMethods, - badPorts, - requestDuplex: requestDuplex$1, - subresourceSet: subresourceSet$1, - badPortsSet: badPortsSet$1, - redirectStatusSet: redirectStatusSet$3, - corsSafeListedMethodsSet: corsSafeListedMethodsSet$1, - safeMethodsSet: safeMethodsSet$1, - forbiddenMethodsSet: forbiddenMethodsSet$1, - referrerPolicyTokens: referrerPolicyTokensSet - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/global.js -var require_global$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/global.js"(exports, module) { - const globalOrigin = Symbol.for("undici.globalOrigin.1"); - function getGlobalOrigin$2() { - return globalThis[globalOrigin]; - } - function setGlobalOrigin$1(newOrigin) { - if (newOrigin === void 0) { - Object.defineProperty(globalThis, globalOrigin, { - value: void 0, - writable: true, - enumerable: false, - configurable: false - }); - return; - } - const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }); - } - module.exports = { - getGlobalOrigin: getGlobalOrigin$2, - setGlobalOrigin: setGlobalOrigin$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/data-url.js -var require_data_url = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/data-url.js"(exports, module) { - const assert$26 = __require("node:assert"); - const encoder = new TextEncoder(); - /** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ - const HTTP_TOKEN_CODEPOINTS$1 = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; - const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; - const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; - /** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ - const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; - /** @param {URL} dataURL */ - function dataURLProcessor$1(dataURL) { - assert$26(dataURL.protocol === "data:"); - let input = URLSerializer$4(dataURL, true); - input = input.slice(5); - const position = { position: 0 }; - let mimeType = collectASequenceOfCodePointsFast$2(",", input, position); - const mimeTypeLength = mimeType.length; - mimeType = removeASCIIWhitespace(mimeType, true, true); - if (position.position >= input.length) return "failure"; - position.position++; - const encodedBody = input.slice(mimeTypeLength + 1); - let body = stringPercentDecode(encodedBody); - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - const stringBody = isomorphicDecode$1(body); - body = forgivingBase64(stringBody); - if (body === "failure") return "failure"; - mimeType = mimeType.slice(0, -6); - mimeType = mimeType.replace(/(\u0020)+$/, ""); - mimeType = mimeType.slice(0, -1); - } - if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; - let mimeTypeRecord = parseMIMEType$3(mimeType); - if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType$3("text/plain;charset=US-ASCII"); - return { - mimeType: mimeTypeRecord, - body - }; - } - /** - * @param {URL} url - * @param {boolean} excludeFragment - */ - function URLSerializer$4(url, excludeFragment = false) { - if (!excludeFragment) return url.href; - const href = url.href; - const hashLength = url.hash.length; - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); - if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); - return serialized; - } - /** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ - function collectASequenceOfCodePoints$1(condition, input, position) { - let result = ""; - while (position.position < input.length && condition(input[position.position])) { - result += input[position.position]; - position.position++; - } - return result; - } - /** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ - function collectASequenceOfCodePointsFast$2(char, input, position) { - const idx = input.indexOf(char, position.position); - const start = position.position; - if (idx === -1) { - position.position = input.length; - return input.slice(start); - } - position.position = idx; - return input.slice(start, position.position); - } - /** @param {string} input */ - function stringPercentDecode(input) { - const bytes = encoder.encode(input); - return percentDecode(bytes); - } - /** - * @param {number} byte - */ - function isHexCharByte(byte) { - return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; - } - /** - * @param {number} byte - */ - function hexByteToNumber(byte) { - return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55; - } - /** @param {Uint8Array} input */ - function percentDecode(input) { - const length = input.length; - /** @type {Uint8Array} */ - const output = new Uint8Array(length); - let j = 0; - for (let i = 0; i < length; ++i) { - const byte = input[i]; - if (byte !== 37) output[j++] = byte; - else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; - else { - output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); - i += 2; - } - } - return length === j ? output : output.subarray(0, j); - } - /** @param {string} input */ - function parseMIMEType$3(input) { - input = removeHTTPWhitespace$1(input, true, true); - const position = { position: 0 }; - const type = collectASequenceOfCodePointsFast$2("/", input, position); - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS$1.test(type)) return "failure"; - if (position.position >= input.length) return "failure"; - position.position++; - let subtype = collectASequenceOfCodePointsFast$2(";", input, position); - subtype = removeHTTPWhitespace$1(subtype, false, true); - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS$1.test(subtype)) return "failure"; - const typeLowercase = type.toLowerCase(); - const subtypeLowercase = subtype.toLowerCase(); - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - parameters: new Map(), - essence: `${typeLowercase}/${subtypeLowercase}` - }; - while (position.position < input.length) { - position.position++; - collectASequenceOfCodePoints$1( - // https://fetch.spec.whatwg.org/#http-whitespace - (char) => HTTP_WHITESPACE_REGEX.test(char), - input, - position -); - let parameterName = collectASequenceOfCodePoints$1((char) => char !== ";" && char !== "=", input, position); - parameterName = parameterName.toLowerCase(); - if (position.position < input.length) { - if (input[position.position] === ";") continue; - position.position++; - } - if (position.position >= input.length) break; - let parameterValue = null; - if (input[position.position] === "\"") { - parameterValue = collectAnHTTPQuotedString$1(input, position, true); - collectASequenceOfCodePointsFast$2(";", input, position); - } else { - parameterValue = collectASequenceOfCodePointsFast$2(";", input, position); - parameterValue = removeHTTPWhitespace$1(parameterValue, false, true); - if (parameterValue.length === 0) continue; - } - if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS$1.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); - } - return mimeType; - } - /** @param {string} data */ - function forgivingBase64(data) { - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); - let dataLength = data.length; - if (dataLength % 4 === 0) { - if (data.charCodeAt(dataLength - 1) === 61) { - --dataLength; - if (data.charCodeAt(dataLength - 1) === 61) --dataLength; - } - } - if (dataLength % 4 === 1) return "failure"; - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; - const buffer$1 = Buffer.from(data, "base64"); - return new Uint8Array(buffer$1.buffer, buffer$1.byteOffset, buffer$1.byteLength); - } - /** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean} [extractValue=false] - */ - function collectAnHTTPQuotedString$1(input, position, extractValue = false) { - const positionStart = position.position; - let value = ""; - assert$26(input[position.position] === "\""); - position.position++; - while (true) { - value += collectASequenceOfCodePoints$1((char) => char !== "\"" && char !== "\\", input, position); - if (position.position >= input.length) break; - const quoteOrBackslash = input[position.position]; - position.position++; - if (quoteOrBackslash === "\\") { - if (position.position >= input.length) { - value += "\\"; - break; - } - value += input[position.position]; - position.position++; - } else { - assert$26(quoteOrBackslash === "\""); - break; - } - } - if (extractValue) return value; - return input.slice(positionStart, position.position); - } - /** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ - function serializeAMimeType$3(mimeType) { - assert$26(mimeType !== "failure"); - const { parameters, essence } = mimeType; - let serialization = essence; - for (let [name, value] of parameters.entries()) { - serialization += ";"; - serialization += name; - serialization += "="; - if (!HTTP_TOKEN_CODEPOINTS$1.test(value)) { - value = value.replace(/(\\|")/g, "\\$1"); - value = "\"" + value; - value += "\""; - } - serialization += value; - } - return serialization; - } - /** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {number} char - */ - function isHTTPWhiteSpace(char) { - return char === 13 || char === 10 || char === 9 || char === 32; - } - /** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ - function removeHTTPWhitespace$1(str, leading = true, trailing = true) { - return removeChars$2(str, leading, trailing, isHTTPWhiteSpace); - } - /** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {number} char - */ - function isASCIIWhitespace(char) { - return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; - } - /** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ - function removeASCIIWhitespace(str, leading = true, trailing = true) { - return removeChars$2(str, leading, trailing, isASCIIWhitespace); - } - /** - * @param {string} str - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns - */ - function removeChars$2(str, leading, trailing, predicate) { - let lead = 0; - let trail = str.length - 1; - if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; - if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); - } - /** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {Uint8Array} input - * @returns {string} - */ - function isomorphicDecode$1(input) { - const length = input.length; - if (65535 > length) return String.fromCharCode.apply(null, input); - let result = ""; - let i = 0; - let addition = 65535; - while (i < length) { - if (i + addition > length) addition = length - i; - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); - } - return result; - } - /** - * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type - * @param {Exclude, 'failure'>} mimeType - */ - function minimizeSupportedMimeType$1(mimeType) { - switch (mimeType.essence) { - case "application/ecmascript": - case "application/javascript": - case "application/x-ecmascript": - case "application/x-javascript": - case "text/ecmascript": - case "text/javascript": - case "text/javascript1.0": - case "text/javascript1.1": - case "text/javascript1.2": - case "text/javascript1.3": - case "text/javascript1.4": - case "text/javascript1.5": - case "text/jscript": - case "text/livescript": - case "text/x-ecmascript": - case "text/x-javascript": return "text/javascript"; - case "application/json": - case "text/json": return "application/json"; - case "image/svg+xml": return "image/svg+xml"; - case "text/xml": - case "application/xml": return "application/xml"; - } - if (mimeType.subtype.endsWith("+json")) return "application/json"; - if (mimeType.subtype.endsWith("+xml")) return "application/xml"; - return ""; - } - module.exports = { - dataURLProcessor: dataURLProcessor$1, - URLSerializer: URLSerializer$4, - collectASequenceOfCodePoints: collectASequenceOfCodePoints$1, - collectASequenceOfCodePointsFast: collectASequenceOfCodePointsFast$2, - stringPercentDecode, - parseMIMEType: parseMIMEType$3, - collectAnHTTPQuotedString: collectAnHTTPQuotedString$1, - serializeAMimeType: serializeAMimeType$3, - removeChars: removeChars$2, - removeHTTPWhitespace: removeHTTPWhitespace$1, - minimizeSupportedMimeType: minimizeSupportedMimeType$1, - HTTP_TOKEN_CODEPOINTS: HTTP_TOKEN_CODEPOINTS$1, - isomorphicDecode: isomorphicDecode$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/webidl.js -var require_webidl = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/webidl.js"(exports, module) { - const { types: types$3, inspect } = __require("node:util"); - const { markAsUncloneable } = __require("node:worker_threads"); - const { toUSVString } = require_util$5(); - const UNDEFINED = 1; - const BOOLEAN = 2; - const STRING = 3; - const SYMBOL = 4; - const NUMBER = 5; - const BIGINT = 6; - const NULL = 7; - const OBJECT = 8; - const FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance]); - /** @type {import('../../../types/webidl').Webidl} */ - const webidl$16 = { - converters: {}, - util: {}, - errors: {}, - is: {} - }; - webidl$16.errors.exception = function(message) { - return new TypeError(`${message.header}: ${message.message}`); - }; - webidl$16.errors.conversionFailed = function(context) { - const plural = context.types.length === 1 ? "" : " one of"; - const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; - return webidl$16.errors.exception({ - header: context.prefix, - message - }); - }; - webidl$16.errors.invalidArgument = function(context) { - return webidl$16.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }); - }; - webidl$16.brandCheck = function(V, I) { - if (!FunctionPrototypeSymbolHasInstance(I, V)) { - const err = new TypeError("Illegal invocation"); - err.code = "ERR_INVALID_THIS"; - throw err; - } - }; - webidl$16.brandCheckMultiple = function(List) { - const prototypes = List.map((c) => webidl$16.util.MakeTypeAssertion(c)); - return (V) => { - if (prototypes.every((typeCheck) => !typeCheck(V))) { - const err = new TypeError("Illegal invocation"); - err.code = "ERR_INVALID_THIS"; - throw err; - } - }; - }; - webidl$16.argumentLengthCheck = function({ length }, min, ctx) { - if (length < min) throw webidl$16.errors.exception({ - message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, - header: ctx - }); - }; - webidl$16.illegalConstructor = function() { - throw webidl$16.errors.exception({ - header: "TypeError", - message: "Illegal constructor" - }); - }; - webidl$16.util.MakeTypeAssertion = function(I) { - return (O) => FunctionPrototypeSymbolHasInstance(I, O); - }; - webidl$16.util.Type = function(V) { - switch (typeof V) { - case "undefined": return UNDEFINED; - case "boolean": return BOOLEAN; - case "string": return STRING; - case "symbol": return SYMBOL; - case "number": return NUMBER; - case "bigint": return BIGINT; - case "function": - case "object": { - if (V === null) return NULL; - return OBJECT; - } - } - }; - webidl$16.util.Types = { - UNDEFINED, - BOOLEAN, - STRING, - SYMBOL, - NUMBER, - BIGINT, - NULL, - OBJECT - }; - webidl$16.util.TypeValueToString = function(o) { - switch (webidl$16.util.Type(o)) { - case UNDEFINED: return "Undefined"; - case BOOLEAN: return "Boolean"; - case STRING: return "String"; - case SYMBOL: return "Symbol"; - case NUMBER: return "Number"; - case BIGINT: return "BigInt"; - case NULL: return "Null"; - case OBJECT: return "Object"; - } - }; - webidl$16.util.markAsUncloneable = markAsUncloneable || (() => {}); - webidl$16.util.ConvertToInt = function(V, bitLength, signedness, opts) { - let upperBound; - let lowerBound; - if (bitLength === 64) { - upperBound = Math.pow(2, 53) - 1; - if (signedness === "unsigned") lowerBound = 0; - else lowerBound = Math.pow(-2, 53) + 1; - } else if (signedness === "unsigned") { - lowerBound = 0; - upperBound = Math.pow(2, bitLength) - 1; - } else { - lowerBound = Math.pow(-2, bitLength) - 1; - upperBound = Math.pow(2, bitLength - 1) - 1; - } - let x = Number(V); - if (x === 0) x = 0; - if (opts?.enforceRange === true) { - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl$16.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${webidl$16.util.Stringify(V)} to an integer.` - }); - x = webidl$16.util.IntegerPart(x); - if (x < lowerBound || x > upperBound) throw webidl$16.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }); - return x; - } - if (!Number.isNaN(x) && opts?.clamp === true) { - x = Math.min(Math.max(x, lowerBound), upperBound); - if (Math.floor(x) % 2 === 0) x = Math.floor(x); - else x = Math.ceil(x); - return x; - } - if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; - x = webidl$16.util.IntegerPart(x); - x = x % Math.pow(2, bitLength); - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); - return x; - }; - webidl$16.util.IntegerPart = function(n) { - const r = Math.floor(Math.abs(n)); - if (n < 0) return -1 * r; - return r; - }; - webidl$16.util.Stringify = function(V) { - const type = webidl$16.util.Type(V); - switch (type) { - case SYMBOL: return `Symbol(${V.description})`; - case OBJECT: return inspect(V); - case STRING: return `"${V}"`; - default: return `${V}`; - } - }; - webidl$16.sequenceConverter = function(converter) { - return (V, prefix, argument, Iterable) => { - if (webidl$16.util.Type(V) !== OBJECT) throw webidl$16.errors.exception({ - header: prefix, - message: `${argument} (${webidl$16.util.Stringify(V)}) is not iterable.` - }); - /** @type {Generator} */ - const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq = []; - let index = 0; - if (method === void 0 || typeof method.next !== "function") throw webidl$16.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }); - while (true) { - const { done, value } = method.next(); - if (done) break; - seq.push(converter(value, prefix, `${argument}[${index++}]`)); - } - return seq; - }; - }; - webidl$16.recordConverter = function(keyConverter, valueConverter) { - return (O, prefix, argument) => { - if (webidl$16.util.Type(O) !== OBJECT) throw webidl$16.errors.exception({ - header: prefix, - message: `${argument} ("${webidl$16.util.TypeValueToString(O)}") is not an Object.` - }); - const result = {}; - if (!types$3.isProxy(O)) { - const keys$1 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; - for (const key of keys$1) { - const keyName = webidl$16.util.Stringify(key); - const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`); - const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`); - result[typedKey] = typedValue; - } - return result; - } - const keys = Reflect.ownKeys(O); - for (const key of keys) { - const desc = Reflect.getOwnPropertyDescriptor(O, key); - if (desc?.enumerable) { - const typedKey = keyConverter(key, prefix, argument); - const typedValue = valueConverter(O[key], prefix, argument); - result[typedKey] = typedValue; - } - } - return result; - }; - }; - webidl$16.interfaceConverter = function(TypeCheck, name) { - return (V, prefix, argument) => { - if (!TypeCheck(V)) throw webidl$16.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl$16.util.Stringify(V)}") to be an instance of ${name}.` - }); - return V; - }; - }; - webidl$16.dictionaryConverter = function(converters) { - return (dictionary, prefix, argument) => { - const dict = {}; - if (dictionary != null && webidl$16.util.Type(dictionary) !== OBJECT) throw webidl$16.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); - for (const options of converters) { - const { key, defaultValue, required, converter } = options; - if (required === true) { - if (dictionary == null || !Object.hasOwn(dictionary, key)) throw webidl$16.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }); - } - let value = dictionary?.[key]; - const hasDefault = defaultValue !== void 0; - if (hasDefault && value === void 0) value = defaultValue(); - if (required || hasDefault || value !== void 0) { - value = converter(value, prefix, `${argument}.${key}`); - if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl$16.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); - dict[key] = value; - } - } - return dict; - }; - }; - webidl$16.nullableConverter = function(converter) { - return (V, prefix, argument) => { - if (V === null) return V; - return converter(V, prefix, argument); - }; - }; - webidl$16.is.ReadableStream = webidl$16.util.MakeTypeAssertion(ReadableStream); - webidl$16.is.Blob = webidl$16.util.MakeTypeAssertion(Blob); - webidl$16.is.URLSearchParams = webidl$16.util.MakeTypeAssertion(URLSearchParams); - webidl$16.is.File = webidl$16.util.MakeTypeAssertion(globalThis.File ?? __require("node:buffer").File); - webidl$16.is.URL = webidl$16.util.MakeTypeAssertion(URL); - webidl$16.is.AbortSignal = webidl$16.util.MakeTypeAssertion(AbortSignal); - webidl$16.is.MessagePort = webidl$16.util.MakeTypeAssertion(MessagePort); - webidl$16.converters.DOMString = function(V, prefix, argument, opts) { - if (V === null && opts?.legacyNullToEmptyString) return ""; - if (typeof V === "symbol") throw webidl$16.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }); - return String(V); - }; - webidl$16.converters.ByteString = function(V, prefix, argument) { - if (typeof V === "symbol") throw webidl$16.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a ByteString.` - }); - const x = String(V); - for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); - return x; - }; - webidl$16.converters.USVString = toUSVString; - webidl$16.converters.boolean = function(V) { - const x = Boolean(V); - return x; - }; - webidl$16.converters.any = function(V) { - return V; - }; - webidl$16.converters["long long"] = function(V, prefix, argument) { - const x = webidl$16.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); - return x; - }; - webidl$16.converters["unsigned long long"] = function(V, prefix, argument) { - const x = webidl$16.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); - return x; - }; - webidl$16.converters["unsigned long"] = function(V, prefix, argument) { - const x = webidl$16.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); - return x; - }; - webidl$16.converters["unsigned short"] = function(V, prefix, argument, opts) { - const x = webidl$16.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); - return x; - }; - webidl$16.converters.ArrayBuffer = function(V, prefix, argument, opts) { - if (webidl$16.util.Type(V) !== OBJECT || !types$3.isAnyArrayBuffer(V)) throw webidl$16.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl$16.util.Stringify(V)}")`, - types: ["ArrayBuffer"] - }); - if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V)) throw webidl$16.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - if (V.resizable || V.growable) throw webidl$16.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); - return V; - }; - webidl$16.converters.TypedArray = function(V, T, prefix, name, opts) { - if (webidl$16.util.Type(V) !== OBJECT || !types$3.isTypedArray(V) || V.constructor.name !== T.name) throw webidl$16.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl$16.util.Stringify(V)}")`, - types: [T.name] - }); - if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl$16.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - if (V.buffer.resizable || V.buffer.growable) throw webidl$16.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); - return V; - }; - webidl$16.converters.DataView = function(V, prefix, name, opts) { - if (webidl$16.util.Type(V) !== OBJECT || !types$3.isDataView(V)) throw webidl$16.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }); - if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl$16.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - if (V.buffer.resizable || V.buffer.growable) throw webidl$16.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); - return V; - }; - webidl$16.converters["sequence"] = webidl$16.sequenceConverter(webidl$16.converters.ByteString); - webidl$16.converters["sequence>"] = webidl$16.sequenceConverter(webidl$16.converters["sequence"]); - webidl$16.converters["record"] = webidl$16.recordConverter(webidl$16.converters.ByteString, webidl$16.converters.ByteString); - webidl$16.converters.Blob = webidl$16.interfaceConverter(webidl$16.is.Blob, "Blob"); - webidl$16.converters.AbortSignal = webidl$16.interfaceConverter(webidl$16.is.AbortSignal, "AbortSignal"); - module.exports = { webidl: webidl$16 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/util.js -var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/util.js"(exports, module) { - const { Transform: Transform$2 } = __require("node:stream"); - const zlib$1 = __require("node:zlib"); - const { redirectStatusSet: redirectStatusSet$2, referrerPolicyTokens, badPortsSet } = require_constants$2(); - const { getGlobalOrigin: getGlobalOrigin$1 } = require_global$1(); - const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars: removeChars$1, parseMIMEType: parseMIMEType$2 } = require_data_url(); - const { performance: performance$1 } = __require("node:perf_hooks"); - const { ReadableStreamFrom: ReadableStreamFrom$2, isValidHTTPToken: isValidHTTPToken$1, normalizedMethodRecordsBase: normalizedMethodRecordsBase$1 } = require_util$5(); - const assert$25 = __require("node:assert"); - const { isUint8Array } = __require("node:util/types"); - const { webidl: webidl$15 } = require_webidl(); - let supportedHashes = []; - /** @type {import('crypto')} */ - let crypto$3; - try { - crypto$3 = __require("node:crypto"); - const possibleRelevantHashes = [ - "sha256", - "sha384", - "sha512" - ]; - supportedHashes = crypto$3.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); - } catch {} - function responseURL(response) { - const urlList = response.urlList; - const length = urlList.length; - return length === 0 ? null : urlList[length - 1].toString(); - } - function responseLocationURL$1(response, requestFragment) { - if (!redirectStatusSet$2.has(response.status)) return null; - let location = response.headersList.get("location", true); - if (location !== null && isValidHeaderValue$1(location)) { - if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); - location = new URL(location, responseURL(response)); - } - if (location && !location.hash) location.hash = requestFragment; - return location; - } - /** - * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 - * @param {string} url - * @returns {boolean} - */ - function isValidEncodedURL(url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i); - if (code > 126 || code < 32) return false; - } - return true; - } - /** - * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. - * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. - * @param {string} value - * @returns {string} - */ - function normalizeBinaryStringToUtf8(value) { - return Buffer.from(value, "binary").toString("utf8"); - } - /** @returns {URL} */ - function requestCurrentURL$1(request$1) { - return request$1.urlList[request$1.urlList.length - 1]; - } - function requestBadPort$1(request$1) { - const url = requestCurrentURL$1(request$1); - if (urlIsHttpHttpsScheme$2(url) && badPortsSet.has(url.port)) return "blocked"; - return "allowed"; - } - function isErrorLike$2(object) { - return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; - } - function isValidReasonPhrase$1(statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i); - if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; - } - return true; - } - /** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ - const isValidHeaderName$2 = isValidHTTPToken$1; - /** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ - function isValidHeaderValue$1(potentialValue) { - return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; - } - /** - * Parse a referrer policy from a Referrer-Policy header - * @see https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header - */ - function parseReferrerPolicy(actualResponse) { - const policyHeader = (actualResponse.headersList.get("referrer-policy", true) ?? "").split(","); - let policy = ""; - if (policyHeader.length) for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim(); - if (referrerPolicyTokens.has(token)) { - policy = token; - break; - } - } - return policy; - } - /** - * Given a request request and a response actualResponse, this algorithm - * updates request’s referrer policy according to the Referrer-Policy - * header (if any) in actualResponse. - * @see https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect - * @param {import('./request').Request} request - * @param {import('./response').Response} actualResponse - */ - function setRequestReferrerPolicyOnRedirect$1(request$1, actualResponse) { - const policy = parseReferrerPolicy(actualResponse); - if (policy !== "") request$1.referrerPolicy = policy; - } - function crossOriginResourcePolicyCheck$1() { - return "allowed"; - } - function corsCheck$1() { - return "success"; - } - function TAOCheck$1() { - return "success"; - } - function appendFetchMetadata$1(httpRequest) { - let header = null; - header = httpRequest.mode; - httpRequest.headersList.set("sec-fetch-mode", header, true); - } - function appendRequestOriginHeader$1(request$1) { - let serializedOrigin = request$1.origin; - if (serializedOrigin === "client" || serializedOrigin === void 0) return; - if (request$1.responseTainting === "cors" || request$1.mode === "websocket") request$1.headersList.append("origin", serializedOrigin, true); - else if (request$1.method !== "GET" && request$1.method !== "HEAD") { - switch (request$1.referrerPolicy) { - case "no-referrer": - serializedOrigin = null; - break; - case "no-referrer-when-downgrade": - case "strict-origin": - case "strict-origin-when-cross-origin": - if (request$1.origin && urlHasHttpsScheme$1(request$1.origin) && !urlHasHttpsScheme$1(requestCurrentURL$1(request$1))) serializedOrigin = null; - break; - case "same-origin": - if (!sameOrigin$2(request$1, requestCurrentURL$1(request$1))) serializedOrigin = null; - break; - default: - } - request$1.headersList.append("origin", serializedOrigin, true); - } - } - function coarsenTime(timestamp, crossOriginIsolatedCapability) { - return timestamp; - } - function clampAndCoarsenConnectionTimingInfo$1(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - }; - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - }; - } - function coarsenedSharedCurrentTime$1(crossOriginIsolatedCapability) { - return coarsenTime(performance$1.now(), crossOriginIsolatedCapability); - } - function createOpaqueTimingInfo$1(timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - }; - } - function makePolicyContainer$1() { - return { referrerPolicy: "strict-origin-when-cross-origin" }; - } - function clonePolicyContainer$1(policyContainer) { - return { referrerPolicy: policyContainer.referrerPolicy }; - } - /** - * Determine request’s Referrer - * - * @see https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer - */ - function determineRequestsReferrer$1(request$1) { - const policy = request$1.referrerPolicy; - assert$25(policy); - let referrerSource = null; - if (request$1.referrer === "client") { - const globalOrigin$1 = getGlobalOrigin$1(); - if (!globalOrigin$1 || globalOrigin$1.origin === "null") return "no-referrer"; - referrerSource = new URL(globalOrigin$1); - } else if (webidl$15.is.URL(request$1.referrer)) referrerSource = request$1.referrer; - let referrerURL = stripURLForReferrer(referrerSource); - const referrerOrigin = stripURLForReferrer(referrerSource, true); - if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; - switch (policy) { - case "no-referrer": return "no-referrer"; - case "origin": - if (referrerOrigin != null) return referrerOrigin; - return stripURLForReferrer(referrerSource, true); - case "unsafe-url": return referrerURL; - case "strict-origin": { - const currentURL = requestCurrentURL$1(request$1); - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; - return referrerOrigin; - } - case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL$1(request$1); - if (sameOrigin$2(referrerURL, currentURL)) return referrerURL; - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; - return referrerOrigin; - } - case "same-origin": - if (sameOrigin$2(request$1, referrerURL)) return referrerURL; - return "no-referrer"; - case "origin-when-cross-origin": - if (sameOrigin$2(request$1, referrerURL)) return referrerURL; - return referrerOrigin; - case "no-referrer-when-downgrade": { - const currentURL = requestCurrentURL$1(request$1); - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; - return referrerOrigin; - } - } - } - /** - * Certain portions of URLs must not be included when sending a URL as the - * value of a `Referer` header: a URLs fragment, username, and password - * components must be stripped from the URL before it’s sent out. This - * algorithm accepts a origin-only flag, which defaults to false. If set to - * true, the algorithm will additionally remove the URL’s path and query - * components, leaving only the scheme, host, and port. - * - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean} [originOnly=false] - */ - function stripURLForReferrer(url, originOnly = false) { - assert$25(webidl$15.is.URL(url)); - url = new URL(url); - if (urlIsLocal$1(url)) return "no-referrer"; - url.username = ""; - url.password = ""; - url.hash = ""; - if (originOnly === true) { - url.pathname = ""; - url.search = ""; - } - return url; - } - const potentialleTrustworthyIPv4RegExp = new RegExp("^(?:(?:127\\.)(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$"); - const potentialleTrustworthyIPv6RegExp = new RegExp("^(?:(?:(?:0{1,4}):){7}(?:(?:0{0,3}1))|(?:(?:0{1,4}):){1,6}(?::(?:0{0,3}1))|(?:::(?:0{0,3}1))|)$"); - /** - * Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128. - * - * @param {string} origin - * @returns {boolean} - */ - function isOriginIPPotentiallyTrustworthy(origin) { - if (origin.includes(":")) { - if (origin[0] === "[" && origin[origin.length - 1] === "]") origin = origin.slice(1, -1); - return potentialleTrustworthyIPv6RegExp.test(origin); - } - return potentialleTrustworthyIPv4RegExp.test(origin); - } - /** - * A potentially trustworthy origin is one which a user agent can generally - * trust as delivering data securely. - * - * Return value `true` means `Potentially Trustworthy`. - * Return value `false` means `Not Trustworthy`. - * - * @see https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy - * @param {string} origin - * @returns {boolean} - */ - function isOriginPotentiallyTrustworthy(origin) { - if (origin == null || origin === "null") return false; - origin = new URL(origin); - if (origin.protocol === "https:" || origin.protocol === "wss:") return true; - if (isOriginIPPotentiallyTrustworthy(origin.hostname)) return true; - if (origin.hostname === "localhost" || origin.hostname === "localhost.") return true; - if (origin.hostname.endsWith(".localhost") || origin.hostname.endsWith(".localhost.")) return true; - if (origin.protocol === "file:") return true; - return false; - } - /** - * A potentially trustworthy URL is one which either inherits context from its - * creator (about:blank, about:srcdoc, data) or one whose origin is a - * potentially trustworthy origin. - * - * Return value `true` means `Potentially Trustworthy`. - * Return value `false` means `Not Trustworthy`. - * - * @see https://www.w3.org/TR/secure-contexts/#is-url-trustworthy - * @param {URL} url - * @returns {boolean} - */ - function isURLPotentiallyTrustworthy(url) { - if (!webidl$15.is.URL(url)) return false; - if (url.href === "about:blank" || url.href === "about:srcdoc") return true; - if (url.protocol === "data:") return true; - if (url.protocol === "blob:") return true; - return isOriginPotentiallyTrustworthy(url.origin); - } - /** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ - function bytesMatch$1(bytes, metadataList) { - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto$3 === void 0) return true; - const parsedMetadata = parseMetadata(metadataList); - if (parsedMetadata === "no metadata") return true; - if (parsedMetadata.length === 0) return true; - const strongest = getStrongestMetadata(parsedMetadata); - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); - for (const item of metadata) { - const algorithm = item.algo; - const expectedValue = item.hash; - let actualValue = crypto$3.createHash(algorithm).update(bytes).digest("base64"); - if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); - else actualValue = actualValue.slice(0, -1); - if (compareBase64Mixed(actualValue, expectedValue)) return true; - } - return false; - } - const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - /** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ - function parseMetadata(metadata) { - /** @type {{ algo: string, hash: string }[]} */ - const result = []; - let empty = true; - for (const token of metadata.split(" ")) { - empty = false; - const parsedToken = parseHashWithOptions.exec(token); - if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; - const algorithm = parsedToken.groups.algo.toLowerCase(); - if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); - } - if (empty === true) return "no metadata"; - return result; - } - /** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ - function getStrongestMetadata(metadataList) { - let algorithm = metadataList[0].algo; - if (algorithm[3] === "5") return algorithm; - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i]; - if (metadata.algo[3] === "5") { - algorithm = "sha512"; - break; - } else if (algorithm[3] === "3") continue; - else if (metadata.algo[3] === "3") algorithm = "sha384"; - } - return algorithm; - } - function filterMetadataListByAlgorithm(metadataList, algorithm) { - if (metadataList.length === 1) return metadataList; - let pos = 0; - for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; - metadataList.length = pos; - return metadataList; - } - /** - * Compares two base64 strings, allowing for base64url - * in the second string. - * - * @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ - function compareBase64Mixed(actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) return false; - for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { - if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; - return false; - } - return true; - } - function tryUpgradeRequestToAPotentiallyTrustworthyURL$1(request$1) {} - /** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ - function sameOrigin$2(A, B) { - if (A.origin === B.origin && A.origin === "null") return true; - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; - return false; - } - function createDeferredPromise$4() { - let res; - let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); - return { - promise, - resolve: res, - reject: rej - }; - } - function isAborted$2(fetchParams) { - return fetchParams.controller.state === "aborted"; - } - function isCancelled$2(fetchParams) { - return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; - } - /** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ - function normalizeMethod(method) { - return normalizedMethodRecordsBase$1[method.toLowerCase()] ?? method; - } - function serializeJavascriptValueToJSONString$1(value) { - const result = JSON.stringify(value); - if (result === void 0) throw new TypeError("Value is not JSON serializable"); - assert$25(typeof result === "string"); - return result; - } - const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); - /** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {((target: any) => any)} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ - function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target; - /** @type {'key' | 'value' | 'key+value'} */ - #kind; - /** @type {number} */ - #index; - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor(target, kind) { - this.#target = target; - this.#kind = kind; - this.#index = 0; - } - next() { - if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); - const index = this.#index; - const values = kInternalIterator(this.#target); - const len = values.length; - if (index >= len) return { - value: void 0, - done: true - }; - const { [keyIndex]: key, [valueIndex]: value } = values[index]; - this.#index = index + 1; - let result; - switch (this.#kind) { - case "key": - result = key; - break; - case "value": - result = value; - break; - case "key+value": - result = [key, value]; - break; - } - return { - value: result, - done: false - }; - } - } - delete FastIterableIterator.prototype.constructor; - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { - writable: true, - enumerable: true, - configurable: true - } - }); - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function(target, kind) { - return new FastIterableIterator(target, kind); - }; - } - /** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {(target: any) => any} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ - function iteratorMixin$2(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys() { - webidl$15.brandCheck(this, object); - return makeIterator(this, "key"); - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values() { - webidl$15.brandCheck(this, object); - return makeIterator(this, "value"); - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries() { - webidl$15.brandCheck(this, object); - return makeIterator(this, "key+value"); - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach(callbackfn, thisArg = globalThis) { - webidl$15.brandCheck(this, object); - webidl$15.argumentLengthCheck(arguments, 1, `${name}.forEach`); - if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); - for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); - } - } - }; - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }); - } - /** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ - function fullyReadBody$2(body, processBody, processBodyError) { - const successSteps = processBody; - const errorSteps = processBodyError; - let reader; - try { - reader = body.stream.getReader(); - } catch (e) { - errorSteps(e); - return; - } - readAllBytes$1(reader, successSteps, errorSteps); - } - /** - * @param {ReadableStreamController} controller - */ - function readableStreamClose$2(controller) { - try { - controller.close(); - controller.byobRequest?.respond(0); - } catch (err) { - if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; - } - } - const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; - /** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ - function isomorphicEncode$2(input) { - assert$25(!invalidIsomorphicEncodeValueRegex.test(input)); - return input; - } - /** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - * @param {(bytes: Uint8Array) => void} successSteps - * @param {(error: Error) => void} failureSteps - */ - async function readAllBytes$1(reader, successSteps, failureSteps) { - const bytes = []; - let byteLength = 0; - try { - do { - const { done, value: chunk } = await reader.read(); - if (done) { - successSteps(Buffer.concat(bytes, byteLength)); - return; - } - if (!isUint8Array(chunk)) { - failureSteps(TypeError("Received non-Uint8Array chunk")); - return; - } - bytes.push(chunk); - byteLength += chunk.length; - } while (true); - } catch (e) { - failureSteps(e); - } - } - /** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - * @returns {boolean} - */ - function urlIsLocal$1(url) { - assert$25("protocol" in url); - const protocol = url.protocol; - return protocol === "about:" || protocol === "blob:" || protocol === "data:"; - } - /** - * @param {string|URL} url - * @returns {boolean} - */ - function urlHasHttpsScheme$1(url) { - return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; - } - /** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ - function urlIsHttpHttpsScheme$2(url) { - assert$25("protocol" in url); - const protocol = url.protocol; - return protocol === "http:" || protocol === "https:"; - } - /** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - */ - function simpleRangeHeaderValue$1(value, allowWhitespace) { - const data = value; - if (!data.startsWith("bytes")) return "failure"; - const position = { position: 5 }; - if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - if (data.charCodeAt(position.position) !== 61) return "failure"; - position.position++; - if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - const rangeStart = collectASequenceOfCodePoints((char) => { - const code = char.charCodeAt(0); - return code >= 48 && code <= 57; - }, data, position); - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; - if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - if (data.charCodeAt(position.position) !== 45) return "failure"; - position.position++; - if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - const rangeEnd = collectASequenceOfCodePoints((char) => { - const code = char.charCodeAt(0); - return code >= 48 && code <= 57; - }, data, position); - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; - if (position.position < data.length) return "failure"; - if (rangeEndValue === null && rangeStartValue === null) return "failure"; - if (rangeStartValue > rangeEndValue) return "failure"; - return { - rangeStartValue, - rangeEndValue - }; - } - /** - * @see https://fetch.spec.whatwg.org/#build-a-content-range - * @param {number} rangeStart - * @param {number} rangeEnd - * @param {number} fullLength - */ - function buildContentRange$1(rangeStart, rangeEnd, fullLength) { - let contentRange = "bytes "; - contentRange += isomorphicEncode$2(`${rangeStart}`); - contentRange += "-"; - contentRange += isomorphicEncode$2(`${rangeEnd}`); - contentRange += "/"; - contentRange += isomorphicEncode$2(`${fullLength}`); - return contentRange; - } - var InflateStream = class extends Transform$2 { - #zlibOptions; - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor(zlibOptions) { - super(); - this.#zlibOptions = zlibOptions; - } - _transform(chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback(); - return; - } - this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(this.#zlibOptions) : zlib$1.createInflateRaw(this.#zlibOptions); - this._inflateStream.on("data", this.push.bind(this)); - this._inflateStream.on("end", () => this.push(null)); - this._inflateStream.on("error", (err) => this.destroy(err)); - } - this._inflateStream.write(chunk, encoding, callback); - } - _final(callback) { - if (this._inflateStream) { - this._inflateStream.end(); - this._inflateStream = null; - } - callback(); - } - }; - /** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ - function createInflate$1(zlibOptions) { - return new InflateStream(zlibOptions); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type - * @param {import('./headers').HeadersList} headers - */ - function extractMimeType$2(headers) { - let charset = null; - let essence = null; - let mimeType = null; - const values = getDecodeSplit$1("content-type", headers); - if (values === null) return "failure"; - for (const value of values) { - const temporaryMimeType = parseMIMEType$2(value); - if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; - mimeType = temporaryMimeType; - if (mimeType.essence !== essence) { - charset = null; - if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); - essence = mimeType.essence; - } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); - } - if (mimeType == null) return "failure"; - return mimeType; - } - /** - * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split - * @param {string|null} value - */ - function gettingDecodingSplitting(value) { - const input = value; - const position = { position: 0 }; - const values = []; - let temporaryValue = ""; - while (position.position < input.length) { - temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); - if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { - temporaryValue += collectAnHTTPQuotedString(input, position); - if (position.position < input.length) continue; - } else { - assert$25(input.charCodeAt(position.position) === 44); - position.position++; - } - temporaryValue = removeChars$1(temporaryValue, true, true, (char) => char === 9 || char === 32); - values.push(temporaryValue); - temporaryValue = ""; - } - return values; - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split - * @param {string} name lowercase header name - * @param {import('./headers').HeadersList} list - */ - function getDecodeSplit$1(name, list) { - const value = list.get(name, true); - if (value === null) return null; - return gettingDecodingSplitting(value); - } - const textDecoder = new TextDecoder(); - /** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ - function utf8DecodeBytes$3(buffer$1) { - if (buffer$1.length === 0) return ""; - if (buffer$1[0] === 239 && buffer$1[1] === 187 && buffer$1[2] === 191) buffer$1 = buffer$1.subarray(3); - const output = textDecoder.decode(buffer$1); - return output; - } - var EnvironmentSettingsObjectBase = class { - get baseUrl() { - return getGlobalOrigin$1(); - } - get origin() { - return this.baseUrl?.origin; - } - policyContainer = makePolicyContainer$1(); - }; - var EnvironmentSettingsObject = class { - settingsObject = new EnvironmentSettingsObjectBase(); - }; - const environmentSettingsObject$4 = new EnvironmentSettingsObject(); - module.exports = { - isAborted: isAborted$2, - isCancelled: isCancelled$2, - isValidEncodedURL, - createDeferredPromise: createDeferredPromise$4, - ReadableStreamFrom: ReadableStreamFrom$2, - tryUpgradeRequestToAPotentiallyTrustworthyURL: tryUpgradeRequestToAPotentiallyTrustworthyURL$1, - clampAndCoarsenConnectionTimingInfo: clampAndCoarsenConnectionTimingInfo$1, - coarsenedSharedCurrentTime: coarsenedSharedCurrentTime$1, - determineRequestsReferrer: determineRequestsReferrer$1, - makePolicyContainer: makePolicyContainer$1, - clonePolicyContainer: clonePolicyContainer$1, - appendFetchMetadata: appendFetchMetadata$1, - appendRequestOriginHeader: appendRequestOriginHeader$1, - TAOCheck: TAOCheck$1, - corsCheck: corsCheck$1, - crossOriginResourcePolicyCheck: crossOriginResourcePolicyCheck$1, - createOpaqueTimingInfo: createOpaqueTimingInfo$1, - setRequestReferrerPolicyOnRedirect: setRequestReferrerPolicyOnRedirect$1, - isValidHTTPToken: isValidHTTPToken$1, - requestBadPort: requestBadPort$1, - requestCurrentURL: requestCurrentURL$1, - responseURL, - responseLocationURL: responseLocationURL$1, - isURLPotentiallyTrustworthy, - isValidReasonPhrase: isValidReasonPhrase$1, - sameOrigin: sameOrigin$2, - normalizeMethod, - serializeJavascriptValueToJSONString: serializeJavascriptValueToJSONString$1, - iteratorMixin: iteratorMixin$2, - createIterator, - isValidHeaderName: isValidHeaderName$2, - isValidHeaderValue: isValidHeaderValue$1, - isErrorLike: isErrorLike$2, - fullyReadBody: fullyReadBody$2, - bytesMatch: bytesMatch$1, - readableStreamClose: readableStreamClose$2, - isomorphicEncode: isomorphicEncode$2, - urlIsLocal: urlIsLocal$1, - urlHasHttpsScheme: urlHasHttpsScheme$1, - urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$2, - readAllBytes: readAllBytes$1, - simpleRangeHeaderValue: simpleRangeHeaderValue$1, - buildContentRange: buildContentRange$1, - parseMetadata, - createInflate: createInflate$1, - extractMimeType: extractMimeType$2, - getDecodeSplit: getDecodeSplit$1, - utf8DecodeBytes: utf8DecodeBytes$3, - environmentSettingsObject: environmentSettingsObject$4, - isOriginIPPotentiallyTrustworthy - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/formdata.js -var require_formdata = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/formdata.js"(exports, module) { - const { iteratorMixin: iteratorMixin$1 } = require_util$4(); - const { kEnumerableProperty: kEnumerableProperty$10 } = require_util$5(); - const { webidl: webidl$14 } = require_webidl(); - const { File: NativeFile } = __require("node:buffer"); - const nodeUtil$2 = __require("node:util"); - /** @type {globalThis['File']} */ - const File$1 = globalThis.File ?? NativeFile; - var FormData$1 = class FormData$1 { - #state = []; - constructor(form) { - webidl$14.util.markAsUncloneable(this); - if (form !== void 0) throw webidl$14.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: ["undefined"] - }); - } - append(name, value, filename = void 0) { - webidl$14.brandCheck(this, FormData$1); - const prefix = "FormData.append"; - webidl$14.argumentLengthCheck(arguments, 2, prefix); - name = webidl$14.converters.USVString(name); - if (arguments.length === 3 || webidl$14.is.Blob(value)) { - value = webidl$14.converters.Blob(value, prefix, "value"); - if (filename !== void 0) filename = webidl$14.converters.USVString(filename); - } else value = webidl$14.converters.USVString(value); - const entry = makeEntry$1(name, value, filename); - this.#state.push(entry); - } - delete(name) { - webidl$14.brandCheck(this, FormData$1); - const prefix = "FormData.delete"; - webidl$14.argumentLengthCheck(arguments, 1, prefix); - name = webidl$14.converters.USVString(name); - this.#state = this.#state.filter((entry) => entry.name !== name); - } - get(name) { - webidl$14.brandCheck(this, FormData$1); - const prefix = "FormData.get"; - webidl$14.argumentLengthCheck(arguments, 1, prefix); - name = webidl$14.converters.USVString(name); - const idx = this.#state.findIndex((entry) => entry.name === name); - if (idx === -1) return null; - return this.#state[idx].value; - } - getAll(name) { - webidl$14.brandCheck(this, FormData$1); - const prefix = "FormData.getAll"; - webidl$14.argumentLengthCheck(arguments, 1, prefix); - name = webidl$14.converters.USVString(name); - return this.#state.filter((entry) => entry.name === name).map((entry) => entry.value); - } - has(name) { - webidl$14.brandCheck(this, FormData$1); - const prefix = "FormData.has"; - webidl$14.argumentLengthCheck(arguments, 1, prefix); - name = webidl$14.converters.USVString(name); - return this.#state.findIndex((entry) => entry.name === name) !== -1; - } - set(name, value, filename = void 0) { - webidl$14.brandCheck(this, FormData$1); - const prefix = "FormData.set"; - webidl$14.argumentLengthCheck(arguments, 2, prefix); - name = webidl$14.converters.USVString(name); - if (arguments.length === 3 || webidl$14.is.Blob(value)) { - value = webidl$14.converters.Blob(value, prefix, "value"); - if (filename !== void 0) filename = webidl$14.converters.USVString(filename); - } else value = webidl$14.converters.USVString(value); - const entry = makeEntry$1(name, value, filename); - const idx = this.#state.findIndex((entry$1) => entry$1.name === name); - if (idx !== -1) this.#state = [ - ...this.#state.slice(0, idx), - entry, - ...this.#state.slice(idx + 1).filter((entry$1) => entry$1.name !== name) - ]; - else this.#state.push(entry); - } - [nodeUtil$2.inspect.custom](depth, options) { - const state = this.#state.reduce((a, b) => { - if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); - else a[b.name] = [a[b.name], b.value]; - else a[b.name] = b.value; - return a; - }, { __proto__: null }); - options.depth ??= depth; - options.colors ??= true; - const output = nodeUtil$2.formatWithOptions(options, state); - return `FormData ${output.slice(output.indexOf("]") + 2)}`; - } - /** - * @param {FormData} formData - */ - static getFormDataState(formData) { - return formData.#state; - } - /** - * @param {FormData} formData - * @param {any[]} newState - */ - static setFormDataState(formData, newState) { - formData.#state = newState; - } - }; - const { getFormDataState, setFormDataState: setFormDataState$1 } = FormData$1; - Reflect.deleteProperty(FormData$1, "getFormDataState"); - Reflect.deleteProperty(FormData$1, "setFormDataState"); - iteratorMixin$1("FormData", FormData$1, getFormDataState, "name", "value"); - Object.defineProperties(FormData$1.prototype, { - append: kEnumerableProperty$10, - delete: kEnumerableProperty$10, - get: kEnumerableProperty$10, - getAll: kEnumerableProperty$10, - has: kEnumerableProperty$10, - set: kEnumerableProperty$10, - [Symbol.toStringTag]: { - value: "FormData", - configurable: true - } - }); - /** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ - function makeEntry$1(name, value, filename) { - if (typeof value === "string") {} else { - if (!webidl$14.is.File(value)) value = new File$1([value], "blob", { type: value.type }); - if (filename !== void 0) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - }; - value = new File$1([value], filename, options); - } - } - return { - name, - value - }; - } - webidl$14.is.FormData = webidl$14.util.MakeTypeAssertion(FormData$1); - module.exports = { - FormData: FormData$1, - makeEntry: makeEntry$1, - setFormDataState: setFormDataState$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/formdata-parser.js -var require_formdata_parser = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module) { - const { isUSVString, bufferToLowerCasedHeaderName: bufferToLowerCasedHeaderName$1 } = require_util$5(); - const { utf8DecodeBytes: utf8DecodeBytes$2 } = require_util$4(); - const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); - const { makeEntry } = require_formdata(); - const { webidl: webidl$13 } = require_webidl(); - const assert$24 = __require("node:assert"); - const { File: NodeFile } = __require("node:buffer"); - const File = globalThis.File ?? NodeFile; - const formDataNameBuffer = Buffer.from("form-data; name=\""); - const filenameBuffer = Buffer.from("filename"); - const dd = Buffer.from("--"); - const ddcrlf = Buffer.from("--\r\n"); - /** - * @param {string} chars - */ - function isAsciiString(chars) { - for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; - return true; - } - /** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary - * @param {string} boundary - */ - function validateBoundary(boundary) { - const length = boundary.length; - if (length < 27 || length > 70) return false; - for (let i = 0; i < length; ++i) { - const cp$1 = boundary.charCodeAt(i); - if (!(cp$1 >= 48 && cp$1 <= 57 || cp$1 >= 65 && cp$1 <= 90 || cp$1 >= 97 && cp$1 <= 122 || cp$1 === 39 || cp$1 === 45 || cp$1 === 95)) return false; - } - return true; - } - /** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser - * @param {Buffer} input - * @param {ReturnType} mimeType - */ - function multipartFormDataParser$1(input, mimeType) { - assert$24(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); - const boundaryString = mimeType.parameters.get("boundary"); - if (boundaryString === void 0) throw parsingError("missing boundary in content-type header"); - const boundary = Buffer.from(`--${boundaryString}`, "utf8"); - const entryList = []; - const position = { position: 0 }; - while (input[position.position] === 13 && input[position.position + 1] === 10) position.position += 2; - let trailing = input.length; - while (input[trailing - 1] === 10 && input[trailing - 2] === 13) trailing -= 2; - if (trailing !== input.length) input = input.subarray(0, trailing); - while (true) { - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; - else throw parsingError("expected a value starting with -- and the boundary"); - if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) return entryList; - if (input[position.position] !== 13 || input[position.position + 1] !== 10) throw parsingError("expected CRLF"); - position.position += 2; - const result = parseMultipartFormDataHeaders(input, position); - let { name, filename, contentType, encoding } = result; - position.position += 2; - let body; - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); - if (boundaryIndex === -1) throw parsingError("expected boundary after body"); - body = input.subarray(position.position, boundaryIndex - 4); - position.position += body.length; - if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); - } - if (input[position.position] !== 13 || input[position.position + 1] !== 10) throw parsingError("expected CRLF"); - else position.position += 2; - let value; - if (filename !== null) { - contentType ??= "text/plain"; - if (!isAsciiString(contentType)) contentType = ""; - value = new File([body], filename, { type: contentType }); - } else value = utf8DecodeBytes$2(Buffer.from(body)); - assert$24(isUSVString(name)); - assert$24(typeof value === "string" && isUSVString(value) || webidl$13.is.File(value)); - entryList.push(makeEntry(name, value, filename)); - } - } - /** - * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers - * @param {Buffer} input - * @param {{ position: number }} position - */ - function parseMultipartFormDataHeaders(input, position) { - let name = null; - let filename = null; - let contentType = null; - let encoding = null; - while (true) { - if (input[position.position] === 13 && input[position.position + 1] === 10) { - if (name === null) throw parsingError("header name is null"); - return { - name, - filename, - contentType, - encoding - }; - } - let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); - headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) throw parsingError("header name does not match the field-name token production"); - if (input[position.position] !== 58) throw parsingError("expected :"); - position.position++; - collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); - switch (bufferToLowerCasedHeaderName$1(headerName)) { - case "content-disposition": { - name = filename = null; - if (!bufferStartsWith(input, formDataNameBuffer, position)) throw parsingError("expected form-data; name=\" for content-disposition header"); - position.position += 17; - name = parseMultipartFormDataName(input, position); - if (input[position.position] === 59 && input[position.position + 1] === 32) { - const at = { position: position.position + 2 }; - if (bufferStartsWith(input, filenameBuffer, at)) if (input[at.position + 8] === 42) { - at.position += 10; - collectASequenceOfBytes((char) => char === 32 || char === 9, input, at); - const headerValue = collectASequenceOfBytes((char) => char !== 32 && char !== 13 && char !== 10, input, at); - if (headerValue[0] !== 117 && headerValue[0] !== 85 || headerValue[1] !== 116 && headerValue[1] !== 84 || headerValue[2] !== 102 && headerValue[2] !== 70 || headerValue[3] !== 45 || headerValue[4] !== 56) throw parsingError("unknown encoding, expected utf-8''"); - filename = decodeURIComponent(new TextDecoder().decode(headerValue.subarray(7))); - position.position = at.position; - } else { - position.position += 11; - collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); - position.position++; - filename = parseMultipartFormDataName(input, position); - } - } - break; - } - case "content-type": { - let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); - headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); - contentType = isomorphicDecode(headerValue); - break; - } - case "content-transfer-encoding": { - let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); - headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); - encoding = isomorphicDecode(headerValue); - break; - } - default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); - } - if (input[position.position] !== 13 && input[position.position + 1] !== 10) throw parsingError("expected CRLF"); - else position.position += 2; - } - } - /** - * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name - * @param {Buffer} input - * @param {{ position: number }} position - */ - function parseMultipartFormDataName(input, position) { - assert$24(input[position.position - 1] === 34); - /** @type {string | Buffer} */ - let name = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); - if (input[position.position] !== 34) throw parsingError("expected \""); - else position.position++; - name = new TextDecoder().decode(name).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); - return name; - } - /** - * @param {(char: number) => boolean} condition - * @param {Buffer} input - * @param {{ position: number }} position - */ - function collectASequenceOfBytes(condition, input, position) { - let start = position.position; - while (start < input.length && condition(input[start])) ++start; - return input.subarray(position.position, position.position = start); - } - /** - * @param {Buffer} buf - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns {Buffer} - */ - function removeChars(buf, leading, trailing, predicate) { - let lead = 0; - let trail = buf.length - 1; - if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; - if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); - } - /** - * Checks if {@param buffer} starts with {@param start} - * @param {Buffer} buffer - * @param {Buffer} start - * @param {{ position: number }} position - */ - function bufferStartsWith(buffer$1, start, position) { - if (buffer$1.length < start.length) return false; - for (let i = 0; i < start.length; i++) if (start[i] !== buffer$1[position.position + i]) return false; - return true; - } - function parsingError(cause) { - return new TypeError("Failed to parse body as FormData.", { cause: new TypeError(cause) }); - } - module.exports = { - multipartFormDataParser: multipartFormDataParser$1, - validateBoundary - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/body.js -var require_body = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/body.js"(exports, module) { - const util$20 = require_util$5(); - const { ReadableStreamFrom: ReadableStreamFrom$1, readableStreamClose: readableStreamClose$1, createDeferredPromise: createDeferredPromise$3, fullyReadBody: fullyReadBody$1, extractMimeType: extractMimeType$1, utf8DecodeBytes: utf8DecodeBytes$1 } = require_util$4(); - const { FormData, setFormDataState } = require_formdata(); - const { webidl: webidl$12 } = require_webidl(); - const { Blob: Blob$1 } = __require("node:buffer"); - const assert$23 = __require("node:assert"); - const { isErrored: isErrored$1, isDisturbed: isDisturbed$2 } = __require("node:stream"); - const { isArrayBuffer } = __require("node:util/types"); - const { serializeAMimeType: serializeAMimeType$2 } = require_data_url(); - const { multipartFormDataParser } = require_formdata_parser(); - let random; - try { - const crypto$4 = __require("node:crypto"); - random = (max) => crypto$4.randomInt(0, max); - } catch { - random = (max) => Math.floor(Math.random() * max); - } - const textEncoder$1 = new TextEncoder(); - function noop$8() {} - const hasFinalizationRegistry$1 = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; - let streamRegistry$1; - if (hasFinalizationRegistry$1) streamRegistry$1 = new FinalizationRegistry((weakRef) => { - const stream$3 = weakRef.deref(); - if (stream$3 && !stream$3.locked && !isDisturbed$2(stream$3) && !isErrored$1(stream$3)) stream$3.cancel("Response object has been garbage collected").catch(noop$8); - }); - function extractBody$5(object, keepalive = false) { - let stream$3 = null; - if (webidl$12.is.ReadableStream(object)) stream$3 = object; - else if (webidl$12.is.Blob(object)) stream$3 = object.stream(); - else stream$3 = new ReadableStream({ - async pull(controller) { - const buffer$1 = typeof source === "string" ? textEncoder$1.encode(source) : source; - if (buffer$1.byteLength) controller.enqueue(buffer$1); - queueMicrotask(() => readableStreamClose$1(controller)); - }, - start() {}, - type: "bytes" - }); - assert$23(webidl$12.is.ReadableStream(stream$3)); - let action = null; - let source = null; - let length = null; - let type = null; - if (typeof object === "string") { - source = object; - type = "text/plain;charset=UTF-8"; - } else if (webidl$12.is.URLSearchParams(object)) { - source = object.toString(); - type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); - else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - else if (webidl$12.is.FormData(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; - const prefix = `--${boundary}\r\nContent-Disposition: form-data`; - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => str.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]); - length = 0; - let hasUnknownSizeValue = false; - for (const [name, value] of object) if (typeof value === "string") { - const chunk$1 = textEncoder$1.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); - blobParts.push(chunk$1); - length += chunk$1.byteLength; - } else { - const chunk$1 = textEncoder$1.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r -Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); - blobParts.push(chunk$1, value, rn); - if (typeof value.size === "number") length += chunk$1.byteLength + value.size + rn.byteLength; - else hasUnknownSizeValue = true; - } - const chunk = textEncoder$1.encode(`--${boundary}--\r\n`); - blobParts.push(chunk); - length += chunk.byteLength; - if (hasUnknownSizeValue) length = null; - source = object; - action = async function* () { - for (const part of blobParts) if (part.stream) yield* part.stream(); - else yield part; - }; - type = `multipart/form-data; boundary=${boundary}`; - } else if (webidl$12.is.Blob(object)) { - source = object; - length = object.size; - if (object.type) type = object.type; - } else if (typeof object[Symbol.asyncIterator] === "function") { - if (keepalive) throw new TypeError("keepalive"); - if (util$20.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); - stream$3 = webidl$12.is.ReadableStream(object) ? object : ReadableStreamFrom$1(object); - } - if (typeof source === "string" || util$20.isBuffer(source)) length = Buffer.byteLength(source); - if (action != null) { - let iterator; - stream$3 = new ReadableStream({ - async start() { - iterator = action(object)[Symbol.asyncIterator](); - }, - async pull(controller) { - const { value, done } = await iterator.next(); - if (done) queueMicrotask(() => { - controller.close(); - controller.byobRequest?.respond(0); - }); - else if (!isErrored$1(stream$3)) { - const buffer$1 = new Uint8Array(value); - if (buffer$1.byteLength) controller.enqueue(buffer$1); - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - }, - type: "bytes" - }); - } - const body = { - stream: stream$3, - source, - length - }; - return [body, type]; - } - function safelyExtractBody$1(object, keepalive = false) { - if (webidl$12.is.ReadableStream(object)) { - // istanbul ignore next - assert$23(!util$20.isDisturbed(object), "The body has already been consumed."); - // istanbul ignore next - assert$23(!object.locked, "The stream is locked."); - } - return extractBody$5(object, keepalive); - } - function cloneBody$2(instance, body) { - const [out1, out2] = body.stream.tee(); - if (hasFinalizationRegistry$1) streamRegistry$1.register(instance, new WeakRef(out1)); - body.stream = out1; - return { - stream: out2, - length: body.length, - source: body.source - }; - } - function throwIfAborted(state) { - if (state.aborted) throw new DOMException("The operation was aborted.", "AbortError"); - } - function bodyMixinMethods(instance, getInternalState) { - const methods = { - blob() { - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(getInternalState(this)); - if (mimeType === null) mimeType = ""; - else if (mimeType) mimeType = serializeAMimeType$2(mimeType); - return new Blob$1([bytes], { type: mimeType }); - }, instance, getInternalState); - }, - arrayBuffer() { - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer; - }, instance, getInternalState); - }, - text() { - return consumeBody(this, utf8DecodeBytes$1, instance, getInternalState); - }, - json() { - return consumeBody(this, parseJSONFromBytes, instance, getInternalState); - }, - formData() { - return consumeBody(this, (value) => { - const mimeType = bodyMimeType(getInternalState(this)); - if (mimeType !== null) switch (mimeType.essence) { - case "multipart/form-data": { - const parsed = multipartFormDataParser(value, mimeType); - const fd = new FormData(); - setFormDataState(fd, parsed); - return fd; - } - case "application/x-www-form-urlencoded": { - const entries = new URLSearchParams(value.toString()); - const fd = new FormData(); - for (const [name, value$1] of entries) fd.append(name, value$1); - return fd; - } - } - throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); - }, instance, getInternalState); - }, - bytes() { - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes); - }, instance, getInternalState); - } - }; - return methods; - } - function mixinBody$2(prototype, getInternalState) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState)); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {any} object internal state - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {any} instance - * @param {(target: any) => any} getInternalState - */ - async function consumeBody(object, convertBytesToJSValue, instance, getInternalState) { - webidl$12.brandCheck(object, instance); - const state = getInternalState(object); - if (bodyUnusable$2(state)) throw new TypeError("Body is unusable: Body has already been read"); - throwIfAborted(state); - const promise = createDeferredPromise$3(); - const errorSteps = (error) => promise.reject(error); - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)); - } catch (e) { - errorSteps(e); - } - }; - if (state.body == null) { - successSteps(Buffer.allocUnsafe(0)); - return promise.promise; - } - fullyReadBody$1(state.body, successSteps, errorSteps); - return promise.promise; - } - /** - * @see https://fetch.spec.whatwg.org/#body-unusable - * @param {any} object internal state - */ - function bodyUnusable$2(object) { - const body = object.body; - return body != null && (body.stream.locked || util$20.isDisturbed(body.stream)); - } - /** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ - function parseJSONFromBytes(bytes) { - return JSON.parse(utf8DecodeBytes$1(bytes)); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {any} requestOrResponse internal state - */ - function bodyMimeType(requestOrResponse) { - /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse.headersList; - const mimeType = extractMimeType$1(headers); - if (mimeType === "failure") return null; - return mimeType; - } - module.exports = { - extractBody: extractBody$5, - safelyExtractBody: safelyExtractBody$1, - cloneBody: cloneBody$2, - mixinBody: mixinBody$2, - streamRegistry: streamRegistry$1, - hasFinalizationRegistry: hasFinalizationRegistry$1, - bodyUnusable: bodyUnusable$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/client-h1.js -var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) { - const assert$22 = __require("node:assert"); - const util$19 = require_util$5(); - const { channels: channels$6 } = require_diagnostics(); - const timers = require_timers(); - const { RequestContentLengthMismatchError: RequestContentLengthMismatchError$1, ResponseContentLengthMismatchError, RequestAbortedError: RequestAbortedError$7, HeadersTimeoutError, HeadersOverflowError, SocketError: SocketError$3, InformationalError: InformationalError$3, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require_errors(); - const { kUrl: kUrl$6, kReset: kReset$1, kClient: kClient$3, kParser, kBlocking, kRunning: kRunning$4, kPending: kPending$3, kSize: kSize$5, kWriting, kQueue: kQueue$3, kNoRef, kKeepAliveDefaultTimeout: kKeepAliveDefaultTimeout$1, kHostHeader: kHostHeader$1, kPendingIdx: kPendingIdx$2, kRunningIdx: kRunningIdx$2, kError: kError$2, kPipelining: kPipelining$1, kSocket: kSocket$1, kKeepAliveTimeoutValue: kKeepAliveTimeoutValue$1, kMaxHeadersSize: kMaxHeadersSize$1, kKeepAliveMaxTimeout: kKeepAliveMaxTimeout$1, kKeepAliveTimeoutThreshold: kKeepAliveTimeoutThreshold$1, kHeadersTimeout: kHeadersTimeout$1, kBodyTimeout: kBodyTimeout$2, kStrictContentLength: kStrictContentLength$2, kMaxRequests: kMaxRequests$1, kCounter: kCounter$1, kMaxResponseSize: kMaxResponseSize$1, kOnError: kOnError$2, kResume: kResume$3, kHTTPContext: kHTTPContext$2, kClosed: kClosed$2 } = require_symbols(); - const constants = require_constants$3(); - const EMPTY_BUF = Buffer.alloc(0); - const FastBuffer = Buffer[Symbol.species]; - const removeAllListeners = util$19.removeAllListeners; - let extractBody$4; - async function lazyllhttp() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; - let mod; - try { - mod = await WebAssembly.compile(require_llhttp_simd_wasm()); - } catch (e) { - /* istanbul ignore next */ - mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); - } - return await WebAssembly.instantiate(mod, { env: { - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0; - }, - wasm_on_status: (p, at, len) => { - assert$22(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)); - }, - wasm_on_message_begin: (p) => { - assert$22(currentParser.ptr === p); - return currentParser.onMessageBegin(); - }, - wasm_on_header_field: (p, at, len) => { - assert$22(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)); - }, - wasm_on_header_value: (p, at, len) => { - assert$22(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)); - }, - wasm_on_headers_complete: (p, statusCode, upgrade$1, shouldKeepAlive) => { - assert$22(currentParser.ptr === p); - return currentParser.onHeadersComplete(statusCode, upgrade$1 === 1, shouldKeepAlive === 1); - }, - wasm_on_body: (p, at, len) => { - assert$22(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)); - }, - wasm_on_message_complete: (p) => { - assert$22(currentParser.ptr === p); - return currentParser.onMessageComplete(); - } - } }); - } - let llhttpInstance = null; - /** - * @type {Promise|null} - */ - let llhttpPromise = lazyllhttp(); - llhttpPromise.catch(); - /** - * @type {Parser|null} - */ - let currentParser = null; - let currentBufferRef = null; - /** - * @type {number} - */ - let currentBufferSize = 0; - let currentBufferPtr = null; - const USE_NATIVE_TIMER = 0; - const USE_FAST_TIMER = 1; - const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER; - const TIMEOUT_BODY = 4 | USE_FAST_TIMER; - const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; - var Parser = class { - /** - * @param {import('./client.js')} client - * @param {import('net').Socket} socket - * @param {*} llhttp - */ - constructor(client, socket, { exports: exports$1 }) { - this.llhttp = exports$1; - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); - this.client = client; - /** - * @type {import('net').Socket} - */ - this.socket = socket; - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.statusCode = 0; - this.statusText = ""; - this.upgrade = false; - this.headers = []; - this.headersSize = 0; - this.headersMaxSize = client[kMaxHeadersSize$1]; - this.shouldKeepAlive = false; - this.paused = false; - this.resume = this.resume.bind(this); - this.bytesRead = 0; - this.keepAlive = ""; - this.contentLength = ""; - this.connection = ""; - this.maxResponseSize = client[kMaxResponseSize$1]; - } - setTimeout(delay$2, type) { - if (delay$2 !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { - if (this.timeout) { - timers.clearTimeout(this.timeout); - this.timeout = null; - } - if (delay$2) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay$2, new WeakRef(this)); - else { - this.timeout = setTimeout(onParserTimeout, delay$2, new WeakRef(this)); - this.timeout.unref(); - } - this.timeoutValue = delay$2; - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - this.timeoutType = type; - } - resume() { - if (this.socket.destroyed || !this.paused) return; - assert$22(this.ptr != null); - assert$22(currentParser === null); - this.llhttp.llhttp_resume(this.ptr); - assert$22(this.timeoutType === TIMEOUT_BODY); - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - this.paused = false; - this.execute(this.socket.read() || EMPTY_BUF); - this.readMore(); - } - readMore() { - while (!this.paused && this.ptr) { - const chunk = this.socket.read(); - if (chunk === null) break; - this.execute(chunk); - } - } - /** - * @param {Buffer} chunk - */ - execute(chunk) { - assert$22(currentParser === null); - assert$22(this.ptr != null); - assert$22(!this.paused); - const { socket, llhttp } = this; - if (chunk.length > currentBufferSize) { - if (currentBufferPtr) llhttp.free(currentBufferPtr); - currentBufferSize = Math.ceil(chunk.length / 4096) * 4096; - currentBufferPtr = llhttp.malloc(currentBufferSize); - } - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk); - try { - let ret; - try { - currentBufferRef = chunk; - currentParser = this; - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length); - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err; - } finally { - currentParser = null; - currentBufferRef = null; - } - if (ret !== constants.ERROR.OK) { - const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr); - if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data); - else if (ret === constants.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data); - } else { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; - } - throw new HTTPParserError(message, constants.ERROR[ret], data); - } - } - } catch (err) { - util$19.destroy(socket, err); - } - } - destroy() { - assert$22(currentParser === null); - assert$22(this.ptr != null); - this.llhttp.llhttp_free(this.ptr); - this.ptr = null; - this.timeout && timers.clearTimeout(this.timeout); - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.paused = false; - } - /** - * @param {Buffer} buf - * @returns {0} - */ - onStatus(buf) { - this.statusText = buf.toString(); - return 0; - } - /** - * @returns {0|-1} - */ - onMessageBegin() { - const { socket, client } = this; - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) return -1; - const request$1 = client[kQueue$3][client[kRunningIdx$2]]; - if (!request$1) return -1; - request$1.onResponseStarted(); - return 0; - } - /** - * @param {Buffer} buf - * @returns {number} - */ - onHeaderField(buf) { - const len = this.headers.length; - if ((len & 1) === 0) this.headers.push(buf); - else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - this.trackHeader(buf.length); - return 0; - } - /** - * @param {Buffer} buf - * @returns {number} - */ - onHeaderValue(buf) { - let len = this.headers.length; - if ((len & 1) === 1) { - this.headers.push(buf); - len += 1; - } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - const key = this.headers[len - 2]; - if (key.length === 10) { - const headerName = util$19.bufferToLowerCasedHeaderName(key); - if (headerName === "keep-alive") this.keepAlive += buf.toString(); - else if (headerName === "connection") this.connection += buf.toString(); - } else if (key.length === 14 && util$19.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); - this.trackHeader(buf.length); - return 0; - } - /** - * @param {number} len - */ - trackHeader(len) { - this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) util$19.destroy(this.socket, new HeadersOverflowError()); - } - /** - * @param {Buffer} head - */ - onUpgrade(head) { - const { upgrade: upgrade$1, client, socket, headers, statusCode } = this; - assert$22(upgrade$1); - assert$22(client[kSocket$1] === socket); - assert$22(!socket.destroyed); - assert$22(!this.paused); - assert$22((headers.length & 1) === 0); - const request$1 = client[kQueue$3][client[kRunningIdx$2]]; - assert$22(request$1); - assert$22(request$1.upgrade || request$1.method === "CONNECT"); - this.statusCode = 0; - this.statusText = ""; - this.shouldKeepAlive = false; - this.headers = []; - this.headersSize = 0; - socket.unshift(head); - socket[kParser].destroy(); - socket[kParser] = null; - socket[kClient$3] = null; - socket[kError$2] = null; - removeAllListeners(socket); - client[kSocket$1] = null; - client[kHTTPContext$2] = null; - client[kQueue$3][client[kRunningIdx$2]++] = null; - client.emit("disconnect", client[kUrl$6], [client], new InformationalError$3("upgrade")); - try { - request$1.onUpgrade(statusCode, headers, socket); - } catch (err) { - util$19.destroy(socket, err); - } - client[kResume$3](); - } - /** - * @param {number} statusCode - * @param {boolean} upgrade - * @param {boolean} shouldKeepAlive - * @returns {number} - */ - onHeadersComplete(statusCode, upgrade$1, shouldKeepAlive) { - const { client, socket, headers, statusText } = this; - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) return -1; - const request$1 = client[kQueue$3][client[kRunningIdx$2]]; - /* istanbul ignore next: difficult to make a test case for */ - if (!request$1) return -1; - assert$22(!this.upgrade); - assert$22(this.statusCode < 200); - if (statusCode === 100) { - util$19.destroy(socket, new SocketError$3("bad response", util$19.getSocketInfo(socket))); - return -1; - } - if (upgrade$1 && !request$1.upgrade) { - util$19.destroy(socket, new SocketError$3("bad upgrade", util$19.getSocketInfo(socket))); - return -1; - } - assert$22(this.timeoutType === TIMEOUT_HEADERS); - this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive || request$1.method === "HEAD" && !socket[kReset$1] && this.connection.toLowerCase() === "keep-alive"; - if (this.statusCode >= 200) { - const bodyTimeout = request$1.bodyTimeout != null ? request$1.bodyTimeout : client[kBodyTimeout$2]; - this.setTimeout(bodyTimeout, TIMEOUT_BODY); - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - if (request$1.method === "CONNECT") { - assert$22(client[kRunning$4] === 1); - this.upgrade = true; - return 2; - } - if (upgrade$1) { - assert$22(client[kRunning$4] === 1); - this.upgrade = true; - return 2; - } - assert$22((this.headers.length & 1) === 0); - this.headers = []; - this.headersSize = 0; - if (this.shouldKeepAlive && client[kPipelining$1]) { - const keepAliveTimeout = this.keepAlive ? util$19.parseKeepAliveTimeout(this.keepAlive) : null; - if (keepAliveTimeout != null) { - const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold$1], client[kKeepAliveMaxTimeout$1]); - if (timeout <= 0) socket[kReset$1] = true; - else client[kKeepAliveTimeoutValue$1] = timeout; - } else client[kKeepAliveTimeoutValue$1] = client[kKeepAliveDefaultTimeout$1]; - } else socket[kReset$1] = true; - const pause = request$1.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request$1.aborted) return -1; - if (request$1.method === "HEAD") return 1; - if (statusCode < 200) return 1; - if (socket[kBlocking]) { - socket[kBlocking] = false; - client[kResume$3](); - } - return pause ? constants.ERROR.PAUSED : 0; - } - /** - * @param {Buffer} buf - * @returns {number} - */ - onBody(buf) { - const { client, socket, statusCode, maxResponseSize } = this; - if (socket.destroyed) return -1; - const request$1 = client[kQueue$3][client[kRunningIdx$2]]; - assert$22(request$1); - assert$22(this.timeoutType === TIMEOUT_BODY); - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - assert$22(statusCode >= 200); - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util$19.destroy(socket, new ResponseExceededMaxSizeError()); - return -1; - } - this.bytesRead += buf.length; - if (request$1.onData(buf) === false) return constants.ERROR.PAUSED; - return 0; - } - /** - * @returns {number} - */ - onMessageComplete() { - const { client, socket, statusCode, upgrade: upgrade$1, headers, contentLength, bytesRead, shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; - if (upgrade$1) return 0; - assert$22(statusCode >= 100); - assert$22((this.headers.length & 1) === 0); - const request$1 = client[kQueue$3][client[kRunningIdx$2]]; - assert$22(request$1); - this.statusCode = 0; - this.statusText = ""; - this.bytesRead = 0; - this.contentLength = ""; - this.keepAlive = ""; - this.connection = ""; - this.headers = []; - this.headersSize = 0; - if (statusCode < 200) return 0; - /* istanbul ignore next: should be handled by llhttp? */ - if (request$1.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util$19.destroy(socket, new ResponseContentLengthMismatchError()); - return -1; - } - request$1.onComplete(headers); - client[kQueue$3][client[kRunningIdx$2]++] = null; - if (socket[kWriting]) { - assert$22(client[kRunning$4] === 0); - util$19.destroy(socket, new InformationalError$3("reset")); - return constants.ERROR.PAUSED; - } else if (!shouldKeepAlive) { - util$19.destroy(socket, new InformationalError$3("reset")); - return constants.ERROR.PAUSED; - } else if (socket[kReset$1] && client[kRunning$4] === 0) { - util$19.destroy(socket, new InformationalError$3("reset")); - return constants.ERROR.PAUSED; - } else if (client[kPipelining$1] == null || client[kPipelining$1] === 1) setImmediate(() => client[kResume$3]()); - else client[kResume$3](); - return 0; - } - }; - function onParserTimeout(parser) { - const { socket, timeoutType, client, paused } = parser.deref(); - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning$4] > 1) { - assert$22(!paused, "cannot be paused while waiting for headers"); - util$19.destroy(socket, new HeadersTimeoutError()); - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) util$19.destroy(socket, new BodyTimeoutError()); - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert$22(client[kRunning$4] === 0 && client[kKeepAliveTimeoutValue$1]); - util$19.destroy(socket, new InformationalError$3("socket idle timeout")); - } - } - /** - * @param {import ('./client.js')} client - * @param {import('net').Socket} socket - * @returns - */ - async function connectH1$1(client, socket) { - client[kSocket$1] = socket; - if (!llhttpInstance) { - const noop$10 = () => {}; - socket.on("error", noop$10); - llhttpInstance = await llhttpPromise; - llhttpPromise = null; - socket.off("error", noop$10); - } - if (socket.errored) throw socket.errored; - if (socket.destroyed) throw new SocketError$3("destroyed"); - socket[kNoRef] = false; - socket[kWriting] = false; - socket[kReset$1] = false; - socket[kBlocking] = false; - socket[kParser] = new Parser(client, socket, llhttpInstance); - util$19.addListener(socket, "error", onHttpSocketError); - util$19.addListener(socket, "readable", onHttpSocketReadable); - util$19.addListener(socket, "end", onHttpSocketEnd); - util$19.addListener(socket, "close", onHttpSocketClose); - socket[kClosed$2] = false; - socket.on("close", onSocketClose$1); - return { - version: "h1", - defaultPipelining: 1, - write(request$1) { - return writeH1(client, request$1); - }, - resume() { - resumeH1(client); - }, - destroy(err, callback) { - if (socket[kClosed$2]) queueMicrotask(callback); - else { - socket.on("close", callback); - socket.destroy(err); - } - }, - get destroyed() { - return socket.destroyed; - }, - busy(request$1) { - if (socket[kWriting] || socket[kReset$1] || socket[kBlocking]) return true; - if (request$1) { - if (client[kRunning$4] > 0 && !request$1.idempotent) return true; - if (client[kRunning$4] > 0 && (request$1.upgrade || request$1.method === "CONNECT")) return true; - if (client[kRunning$4] > 0 && util$19.bodyLength(request$1.body) !== 0 && (util$19.isStream(request$1.body) || util$19.isAsyncIterable(request$1.body) || util$19.isFormDataLike(request$1.body))) return true; - } - return false; - } - }; - } - function onHttpSocketError(err) { - assert$22(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - const parser = this[kParser]; - if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - this[kError$2] = err; - this[kClient$3][kOnError$2](err); - } - function onHttpSocketReadable() { - this[kParser]?.readMore(); - } - function onHttpSocketEnd() { - const parser = this[kParser]; - if (parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - util$19.destroy(this, new SocketError$3("other side closed", util$19.getSocketInfo(this))); - } - function onHttpSocketClose() { - const parser = this[kParser]; - if (parser) { - if (!this[kError$2] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); - this[kParser].destroy(); - this[kParser] = null; - } - const err = this[kError$2] || new SocketError$3("closed", util$19.getSocketInfo(this)); - const client = this[kClient$3]; - client[kSocket$1] = null; - client[kHTTPContext$2] = null; - if (client.destroyed) { - assert$22(client[kPending$3] === 0); - const requests = client[kQueue$3].splice(client[kRunningIdx$2]); - for (let i = 0; i < requests.length; i++) { - const request$1 = requests[i]; - util$19.errorRequest(client, request$1, err); - } - } else if (client[kRunning$4] > 0 && err.code !== "UND_ERR_INFO") { - const request$1 = client[kQueue$3][client[kRunningIdx$2]]; - client[kQueue$3][client[kRunningIdx$2]++] = null; - util$19.errorRequest(client, request$1, err); - } - client[kPendingIdx$2] = client[kRunningIdx$2]; - assert$22(client[kRunning$4] === 0); - client.emit("disconnect", client[kUrl$6], [client], err); - client[kResume$3](); - } - function onSocketClose$1() { - this[kClosed$2] = true; - } - /** - * @param {import('./client.js')} client - */ - function resumeH1(client) { - const socket = client[kSocket$1]; - if (socket && !socket.destroyed) { - if (client[kSize$5] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref(); - socket[kNoRef] = true; - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref(); - socket[kNoRef] = false; - } - if (client[kSize$5] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue$1], TIMEOUT_KEEP_ALIVE); - } else if (client[kRunning$4] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request$1 = client[kQueue$3][client[kRunningIdx$2]]; - const headersTimeout = request$1.headersTimeout != null ? request$1.headersTimeout : client[kHeadersTimeout$1]; - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); - } - } - } - } - function shouldSendContentLength$1(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - /** - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @returns - */ - function writeH1(client, request$1) { - const { method, path: path$3, host, upgrade: upgrade$1, blocking, reset } = request$1; - let { body, headers, contentLength } = request$1; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; - if (util$19.isFormDataLike(body)) { - if (!extractBody$4) extractBody$4 = require_body().extractBody; - const [bodyStream, contentType] = extractBody$4(body); - if (request$1.contentType == null) headers.push("content-type", contentType); - body = bodyStream.stream; - contentLength = bodyStream.length; - } else if (util$19.isBlobLike(body) && request$1.contentType == null && body.type) headers.push("content-type", body.type); - if (body && typeof body.read === "function") body.read(0); - const bodyLength$1 = util$19.bodyLength(body); - contentLength = bodyLength$1 ?? contentLength; - if (contentLength === null) contentLength = request$1.contentLength; - if (contentLength === 0 && !expectsPayload) contentLength = null; - if (shouldSendContentLength$1(method) && contentLength > 0 && request$1.contentLength !== null && request$1.contentLength !== contentLength) { - if (client[kStrictContentLength$2]) { - util$19.errorRequest(client, request$1, new RequestContentLengthMismatchError$1()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError$1()); - } - const socket = client[kSocket$1]; - /** - * @param {Error} [err] - * @returns {void} - */ - const abort$1 = (err) => { - if (request$1.aborted || request$1.completed) return; - util$19.errorRequest(client, request$1, err || new RequestAbortedError$7()); - util$19.destroy(body); - util$19.destroy(socket, new InformationalError$3("aborted")); - }; - try { - request$1.onConnect(abort$1); - } catch (err) { - util$19.errorRequest(client, request$1, err); - } - if (request$1.aborted) return false; - if (method === "HEAD") socket[kReset$1] = true; - if (upgrade$1 || method === "CONNECT") socket[kReset$1] = true; - if (reset != null) socket[kReset$1] = reset; - if (client[kMaxRequests$1] && socket[kCounter$1]++ >= client[kMaxRequests$1]) socket[kReset$1] = true; - if (blocking) socket[kBlocking] = true; - let header = `${method} ${path$3} HTTP/1.1\r\n`; - if (typeof host === "string") header += `host: ${host}\r\n`; - else header += client[kHostHeader$1]; - if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`; - else if (client[kPipelining$1] && !socket[kReset$1]) header += "connection: keep-alive\r\n"; - else header += "connection: close\r\n"; - if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0]; - const val = headers[n + 1]; - if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; - else header += `${key}: ${val}\r\n`; - } - if (channels$6.sendHeaders.hasSubscribers) channels$6.sendHeaders.publish({ - request: request$1, - headers: header, - socket - }); - /* istanbul ignore else: assertion */ - if (!body || bodyLength$1 === 0) writeBuffer$1(abort$1, null, client, request$1, socket, contentLength, header, expectsPayload); - else if (util$19.isBuffer(body)) writeBuffer$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); - else if (util$19.isBlobLike(body)) if (typeof body.stream === "function") writeIterable$1(abort$1, body.stream(), client, request$1, socket, contentLength, header, expectsPayload); - else writeBlob$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); - else if (util$19.isStream(body)) writeStream$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); - else if (util$19.isIterable(body)) writeIterable$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); - else assert$22(false); - return true; - } - /** - * @param {AbortCallback} abort - * @param {import('stream').Stream} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - */ - function writeStream$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { - assert$22(contentLength !== 0 || client[kRunning$4] === 0, "stream body cannot be pipelined"); - let finished$2 = false; - const writer = new AsyncWriter({ - abort: abort$1, - socket, - request: request$1, - contentLength, - client, - expectsPayload, - header - }); - /** - * @param {Buffer} chunk - * @returns {void} - */ - const onData = function(chunk) { - if (finished$2) return; - try { - if (!writer.write(chunk) && this.pause) this.pause(); - } catch (err) { - util$19.destroy(this, err); - } - }; - /** - * @returns {void} - */ - const onDrain = function() { - if (finished$2) return; - if (body.resume) body.resume(); - }; - /** - * @returns {void} - */ - const onClose = function() { - queueMicrotask(() => { - body.removeListener("error", onFinished); - }); - if (!finished$2) { - const err = new RequestAbortedError$7(); - queueMicrotask(() => onFinished(err)); - } - }; - /** - * @param {Error} [err] - * @returns - */ - const onFinished = function(err) { - if (finished$2) return; - finished$2 = true; - assert$22(socket.destroyed || socket[kWriting] && client[kRunning$4] <= 1); - socket.off("drain", onDrain).off("error", onFinished); - body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); - if (!err) try { - writer.end(); - } catch (er) { - err = er; - } - writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util$19.destroy(body, err); - else util$19.destroy(body); - }; - body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); - if (body.resume) body.resume(); - socket.on("drain", onDrain).on("error", onFinished); - if (body.errorEmitted ?? body.errored) setImmediate(() => onFinished(body.errored)); - else if (body.endEmitted ?? body.readableEnded) setImmediate(() => onFinished(null)); - if (body.closeEmitted ?? body.closed) setImmediate(onClose); - } - /** - * @typedef AbortCallback - * @type {Function} - * @param {Error} [err] - * @returns {void} - */ - /** - * @param {AbortCallback} abort - * @param {Uint8Array|null} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - * @returns {void} - */ - function writeBuffer$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { - try { - if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else { - assert$22(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r\n`, "latin1"); - } - else if (util$19.isBuffer(body)) { - assert$22(contentLength === body.byteLength, "buffer body must have content length"); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(body); - socket.uncork(); - request$1.onBodySent(body); - if (!expectsPayload && request$1.reset !== false) socket[kReset$1] = true; - } - request$1.onRequestSent(); - client[kResume$3](); - } catch (err) { - abort$1(err); - } - } - /** - * @param {AbortCallback} abort - * @param {Blob} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - * @returns {Promise} - */ - async function writeBlob$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { - assert$22(contentLength === body.size, "blob body must have content length"); - try { - if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError$1(); - const buffer$1 = Buffer.from(await body.arrayBuffer()); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(buffer$1); - socket.uncork(); - request$1.onBodySent(buffer$1); - request$1.onRequestSent(); - if (!expectsPayload && request$1.reset !== false) socket[kReset$1] = true; - client[kResume$3](); - } catch (err) { - abort$1(err); - } - } - /** - * @param {AbortCallback} abort - * @param {Iterable} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - * @returns {Promise} - */ - async function writeIterable$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { - assert$22(contentLength !== 0 || client[kRunning$4] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - const waitForDrain = () => new Promise((resolve, reject) => { - assert$22(callback === null); - if (socket[kError$2]) reject(socket[kError$2]); - else callback = resolve; - }); - socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter({ - abort: abort$1, - socket, - request: request$1, - contentLength, - client, - expectsPayload, - header - }); - try { - for await (const chunk of body) { - if (socket[kError$2]) throw socket[kError$2]; - if (!writer.write(chunk)) await waitForDrain(); - } - writer.end(); - } catch (err) { - writer.destroy(err); - } finally { - socket.off("close", onDrain).off("drain", onDrain); - } - } - var AsyncWriter = class { - /** - * - * @param {object} arg - * @param {AbortCallback} arg.abort - * @param {import('net').Socket} arg.socket - * @param {import('../core/request.js')} arg.request - * @param {number} arg.contentLength - * @param {import('./client.js')} arg.client - * @param {boolean} arg.expectsPayload - * @param {string} arg.header - */ - constructor({ abort: abort$1, socket, request: request$1, contentLength, client, expectsPayload, header }) { - this.socket = socket; - this.request = request$1; - this.contentLength = contentLength; - this.client = client; - this.bytesWritten = 0; - this.expectsPayload = expectsPayload; - this.header = header; - this.abort = abort$1; - socket[kWriting] = true; - } - /** - * @param {Buffer} chunk - * @returns - */ - write(chunk) { - const { socket, request: request$1, contentLength, client, bytesWritten, expectsPayload, header } = this; - if (socket[kError$2]) throw socket[kError$2]; - if (socket.destroyed) return false; - const len = Buffer.byteLength(chunk); - if (!len) return true; - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength$2]) throw new RequestContentLengthMismatchError$1(); - process.emitWarning(new RequestContentLengthMismatchError$1()); - } - socket.cork(); - if (bytesWritten === 0) { - if (!expectsPayload && request$1.reset !== false) socket[kReset$1] = true; - if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); - else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - } - if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); - this.bytesWritten += len; - const ret = socket.write(chunk); - socket.uncork(); - request$1.onBodySent(chunk); - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); - } - } - return ret; - } - /** - * @returns {void} - */ - end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request$1 } = this; - request$1.onRequestSent(); - socket[kWriting] = false; - if (socket[kError$2]) throw socket[kError$2]; - if (socket.destroyed) return; - if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else socket.write(`${header}\r\n`, "latin1"); - else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); - if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength$2]) throw new RequestContentLengthMismatchError$1(); - else process.emitWarning(new RequestContentLengthMismatchError$1()); - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); - } - client[kResume$3](); - } - /** - * @param {Error} [err] - * @returns {void} - */ - destroy(err) { - const { socket, client, abort: abort$1 } = this; - socket[kWriting] = false; - if (err) { - assert$22(client[kRunning$4] <= 1, "pipeline should only contain this request"); - abort$1(err); - } - } - }; - module.exports = connectH1$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/client-h2.js -var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) { - const assert$21 = __require("node:assert"); - const { pipeline: pipeline$3 } = __require("node:stream"); - const util$18 = require_util$5(); - const { RequestContentLengthMismatchError, RequestAbortedError: RequestAbortedError$6, SocketError: SocketError$2, InformationalError: InformationalError$2 } = require_errors(); - const { kUrl: kUrl$5, kReset, kClient: kClient$2, kRunning: kRunning$3, kPending: kPending$2, kQueue: kQueue$2, kPendingIdx: kPendingIdx$1, kRunningIdx: kRunningIdx$1, kError: kError$1, kSocket, kStrictContentLength: kStrictContentLength$1, kOnError: kOnError$1, kMaxConcurrentStreams: kMaxConcurrentStreams$1, kHTTP2Session, kResume: kResume$2, kSize: kSize$4, kHTTPContext: kHTTPContext$1, kClosed: kClosed$1, kBodyTimeout: kBodyTimeout$1 } = require_symbols(); - const { channels: channels$5 } = require_diagnostics(); - const kOpenStreams = Symbol("open streams"); - let extractBody$3; - /** @type {import('http2')} */ - let http2; - try { - http2 = __require("node:http2"); - } catch { - http2 = { constants: {} }; - } - const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; - function parseH2Headers(headers) { - const result = []; - for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); - else result.push(Buffer.from(name), Buffer.from(value)); - return result; - } - async function connectH2$1(client, socket) { - client[kSocket] = socket; - const session = http2.connect(client[kUrl$5], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams$1], - settings: { enablePush: false } - }); - session[kOpenStreams] = 0; - session[kClient$2] = client; - session[kSocket] = socket; - session[kHTTP2Session] = null; - util$18.addListener(session, "error", onHttp2SessionError); - util$18.addListener(session, "frameError", onHttp2FrameError); - util$18.addListener(session, "end", onHttp2SessionEnd); - util$18.addListener(session, "goaway", onHttp2SessionGoAway); - util$18.addListener(session, "close", onHttp2SessionClose); - session.unref(); - client[kHTTP2Session] = session; - socket[kHTTP2Session] = session; - util$18.addListener(socket, "error", onHttp2SocketError); - util$18.addListener(socket, "end", onHttp2SocketEnd); - util$18.addListener(socket, "close", onHttp2SocketClose); - socket[kClosed$1] = false; - socket.on("close", onSocketClose); - return { - version: "h2", - defaultPipelining: Infinity, - write(request$1) { - return writeH2(client, request$1); - }, - resume() { - resumeH2(client); - }, - destroy(err, callback) { - if (socket[kClosed$1]) queueMicrotask(callback); - else socket.destroy(err).on("close", callback); - }, - get destroyed() { - return socket.destroyed; - }, - busy() { - return false; - } - }; - } - function resumeH2(client) { - const socket = client[kSocket]; - if (socket?.destroyed === false) if (client[kSize$4] === 0 || client[kMaxConcurrentStreams$1] === 0) { - socket.unref(); - client[kHTTP2Session].unref(); - } else { - socket.ref(); - client[kHTTP2Session].ref(); - } - } - function onHttp2SessionError(err) { - assert$21(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kSocket][kError$1] = err; - this[kClient$2][kOnError$1](err); - } - function onHttp2FrameError(type, code, id) { - if (id === 0) { - const err = new InformationalError$2(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - this[kSocket][kError$1] = err; - this[kClient$2][kOnError$1](err); - } - } - function onHttp2SessionEnd() { - const err = new SocketError$2("other side closed", util$18.getSocketInfo(this[kSocket])); - this.destroy(err); - util$18.destroy(this[kSocket], err); - } - /** - * This is the root cause of #3011 - * We need to handle GOAWAY frames properly, and trigger the session close - * along with the socket right away - * - * @this {import('http2').ClientHttp2Session} - * @param {number} errorCode - */ - function onHttp2SessionGoAway(errorCode) { - const err = this[kError$1] || new SocketError$2(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util$18.getSocketInfo(this[kSocket])); - const client = this[kClient$2]; - client[kSocket] = null; - client[kHTTPContext$1] = null; - this.close(); - this[kHTTP2Session] = null; - util$18.destroy(this[kSocket], err); - if (client[kRunningIdx$1] < client[kQueue$2].length) { - const request$1 = client[kQueue$2][client[kRunningIdx$1]]; - client[kQueue$2][client[kRunningIdx$1]++] = null; - util$18.errorRequest(client, request$1, err); - client[kPendingIdx$1] = client[kRunningIdx$1]; - } - assert$21(client[kRunning$3] === 0); - client.emit("disconnect", client[kUrl$5], [client], err); - client.emit("connectionError", client[kUrl$5], [client], err); - client[kResume$2](); - } - function onHttp2SessionClose() { - const { [kClient$2]: client } = this; - const { [kSocket]: socket } = client; - const err = this[kSocket][kError$1] || this[kError$1] || new SocketError$2("closed", util$18.getSocketInfo(socket)); - client[kSocket] = null; - client[kHTTPContext$1] = null; - if (client.destroyed) { - assert$21(client[kPending$2] === 0); - const requests = client[kQueue$2].splice(client[kRunningIdx$1]); - for (let i = 0; i < requests.length; i++) { - const request$1 = requests[i]; - util$18.errorRequest(client, request$1, err); - } - } - } - function onHttp2SocketClose() { - const err = this[kError$1] || new SocketError$2("closed", util$18.getSocketInfo(this)); - const client = this[kHTTP2Session][kClient$2]; - client[kSocket] = null; - client[kHTTPContext$1] = null; - if (this[kHTTP2Session] !== null) this[kHTTP2Session].destroy(err); - client[kPendingIdx$1] = client[kRunningIdx$1]; - assert$21(client[kRunning$3] === 0); - client.emit("disconnect", client[kUrl$5], [client], err); - client[kResume$2](); - } - function onHttp2SocketError(err) { - assert$21(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kError$1] = err; - this[kClient$2][kOnError$1](err); - } - function onHttp2SocketEnd() { - util$18.destroy(this, new SocketError$2("other side closed", util$18.getSocketInfo(this))); - } - function onSocketClose() { - this[kClosed$1] = true; - } - function shouldSendContentLength(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - function writeH2(client, request$1) { - const requestTimeout = request$1.bodyTimeout ?? client[kBodyTimeout$1]; - const session = client[kHTTP2Session]; - const { method, path: path$3, host, upgrade: upgrade$1, expectContinue, signal, headers: reqHeaders } = request$1; - let { body } = request$1; - if (upgrade$1) { - util$18.errorRequest(client, request$1, new Error("Upgrade not supported for H2")); - return false; - } - const headers = {}; - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0]; - const val = reqHeaders[n + 1]; - if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `, ${val[i]}`; - else headers[key] = val[i]; - else if (headers[key]) headers[key] += `, ${val}`; - else headers[key] = val; - } - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream$3 = null; - const { hostname, port } = client[kUrl$5]; - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; - headers[HTTP2_HEADER_METHOD] = method; - const abort$1 = (err) => { - if (request$1.aborted || request$1.completed) return; - err = err || new RequestAbortedError$6(); - util$18.errorRequest(client, request$1, err); - if (stream$3 != null) { - stream$3.removeAllListeners("data"); - stream$3.close(); - client[kOnError$1](err); - client[kResume$2](); - } - util$18.destroy(body, err); - }; - try { - request$1.onConnect(abort$1); - } catch (err) { - util$18.errorRequest(client, request$1, err); - } - if (request$1.aborted) return false; - if (method === "CONNECT") { - session.ref(); - stream$3 = session.request(headers, { - endStream: false, - signal - }); - if (!stream$3.pending) { - request$1.onUpgrade(null, null, stream$3); - ++session[kOpenStreams]; - client[kQueue$2][client[kRunningIdx$1]++] = null; - } else stream$3.once("ready", () => { - request$1.onUpgrade(null, null, stream$3); - ++session[kOpenStreams]; - client[kQueue$2][client[kRunningIdx$1]++] = null; - }); - stream$3.once("close", () => { - session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) session.unref(); - }); - stream$3.setTimeout(requestTimeout); - return true; - } - headers[HTTP2_HEADER_PATH] = path$3; - headers[HTTP2_HEADER_SCHEME] = "https"; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") body.read(0); - let contentLength = util$18.bodyLength(body); - if (util$18.isFormDataLike(body)) { - extractBody$3 ??= require_body().extractBody; - const [bodyStream, contentType] = extractBody$3(body); - headers["content-type"] = contentType; - body = bodyStream.stream; - contentLength = bodyStream.length; - } - if (contentLength == null) contentLength = request$1.contentLength; - if (contentLength === 0 || !expectsPayload) contentLength = null; - if (shouldSendContentLength(method) && contentLength > 0 && request$1.contentLength != null && request$1.contentLength !== contentLength) { - if (client[kStrictContentLength$1]) { - util$18.errorRequest(client, request$1, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - if (contentLength != null) { - assert$21(body, "no body must not have content length"); - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; - } - session.ref(); - if (channels$5.sendHeaders.hasSubscribers) { - let header = ""; - for (const key in headers) header += `${key}: ${headers[key]}\r\n`; - channels$5.sendHeaders.publish({ - request: request$1, - headers: header, - socket: session[kSocket] - }); - } - const shouldEndStream = method === "GET" || method === "HEAD" || body === null; - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = "100-continue"; - stream$3 = session.request(headers, { - endStream: shouldEndStream, - signal - }); - stream$3.once("continue", writeBodyH2); - } else { - stream$3 = session.request(headers, { - endStream: shouldEndStream, - signal - }); - writeBodyH2(); - } - ++session[kOpenStreams]; - stream$3.setTimeout(requestTimeout); - stream$3.once("response", (headers$1) => { - const { [HTTP2_HEADER_STATUS]: statusCode,...realHeaders } = headers$1; - request$1.onResponseStarted(); - if (request$1.aborted) { - stream$3.removeAllListeners("data"); - return; - } - if (request$1.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream$3.resume.bind(stream$3), "") === false) stream$3.pause(); - }); - stream$3.on("data", (chunk) => { - if (request$1.onData(chunk) === false) stream$3.pause(); - }); - stream$3.once("end", (err) => { - stream$3.removeAllListeners("data"); - if (stream$3.state?.state == null || stream$3.state.state < 6) { - if (!request$1.aborted && !request$1.completed) request$1.onComplete({}); - client[kQueue$2][client[kRunningIdx$1]++] = null; - client[kResume$2](); - } else { - --session[kOpenStreams]; - if (session[kOpenStreams] === 0) session.unref(); - abort$1(err ?? new InformationalError$2("HTTP/2: stream half-closed (remote)")); - client[kQueue$2][client[kRunningIdx$1]++] = null; - client[kPendingIdx$1] = client[kRunningIdx$1]; - client[kResume$2](); - } - }); - stream$3.once("close", () => { - stream$3.removeAllListeners("data"); - session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) session.unref(); - }); - stream$3.once("error", function(err) { - stream$3.removeAllListeners("data"); - abort$1(err); - }); - stream$3.once("frameError", (type, code) => { - stream$3.removeAllListeners("data"); - abort$1(new InformationalError$2(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); - }); - stream$3.on("aborted", () => { - stream$3.removeAllListeners("data"); - }); - stream$3.on("timeout", () => { - const err = new InformationalError$2(`HTTP/2: "stream timeout after ${requestTimeout}"`); - stream$3.removeAllListeners("data"); - session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) session.unref(); - abort$1(err); - }); - stream$3.once("trailers", (trailers) => { - if (request$1.aborted || request$1.completed) return; - request$1.onComplete(trailers); - }); - return true; - function writeBodyH2() { - /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) writeBuffer(abort$1, stream$3, null, client, request$1, client[kSocket], contentLength, expectsPayload); - else if (util$18.isBuffer(body)) writeBuffer(abort$1, stream$3, body, client, request$1, client[kSocket], contentLength, expectsPayload); - else if (util$18.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort$1, stream$3, body.stream(), client, request$1, client[kSocket], contentLength, expectsPayload); - else writeBlob(abort$1, stream$3, body, client, request$1, client[kSocket], contentLength, expectsPayload); - else if (util$18.isStream(body)) writeStream(abort$1, client[kSocket], expectsPayload, stream$3, body, client, request$1, contentLength); - else if (util$18.isIterable(body)) writeIterable(abort$1, stream$3, body, client, request$1, client[kSocket], contentLength, expectsPayload); - else assert$21(false); - } - } - function writeBuffer(abort$1, h2stream, body, client, request$1, socket, contentLength, expectsPayload) { - try { - if (body != null && util$18.isBuffer(body)) { - assert$21(contentLength === body.byteLength, "buffer body must have content length"); - h2stream.cork(); - h2stream.write(body); - h2stream.uncork(); - h2stream.end(); - request$1.onBodySent(body); - } - if (!expectsPayload) socket[kReset] = true; - request$1.onRequestSent(); - client[kResume$2](); - } catch (error) { - abort$1(error); - } - } - function writeStream(abort$1, socket, expectsPayload, h2stream, body, client, request$1, contentLength) { - assert$21(contentLength !== 0 || client[kRunning$3] === 0, "stream body cannot be pipelined"); - const pipe = pipeline$3(body, h2stream, (err) => { - if (err) { - util$18.destroy(pipe, err); - abort$1(err); - } else { - util$18.removeAllListeners(pipe); - request$1.onRequestSent(); - if (!expectsPayload) socket[kReset] = true; - client[kResume$2](); - } - }); - util$18.addListener(pipe, "data", onPipeData); - function onPipeData(chunk) { - request$1.onBodySent(chunk); - } - } - async function writeBlob(abort$1, h2stream, body, client, request$1, socket, contentLength, expectsPayload) { - assert$21(contentLength === body.size, "blob body must have content length"); - try { - if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); - const buffer$1 = Buffer.from(await body.arrayBuffer()); - h2stream.cork(); - h2stream.write(buffer$1); - h2stream.uncork(); - h2stream.end(); - request$1.onBodySent(buffer$1); - request$1.onRequestSent(); - if (!expectsPayload) socket[kReset] = true; - client[kResume$2](); - } catch (err) { - abort$1(err); - } - } - async function writeIterable(abort$1, h2stream, body, client, request$1, socket, contentLength, expectsPayload) { - assert$21(contentLength !== 0 || client[kRunning$3] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - const waitForDrain = () => new Promise((resolve, reject) => { - assert$21(callback === null); - if (socket[kError$1]) reject(socket[kError$1]); - else callback = resolve; - }); - h2stream.on("close", onDrain).on("drain", onDrain); - try { - for await (const chunk of body) { - if (socket[kError$1]) throw socket[kError$1]; - const res = h2stream.write(chunk); - request$1.onBodySent(chunk); - if (!res) await waitForDrain(); - } - h2stream.end(); - request$1.onRequestSent(); - if (!expectsPayload) socket[kReset] = true; - client[kResume$2](); - } catch (err) { - abort$1(err); - } finally { - h2stream.off("close", onDrain).off("drain", onDrain); - } - } - module.exports = connectH2$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/client.js -var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/client.js"(exports, module) { - const assert$20 = __require("node:assert"); - const net = __require("node:net"); - const http = __require("node:http"); - const util$17 = require_util$5(); - const { ClientStats } = require_stats(); - const { channels: channels$4 } = require_diagnostics(); - const Request$3 = require_request$1(); - const DispatcherBase$5 = require_dispatcher_base(); - const { InvalidArgumentError: InvalidArgumentError$22, InformationalError: InformationalError$1, ClientDestroyedError } = require_errors(); - const buildConnector$3 = require_connect(); - const { kUrl: kUrl$4, kServerName, kClient: kClient$1, kBusy: kBusy$1, kConnect, kResuming, kRunning: kRunning$2, kPending: kPending$1, kSize: kSize$3, kQueue: kQueue$1, kConnected: kConnected$4, kConnecting, kNeedDrain: kNeedDrain$3, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRequests, kCounter, kClose: kClose$7, kDestroy: kDestroy$5, kDispatch: kDispatch$3, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume: kResume$1 } = require_symbols(); - const connectH1 = require_client_h1(); - const connectH2 = require_client_h2(); - const kClosedResolve$1 = Symbol("kClosedResolve"); - const getDefaultNodeMaxHeaderSize = http && http.maxHeaderSize && Number.isInteger(http.maxHeaderSize) && http.maxHeaderSize > 0 ? () => http.maxHeaderSize : () => { - throw new InvalidArgumentError$22("http module not available or http.maxHeaderSize invalid"); - }; - const noop$7 = () => {}; - function getPipelining(client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; - } - /** - * @type {import('../../types/client.js').default} - */ - var Client$5 = class extends DispatcherBase$5 { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor(url, { maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls: tls$1, strictContentLength, maxCachedSessions, connect: connect$3, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2 } = {}) { - if (keepAlive !== void 0) throw new InvalidArgumentError$22("unsupported keepAlive, use pipelining=0 instead"); - if (socketTimeout !== void 0) throw new InvalidArgumentError$22("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - if (requestTimeout !== void 0) throw new InvalidArgumentError$22("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - if (idleTimeout !== void 0) throw new InvalidArgumentError$22("unsupported idleTimeout, use keepAliveTimeout instead"); - if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError$22("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - if (maxHeaderSize != null) { - if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) throw new InvalidArgumentError$22("invalid maxHeaderSize"); - } else maxHeaderSize = getDefaultNodeMaxHeaderSize(); - if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError$22("invalid socketPath"); - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError$22("invalid connectTimeout"); - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError$22("invalid keepAliveTimeout"); - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError$22("invalid keepAliveMaxTimeout"); - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError$22("invalid keepAliveTimeoutThreshold"); - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$22("headersTimeout must be a positive integer or zero"); - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$22("bodyTimeout must be a positive integer or zero"); - if (connect$3 != null && typeof connect$3 !== "function" && typeof connect$3 !== "object") throw new InvalidArgumentError$22("connect must be a function or an object"); - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError$22("maxRequestsPerClient must be a positive number"); - if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError$22("localAddress must be valid string IP address"); - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError$22("maxResponseSize must be a positive number"); - if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError$22("autoSelectFamilyAttemptTimeout must be a positive number"); - if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError$22("allowH2 must be a valid boolean value"); - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError$22("maxConcurrentStreams must be a positive integer, greater than 0"); - super(); - if (typeof connect$3 !== "function") connect$3 = buildConnector$3({ - ...tls$1, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...typeof autoSelectFamily === "boolean" ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : void 0, - ...connect$3 - }); - this[kUrl$4] = util$17.parseOrigin(url); - this[kConnector] = connect$3; - this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize; - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; - this[kServerName] = null; - this[kLocalAddress] = localAddress != null ? localAddress : null; - this[kResuming] = 0; - this[kNeedDrain$3] = 0; - this[kHostHeader] = `host: ${this[kUrl$4].hostname}${this[kUrl$4].port ? `:${this[kUrl$4].port}` : ""}\r\n`; - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; - this[kMaxRequests] = maxRequestsPerClient; - this[kClosedResolve$1] = null; - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; - this[kHTTPContext] = null; - this[kQueue$1] = []; - this[kRunningIdx] = 0; - this[kPendingIdx] = 0; - this[kResume$1] = (sync) => resume(this, sync); - this[kOnError] = (err) => onError(this, err); - } - get pipelining() { - return this[kPipelining]; - } - set pipelining(value) { - this[kPipelining] = value; - this[kResume$1](true); - } - get stats() { - return new ClientStats(this); - } - get [kPending$1]() { - return this[kQueue$1].length - this[kPendingIdx]; - } - get [kRunning$2]() { - return this[kPendingIdx] - this[kRunningIdx]; - } - get [kSize$3]() { - return this[kQueue$1].length - this[kRunningIdx]; - } - get [kConnected$4]() { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; - } - get [kBusy$1]() { - return Boolean(this[kHTTPContext]?.busy(null) || this[kSize$3] >= (getPipelining(this) || 1) || this[kPending$1] > 0); - } - /* istanbul ignore: only used for test */ - [kConnect](cb) { - connect$2(this); - this.once("connect", cb); - } - [kDispatch$3](opts, handler) { - const origin = opts.origin || this[kUrl$4].origin; - const request$1 = new Request$3(origin, opts, handler); - this[kQueue$1].push(request$1); - if (this[kResuming]) {} else if (util$17.bodyLength(request$1.body) == null && util$17.isIterable(request$1.body)) { - this[kResuming] = 1; - queueMicrotask(() => resume(this)); - } else this[kResume$1](true); - if (this[kResuming] && this[kNeedDrain$3] !== 2 && this[kBusy$1]) this[kNeedDrain$3] = 2; - return this[kNeedDrain$3] < 2; - } - async [kClose$7]() { - return new Promise((resolve) => { - if (this[kSize$3]) this[kClosedResolve$1] = resolve; - else resolve(null); - }); - } - async [kDestroy$5](err) { - return new Promise((resolve) => { - const requests = this[kQueue$1].splice(this[kPendingIdx]); - for (let i = 0; i < requests.length; i++) { - const request$1 = requests[i]; - util$17.errorRequest(this, request$1, err); - } - const callback = () => { - if (this[kClosedResolve$1]) { - this[kClosedResolve$1](); - this[kClosedResolve$1] = null; - } - resolve(null); - }; - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback); - this[kHTTPContext] = null; - } else queueMicrotask(callback); - this[kResume$1](); - }); - } - }; - function onError(client, err) { - if (client[kRunning$2] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert$20(client[kPendingIdx] === client[kRunningIdx]); - const requests = client[kQueue$1].splice(client[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request$1 = requests[i]; - util$17.errorRequest(client, request$1, err); - } - assert$20(client[kSize$3] === 0); - } - } - /** - * @param {Client} client - * @returns - */ - async function connect$2(client) { - assert$20(!client[kConnecting]); - assert$20(!client[kHTTPContext]); - let { host, hostname, protocol, port } = client[kUrl$4]; - if (hostname[0] === "[") { - const idx = hostname.indexOf("]"); - assert$20(idx !== -1); - const ip = hostname.substring(1, idx); - assert$20(net.isIPv6(ip)); - hostname = ip; - } - client[kConnecting] = true; - if (channels$4.beforeConnect.hasSubscribers) channels$4.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }); - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket$1) => { - if (err) reject(err); - else resolve(socket$1); - }); - }); - if (client.destroyed) { - util$17.destroy(socket.on("error", noop$7), new ClientDestroyedError()); - return; - } - assert$20(socket); - try { - client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); - } catch (err) { - socket.destroy().on("error", noop$7); - throw err; - } - client[kConnecting] = false; - socket[kCounter] = 0; - socket[kMaxRequests] = client[kMaxRequests]; - socket[kClient$1] = client; - socket[kError] = null; - if (channels$4.connected.hasSubscribers) channels$4.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }); - client.emit("connect", client[kUrl$4], [client]); - } catch (err) { - if (client.destroyed) return; - client[kConnecting] = false; - if (channels$4.connectError.hasSubscribers) channels$4.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }); - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert$20(client[kRunning$2] === 0); - while (client[kPending$1] > 0 && client[kQueue$1][client[kPendingIdx]].servername === client[kServerName]) { - const request$1 = client[kQueue$1][client[kPendingIdx]++]; - util$17.errorRequest(client, request$1, err); - } - } else onError(client, err); - client.emit("connectionError", client[kUrl$4], [client], err); - } - client[kResume$1](); - } - function emitDrain(client) { - client[kNeedDrain$3] = 0; - client.emit("drain", client[kUrl$4], [client]); - } - function resume(client, sync) { - if (client[kResuming] === 2) return; - client[kResuming] = 2; - _resume(client, sync); - client[kResuming] = 0; - if (client[kRunningIdx] > 256) { - client[kQueue$1].splice(0, client[kRunningIdx]); - client[kPendingIdx] -= client[kRunningIdx]; - client[kRunningIdx] = 0; - } - } - function _resume(client, sync) { - while (true) { - if (client.destroyed) { - assert$20(client[kPending$1] === 0); - return; - } - if (client[kClosedResolve$1] && !client[kSize$3]) { - client[kClosedResolve$1](); - client[kClosedResolve$1] = null; - return; - } - if (client[kHTTPContext]) client[kHTTPContext].resume(); - if (client[kBusy$1]) client[kNeedDrain$3] = 2; - else if (client[kNeedDrain$3] === 2) { - if (sync) { - client[kNeedDrain$3] = 1; - queueMicrotask(() => emitDrain(client)); - } else emitDrain(client); - continue; - } - if (client[kPending$1] === 0) return; - if (client[kRunning$2] >= (getPipelining(client) || 1)) return; - const request$1 = client[kQueue$1][client[kPendingIdx]]; - if (client[kUrl$4].protocol === "https:" && client[kServerName] !== request$1.servername) { - if (client[kRunning$2] > 0) return; - client[kServerName] = request$1.servername; - client[kHTTPContext]?.destroy(new InformationalError$1("servername changed"), () => { - client[kHTTPContext] = null; - resume(client); - }); - } - if (client[kConnecting]) return; - if (!client[kHTTPContext]) { - connect$2(client); - return; - } - if (client[kHTTPContext].destroyed) return; - if (client[kHTTPContext].busy(request$1)) return; - if (!request$1.aborted && client[kHTTPContext].write(request$1)) client[kPendingIdx]++; - else client[kQueue$1].splice(client[kPendingIdx], 1); - } - } - module.exports = Client$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/fixed-queue.js -var require_fixed_queue = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module) { - const kSize$2 = 2048; - const kMask = kSize$2 - 1; - /** - * @type {FixedCircularBuffer} - * @template T - */ - var FixedCircularBuffer = class { - constructor() { - /** - * @type {number} - */ - this.bottom = 0; - /** - * @type {number} - */ - this.top = 0; - /** - * @type {Array} - */ - this.list = new Array(kSize$2).fill(void 0); - /** - * @type {T|null} - */ - this.next = null; - } - /** - * @returns {boolean} - */ - isEmpty() { - return this.top === this.bottom; - } - /** - * @returns {boolean} - */ - isFull() { - return (this.top + 1 & kMask) === this.bottom; - } - /** - * @param {T} data - * @returns {void} - */ - push(data) { - this.list[this.top] = data; - this.top = this.top + 1 & kMask; - } - /** - * @returns {T|null} - */ - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === void 0) return null; - this.list[this.bottom] = void 0; - this.bottom = this.bottom + 1 & kMask; - return nextItem; - } - }; - /** - * @template T - */ - module.exports = class FixedQueue$2 { - constructor() { - /** - * @type {FixedCircularBuffer} - */ - this.head = this.tail = new FixedCircularBuffer(); - } - /** - * @returns {boolean} - */ - isEmpty() { - return this.head.isEmpty(); - } - /** - * @param {T} data - */ - push(data) { - if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); - this.head.push(data); - } - /** - * @returns {T|null} - */ - shift() { - const tail$1 = this.tail; - const next = tail$1.shift(); - if (tail$1.isEmpty() && tail$1.next !== null) { - this.tail = tail$1.next; - tail$1.next = null; - } - return next; - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/pool-base.js -var require_pool_base = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/pool-base.js"(exports, module) { - const { PoolStats } = require_stats(); - const DispatcherBase$4 = require_dispatcher_base(); - const FixedQueue$1 = require_fixed_queue(); - const { kConnected: kConnected$3, kSize: kSize$1, kRunning: kRunning$1, kPending, kQueued, kBusy, kFree, kUrl: kUrl$3, kClose: kClose$6, kDestroy: kDestroy$4, kDispatch: kDispatch$2 } = require_symbols(); - const kClients$4 = Symbol("clients"); - const kNeedDrain$2 = Symbol("needDrain"); - const kQueue = Symbol("queue"); - const kClosedResolve = Symbol("closed resolve"); - const kOnDrain$1 = Symbol("onDrain"); - const kOnConnect$1 = Symbol("onConnect"); - const kOnDisconnect$1 = Symbol("onDisconnect"); - const kOnConnectionError$1 = Symbol("onConnectionError"); - const kGetDispatcher$2 = Symbol("get dispatcher"); - const kAddClient$2 = Symbol("add client"); - const kRemoveClient$1 = Symbol("remove client"); - var PoolBase$2 = class extends DispatcherBase$4 { - constructor() { - super(); - this[kQueue] = new FixedQueue$1(); - this[kClients$4] = []; - this[kQueued] = 0; - const pool = this; - this[kOnDrain$1] = function onDrain(origin, targets) { - const queue = pool[kQueue]; - let needDrain = false; - while (!needDrain) { - const item = queue.shift(); - if (!item) break; - pool[kQueued]--; - needDrain = !this.dispatch(item.opts, item.handler); - } - this[kNeedDrain$2] = needDrain; - if (!this[kNeedDrain$2] && pool[kNeedDrain$2]) { - pool[kNeedDrain$2] = false; - pool.emit("drain", origin, [pool, ...targets]); - } - if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients$4].map((c) => c.close())).then(pool[kClosedResolve]); - }; - this[kOnConnect$1] = (origin, targets) => { - pool.emit("connect", origin, [pool, ...targets]); - }; - this[kOnDisconnect$1] = (origin, targets, err) => { - pool.emit("disconnect", origin, [pool, ...targets], err); - }; - this[kOnConnectionError$1] = (origin, targets, err) => { - pool.emit("connectionError", origin, [pool, ...targets], err); - }; - } - get [kBusy]() { - return this[kNeedDrain$2]; - } - get [kConnected$3]() { - return this[kClients$4].filter((client) => client[kConnected$3]).length; - } - get [kFree]() { - return this[kClients$4].filter((client) => client[kConnected$3] && !client[kNeedDrain$2]).length; - } - get [kPending]() { - let ret = this[kQueued]; - for (const { [kPending]: pending } of this[kClients$4]) ret += pending; - return ret; - } - get [kRunning$1]() { - let ret = 0; - for (const { [kRunning$1]: running } of this[kClients$4]) ret += running; - return ret; - } - get [kSize$1]() { - let ret = this[kQueued]; - for (const { [kSize$1]: size } of this[kClients$4]) ret += size; - return ret; - } - get stats() { - return new PoolStats(this); - } - async [kClose$6]() { - if (this[kQueue].isEmpty()) await Promise.all(this[kClients$4].map((c) => c.close())); - else await new Promise((resolve) => { - this[kClosedResolve] = resolve; - }); - } - async [kDestroy$4](err) { - while (true) { - const item = this[kQueue].shift(); - if (!item) break; - item.handler.onError(err); - } - await Promise.all(this[kClients$4].map((c) => c.destroy(err))); - } - [kDispatch$2](opts, handler) { - const dispatcher = this[kGetDispatcher$2](); - if (!dispatcher) { - this[kNeedDrain$2] = true; - this[kQueue].push({ - opts, - handler - }); - this[kQueued]++; - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain$2] = true; - this[kNeedDrain$2] = !this[kGetDispatcher$2](); - } - return !this[kNeedDrain$2]; - } - [kAddClient$2](client) { - client.on("drain", this[kOnDrain$1]).on("connect", this[kOnConnect$1]).on("disconnect", this[kOnDisconnect$1]).on("connectionError", this[kOnConnectionError$1]); - this[kClients$4].push(client); - if (this[kNeedDrain$2]) queueMicrotask(() => { - if (this[kNeedDrain$2]) this[kOnDrain$1](client[kUrl$3], [this, client]); - }); - return this; - } - [kRemoveClient$1](client) { - client.close(() => { - const idx = this[kClients$4].indexOf(client); - if (idx !== -1) this[kClients$4].splice(idx, 1); - }); - this[kNeedDrain$2] = this[kClients$4].some((dispatcher) => !dispatcher[kNeedDrain$2] && dispatcher.closed !== true && dispatcher.destroyed !== true); - } - }; - module.exports = { - PoolBase: PoolBase$2, - kClients: kClients$4, - kNeedDrain: kNeedDrain$2, - kAddClient: kAddClient$2, - kRemoveClient: kRemoveClient$1, - kGetDispatcher: kGetDispatcher$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/pool.js -var require_pool = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/pool.js"(exports, module) { - const { PoolBase: PoolBase$1, kClients: kClients$3, kNeedDrain: kNeedDrain$1, kAddClient: kAddClient$1, kGetDispatcher: kGetDispatcher$1 } = require_pool_base(); - const Client$4 = require_client(); - const { InvalidArgumentError: InvalidArgumentError$21 } = require_errors(); - const util$16 = require_util$5(); - const { kUrl: kUrl$2 } = require_symbols(); - const buildConnector$2 = require_connect(); - const kOptions$3 = Symbol("options"); - const kConnections = Symbol("connections"); - const kFactory$3 = Symbol("factory"); - function defaultFactory$3(origin, opts) { - return new Client$4(origin, opts); - } - var Pool$5 = class extends PoolBase$1 { - constructor(origin, { connections, factory = defaultFactory$3, connect: connect$3, connectTimeout, tls: tls$1, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2,...options } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError$21("invalid connections"); - if (typeof factory !== "function") throw new InvalidArgumentError$21("factory must be a function."); - if (connect$3 != null && typeof connect$3 !== "function" && typeof connect$3 !== "object") throw new InvalidArgumentError$21("connect must be a function or an object"); - super(); - if (typeof connect$3 !== "function") connect$3 = buildConnector$2({ - ...tls$1, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...typeof autoSelectFamily === "boolean" ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : void 0, - ...connect$3 - }); - this[kConnections] = connections || null; - this[kUrl$2] = util$16.parseOrigin(origin); - this[kOptions$3] = { - ...util$16.deepClone(options), - connect: connect$3, - allowH2 - }; - this[kOptions$3].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kFactory$3] = factory; - this.on("connectionError", (origin$1, targets, error) => { - for (const target of targets) { - const idx = this[kClients$3].indexOf(target); - if (idx !== -1) this[kClients$3].splice(idx, 1); - } - }); - } - [kGetDispatcher$1]() { - for (const client of this[kClients$3]) if (!client[kNeedDrain$1]) return client; - if (!this[kConnections] || this[kClients$3].length < this[kConnections]) { - const dispatcher = this[kFactory$3](this[kUrl$2], this[kOptions$3]); - this[kAddClient$1](dispatcher); - return dispatcher; - } - } - }; - module.exports = Pool$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/balanced-pool.js -var require_balanced_pool = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module) { - const { BalancedPoolMissingUpstreamError, InvalidArgumentError: InvalidArgumentError$20 } = require_errors(); - const { PoolBase, kClients: kClients$2, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); - const Pool$4 = require_pool(); - const { kUrl: kUrl$1 } = require_symbols(); - const { parseOrigin } = require_util$5(); - const kFactory$2 = Symbol("factory"); - const kOptions$2 = Symbol("options"); - const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); - const kCurrentWeight = Symbol("kCurrentWeight"); - const kIndex = Symbol("kIndex"); - const kWeight = Symbol("kWeight"); - const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); - const kErrorPenalty = Symbol("kErrorPenalty"); - /** - * Calculate the greatest common divisor of two numbers by - * using the Euclidean algorithm. - * - * @param {number} a - * @param {number} b - * @returns {number} - */ - function getGreatestCommonDivisor(a, b) { - if (a === 0) return b; - while (b !== 0) { - const t$5 = b; - b = a % b; - a = t$5; - } - return a; - } - function defaultFactory$2(origin, opts) { - return new Pool$4(origin, opts); - } - var BalancedPool$1 = class extends PoolBase { - constructor(upstreams = [], { factory = defaultFactory$2,...opts } = {}) { - if (typeof factory !== "function") throw new InvalidArgumentError$20("factory must be a function."); - super(); - this[kOptions$2] = opts; - this[kIndex] = -1; - this[kCurrentWeight] = 0; - this[kMaxWeightPerServer] = this[kOptions$2].maxWeightPerServer || 100; - this[kErrorPenalty] = this[kOptions$2].errorPenalty || 15; - if (!Array.isArray(upstreams)) upstreams = [upstreams]; - this[kFactory$2] = factory; - for (const upstream of upstreams) this.addUpstream(upstream); - this._updateBalancedPoolStats(); - } - addUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - if (this[kClients$2].find((pool$1) => pool$1[kUrl$1].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true)) return this; - const pool = this[kFactory$2](upstreamOrigin, Object.assign({}, this[kOptions$2])); - this[kAddClient](pool); - pool.on("connect", () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); - }); - pool.on("connectionError", () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); - }); - pool.on("disconnect", (...args) => { - const err = args[2]; - if (err && err.code === "UND_ERR_SOCKET") { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); - } - }); - for (const client of this[kClients$2]) client[kWeight] = this[kMaxWeightPerServer]; - this._updateBalancedPoolStats(); - return this; - } - _updateBalancedPoolStats() { - let result = 0; - for (let i = 0; i < this[kClients$2].length; i++) result = getGreatestCommonDivisor(this[kClients$2][i][kWeight], result); - this[kGreatestCommonDivisor] = result; - } - removeUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - const pool = this[kClients$2].find((pool$1) => pool$1[kUrl$1].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true); - if (pool) this[kRemoveClient](pool); - return this; - } - get upstreams() { - return this[kClients$2].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl$1].origin); - } - [kGetDispatcher]() { - if (this[kClients$2].length === 0) throw new BalancedPoolMissingUpstreamError(); - const dispatcher = this[kClients$2].find((dispatcher$1) => !dispatcher$1[kNeedDrain] && dispatcher$1.closed !== true && dispatcher$1.destroyed !== true); - if (!dispatcher) return; - const allClientsBusy = this[kClients$2].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); - if (allClientsBusy) return; - let counter = 0; - let maxWeightIndex = this[kClients$2].findIndex((pool) => !pool[kNeedDrain]); - while (counter++ < this[kClients$2].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients$2].length; - const pool = this[kClients$2][this[kIndex]]; - if (pool[kWeight] > this[kClients$2][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; - if (this[kIndex] === 0) { - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; - if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; - } - if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; - } - this[kCurrentWeight] = this[kClients$2][maxWeightIndex][kWeight]; - this[kIndex] = maxWeightIndex; - return this[kClients$2][maxWeightIndex]; - } - }; - module.exports = BalancedPool$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/agent.js -var require_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/agent.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$19 } = require_errors(); - const { kClients: kClients$1, kRunning, kClose: kClose$5, kDestroy: kDestroy$3, kDispatch: kDispatch$1, kUrl } = require_symbols(); - const DispatcherBase$3 = require_dispatcher_base(); - const Pool$3 = require_pool(); - const Client$3 = require_client(); - const util$15 = require_util$5(); - const kOnConnect = Symbol("onConnect"); - const kOnDisconnect = Symbol("onDisconnect"); - const kOnConnectionError = Symbol("onConnectionError"); - const kOnDrain = Symbol("onDrain"); - const kFactory$1 = Symbol("factory"); - const kOptions$1 = Symbol("options"); - function defaultFactory$1(origin, opts) { - return opts && opts.connections === 1 ? new Client$3(origin, opts) : new Pool$3(origin, opts); - } - var Agent$5 = class extends DispatcherBase$3 { - constructor({ factory = defaultFactory$1, connect: connect$3,...options } = {}) { - if (typeof factory !== "function") throw new InvalidArgumentError$19("factory must be a function."); - if (connect$3 != null && typeof connect$3 !== "function" && typeof connect$3 !== "object") throw new InvalidArgumentError$19("connect must be a function or an object"); - super(); - if (connect$3 && typeof connect$3 !== "function") connect$3 = { ...connect$3 }; - this[kOptions$1] = { - ...util$15.deepClone(options), - connect: connect$3 - }; - this[kFactory$1] = factory; - this[kClients$1] = new Map(); - this[kOnDrain] = (origin, targets) => { - this.emit("drain", origin, [this, ...targets]); - }; - this[kOnConnect] = (origin, targets) => { - this.emit("connect", origin, [this, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - this.emit("disconnect", origin, [this, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - this.emit("connectionError", origin, [this, ...targets], err); - }; - } - get [kRunning]() { - let ret = 0; - for (const client of this[kClients$1].values()) ret += client[kRunning]; - return ret; - } - [kDispatch$1](opts, handler) { - let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); - else throw new InvalidArgumentError$19("opts.origin must be a non-empty string or URL."); - let dispatcher = this[kClients$1].get(key); - if (!dispatcher) { - dispatcher = this[kFactory$1](opts.origin, this[kOptions$1]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients$1].set(key, dispatcher); - } - return dispatcher.dispatch(opts, handler); - } - async [kClose$5]() { - const closePromises = []; - for (const client of this[kClients$1].values()) closePromises.push(client.close()); - this[kClients$1].clear(); - await Promise.all(closePromises); - } - async [kDestroy$3](err) { - const destroyPromises = []; - for (const client of this[kClients$1].values()) destroyPromises.push(client.destroy(err)); - this[kClients$1].clear(); - await Promise.all(destroyPromises); - } - get stats() { - const allClientStats = {}; - for (const client of this[kClients$1].values()) if (client.stats) allClientStats[client[kUrl].origin] = client.stats; - return allClientStats; - } - }; - module.exports = Agent$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/proxy-agent.js -var require_proxy_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module) { - const { kProxy, kClose: kClose$4, kDestroy: kDestroy$2 } = require_symbols(); - const { URL: URL$1 } = __require("node:url"); - const Agent$4 = require_agent(); - const Pool$2 = require_pool(); - const DispatcherBase$2 = require_dispatcher_base(); - const { InvalidArgumentError: InvalidArgumentError$18, RequestAbortedError: RequestAbortedError$5, SecureProxyConnectionError } = require_errors(); - const buildConnector$1 = require_connect(); - const kAgent$1 = Symbol("proxy agent"); - const kClient = Symbol("proxy client"); - const kProxyHeaders = Symbol("proxy headers"); - const kRequestTls = Symbol("request tls settings"); - const kProxyTls = Symbol("proxy tls settings"); - const kConnectEndpoint = Symbol("connect endpoint function"); - function defaultProtocolPort(protocol) { - return protocol === "https:" ? 443 : 80; - } - function defaultFactory(origin, opts) { - return new Pool$2(origin, opts); - } - const noop$6 = () => {}; - var ProxyAgent$2 = class extends DispatcherBase$2 { - constructor(opts) { - if (!opts || typeof opts === "object" && !(opts instanceof URL$1) && !opts.uri) throw new InvalidArgumentError$18("Proxy uri is mandatory"); - const { clientFactory = defaultFactory } = opts; - if (typeof clientFactory !== "function") throw new InvalidArgumentError$18("Proxy opts.clientFactory must be a function."); - super(); - const url = this.#getUrl(opts); - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; - this[kProxy] = { - uri: href, - protocol - }; - this[kRequestTls] = opts.requestTls; - this[kProxyTls] = opts.proxyTls; - this[kProxyHeaders] = opts.headers || {}; - if (opts.auth && opts.token) throw new InvalidArgumentError$18("opts.auth cannot be used in combination with opts.token"); - else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; - else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; - else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; - const connect$3 = buildConnector$1({ ...opts.proxyTls }); - this[kConnectEndpoint] = buildConnector$1({ ...opts.requestTls }); - this[kClient] = clientFactory(url, { connect: connect$3 }); - this[kAgent$1] = new Agent$4({ - ...opts, - connect: async (opts$1, callback) => { - let requestedPath = opts$1.host; - if (!opts$1.port) requestedPath += `:${defaultProtocolPort(opts$1.protocol)}`; - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts$1.signal, - headers: { - ...this[kProxyHeaders], - host: opts$1.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }); - if (statusCode !== 200) { - socket.on("error", noop$6).destroy(); - callback(new RequestAbortedError$5(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); - } - if (opts$1.protocol !== "https:") { - callback(null, socket); - return; - } - let servername; - if (this[kRequestTls]) servername = this[kRequestTls].servername; - else servername = opts$1.servername; - this[kConnectEndpoint]({ - ...opts$1, - servername, - httpSocket: socket - }, callback); - } catch (err) { - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); - else callback(err); - } - } - }); - } - dispatch(opts, handler) { - const headers = buildHeaders(opts.headers); - throwIfProxyAuthIsSent(headers); - if (headers && !("host" in headers) && !("Host" in headers)) { - const { host } = new URL$1(opts.origin); - headers.host = host; - } - return this[kAgent$1].dispatch({ - ...opts, - headers - }, handler); - } - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl(opts) { - if (typeof opts === "string") return new URL$1(opts); - else if (opts instanceof URL$1) return opts; - else return new URL$1(opts.uri); - } - async [kClose$4]() { - await this[kAgent$1].close(); - await this[kClient].close(); - } - async [kDestroy$2]() { - await this[kAgent$1].destroy(); - await this[kClient].destroy(); - } - }; - /** - * @param {string[] | Record} headers - * @returns {Record} - */ - function buildHeaders(headers) { - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {}; - for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; - return headersPair; - } - return headers; - } - /** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ - function throwIfProxyAuthIsSent(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) throw new InvalidArgumentError$18("Proxy-Authorization should be sent in ProxyAgent constructor"); - } - module.exports = ProxyAgent$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js -var require_env_http_proxy_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module) { - const DispatcherBase$1 = require_dispatcher_base(); - const { kClose: kClose$3, kDestroy: kDestroy$1, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols(); - const ProxyAgent$1 = require_proxy_agent(); - const Agent$3 = require_agent(); - const DEFAULT_PORTS = { - "http:": 80, - "https:": 443 - }; - var EnvHttpProxyAgent$1 = class extends DispatcherBase$1 { - #noProxyValue = null; - #noProxyEntries = null; - #opts = null; - constructor(opts = {}) { - super(); - this.#opts = opts; - const { httpProxy, httpsProxy, noProxy,...agentOpts } = opts; - this[kNoProxyAgent] = new Agent$3(agentOpts); - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; - if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent$1({ - ...agentOpts, - uri: HTTP_PROXY - }); - else this[kHttpProxyAgent] = this[kNoProxyAgent]; - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; - if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent$1({ - ...agentOpts, - uri: HTTPS_PROXY - }); - else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; - this.#parseNoProxy(); - } - [kDispatch](opts, handler) { - const url = new URL(opts.origin); - const agent = this.#getProxyAgentForUrl(url); - return agent.dispatch(opts, handler); - } - async [kClose$3]() { - await this[kNoProxyAgent].close(); - if (!this[kHttpProxyAgent][kClosed]) await this[kHttpProxyAgent].close(); - if (!this[kHttpsProxyAgent][kClosed]) await this[kHttpsProxyAgent].close(); - } - async [kDestroy$1](err) { - await this[kNoProxyAgent].destroy(err); - if (!this[kHttpProxyAgent][kDestroyed]) await this[kHttpProxyAgent].destroy(err); - if (!this[kHttpsProxyAgent][kDestroyed]) await this[kHttpsProxyAgent].destroy(err); - } - #getProxyAgentForUrl(url) { - let { protocol, host: hostname, port } = url; - hostname = hostname.replace(/:\d*$/, "").toLowerCase(); - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; - if (protocol === "https:") return this[kHttpsProxyAgent]; - return this[kHttpProxyAgent]; - } - #shouldProxy(hostname, port) { - if (this.#noProxyChanged) this.#parseNoProxy(); - if (this.#noProxyEntries.length === 0) return true; - if (this.#noProxyValue === "*") return false; - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i]; - if (entry.port && entry.port !== port) continue; - if (!/^[.*]/.test(entry.hostname)) { - if (hostname === entry.hostname) return false; - } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; - } - return true; - } - #parseNoProxy() { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; - const noProxySplit = noProxyValue.split(/[,\s]/); - const noProxyEntries = []; - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i]; - if (!entry) continue; - const parsed = entry.match(/^(.+):(\d+)$/); - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }); - } - this.#noProxyValue = noProxyValue; - this.#noProxyEntries = noProxyEntries; - } - get #noProxyChanged() { - if (this.#opts.noProxy !== void 0) return false; - return this.#noProxyValue !== this.#noProxyEnv; - } - get #noProxyEnv() { - return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; - } - }; - module.exports = EnvHttpProxyAgent$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/retry-handler.js -var require_retry_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/retry-handler.js"(exports, module) { - const assert$19 = __require("node:assert"); - const { kRetryHandlerDefaultRetry } = require_symbols(); - const { RequestRetryError } = require_errors(); - const WrapHandler$1 = require_wrap_handler(); - const { isDisturbed: isDisturbed$1, parseRangeHeader, wrapRequestBody } = require_util$5(); - function calculateRetryAfterHeader(retryAfter) { - const retryTime = new Date(retryAfter).getTime(); - return isNaN(retryTime) ? 0 : retryTime - Date.now(); - } - var RetryHandler$3 = class RetryHandler$3 { - constructor(opts, { dispatch, handler }) { - const { retryOptions,...dispatchOpts } = opts; - const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; - this.dispatch = dispatch; - this.handler = WrapHandler$1.wrap(handler); - this.opts = { - ...dispatchOpts, - body: wrapRequestBody(opts.body) - }; - this.retryOpts = { - retry: retryFn ?? RetryHandler$3[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1e3, - minTimeout: minTimeout ?? 500, - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - methods: methods ?? [ - "GET", - "HEAD", - "OPTIONS", - "PUT", - "DELETE", - "TRACE" - ], - statusCodes: statusCodes ?? [ - 500, - 502, - 503, - 504, - 429 - ], - errorCodes: errorCodes ?? [ - "ECONNRESET", - "ECONNREFUSED", - "ENOTFOUND", - "ENETDOWN", - "ENETUNREACH", - "EHOSTDOWN", - "EHOSTUNREACH", - "EPIPE", - "UND_ERR_SOCKET" - ] - }; - this.retryCount = 0; - this.retryCountCheckpoint = 0; - this.headersSent = false; - this.start = 0; - this.end = null; - this.etag = null; - } - onRequestStart(controller, context) { - if (!this.headersSent) this.handler.onRequestStart?.(controller, context); - } - onRequestUpgrade(controller, statusCode, headers, socket) { - this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); - } - static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { - const { statusCode, code, headers } = err; - const { method, retryOptions } = opts; - const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; - const { counter } = state; - if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { - cb(err); - return; - } - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err); - return; - } - if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { - cb(err); - return; - } - if (counter > maxRetries) { - cb(err); - return; - } - let retryAfterHeader = headers?.["retry-after"]; - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader); - retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(headers["retry-after"]) : retryAfterHeader * 1e3; - } - const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); - setTimeout(() => cb(null), retryTimeout); - } - onResponseStart(controller, statusCode, headers, statusMessage) { - this.retryCount += 1; - if (statusCode >= 300) if (this.retryOpts.statusCodes.includes(statusCode) === false) { - this.headersSent = true; - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); - return; - } else throw new RequestRetryError("Request failed", statusCode, { - headers, - data: { count: this.retryCount } - }); - if (this.headersSent) { - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) throw new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { - headers, - data: { count: this.retryCount } - }); - const contentRange = parseRangeHeader(headers["content-range"]); - if (!contentRange) throw new RequestRetryError("Content-Range mismatch", statusCode, { - headers, - data: { count: this.retryCount } - }); - if (this.etag != null && this.etag !== headers.etag) throw new RequestRetryError("ETag mismatch", statusCode, { - headers, - data: { count: this.retryCount } - }); - const { start, size, end = size ? size - 1 : null } = contentRange; - assert$19(this.start === start, "content-range mismatch"); - assert$19(this.end == null || this.end === end, "content-range mismatch"); - return; - } - if (this.end == null) { - if (statusCode === 206) { - const range = parseRangeHeader(headers["content-range"]); - if (range == null) { - this.headersSent = true; - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); - return; - } - const { start, size, end = size ? size - 1 : null } = range; - assert$19(start != null && Number.isFinite(start), "content-range mismatch"); - assert$19(end != null && Number.isFinite(end), "invalid content-length"); - this.start = start; - this.end = end; - } - if (this.end == null) { - const contentLength = headers["content-length"]; - this.end = contentLength != null ? Number(contentLength) - 1 : null; - } - assert$19(Number.isFinite(this.start)); - assert$19(this.end == null || Number.isFinite(this.end), "invalid content-length"); - this.resume = true; - this.etag = headers.etag != null ? headers.etag : null; - if (this.etag != null && this.etag[0] === "W" && this.etag[1] === "/") this.etag = null; - this.headersSent = true; - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); - } else throw new RequestRetryError("Request failed", statusCode, { - headers, - data: { count: this.retryCount } - }); - } - onResponseData(controller, chunk) { - this.start += chunk.length; - this.handler.onResponseData?.(controller, chunk); - } - onResponseEnd(controller, trailers) { - this.retryCount = 0; - return this.handler.onResponseEnd?.(controller, trailers); - } - onResponseError(controller, err) { - if (controller?.aborted || isDisturbed$1(this.opts.body)) { - this.handler.onResponseError?.(controller, err); - return; - } - if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); - else this.retryCount += 1; - this.retryOpts.retry(err, { - state: { counter: this.retryCount }, - opts: { - retryOptions: this.retryOpts, - ...this.opts - } - }, onRetry.bind(this)); - /** - * @this {RetryHandler} - * @param {Error} [err] - * @returns - */ - function onRetry(err$1) { - if (err$1 != null || controller?.aborted || isDisturbed$1(this.opts.body)) return this.handler.onResponseError?.(controller, err$1); - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; - if (this.etag != null) headers["if-match"] = this.etag; - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - }; - } - try { - this.retryCountCheckpoint = this.retryCount; - this.dispatch(this.opts, this); - } catch (err$2) { - this.handler.onResponseError?.(controller, err$2); - } - } - } - }; - module.exports = RetryHandler$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/retry-agent.js -var require_retry_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module) { - const Dispatcher$2 = require_dispatcher(); - const RetryHandler$2 = require_retry_handler(); - var RetryAgent$1 = class extends Dispatcher$2 { - #agent = null; - #options = null; - constructor(agent, options = {}) { - super(options); - this.#agent = agent; - this.#options = options; - } - dispatch(opts, handler) { - const retry = new RetryHandler$2({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }); - return this.#agent.dispatch(opts, retry); - } - close() { - return this.#agent.close(); - } - destroy() { - return this.#agent.destroy(); - } - }; - module.exports = RetryAgent$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/h2c-client.js -var require_h2c_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/dispatcher/h2c-client.js"(exports, module) { - const { connect: connect$1 } = __require("node:net"); - const { kClose: kClose$2, kDestroy } = require_symbols(); - const { InvalidArgumentError: InvalidArgumentError$17 } = require_errors(); - const util$14 = require_util$5(); - const Client$2 = require_client(); - const DispatcherBase = require_dispatcher_base(); - var H2CClient$1 = class extends DispatcherBase { - #client = null; - constructor(origin, clientOpts) { - super(); - if (typeof origin === "string") origin = new URL(origin); - if (origin.protocol !== "http:") throw new InvalidArgumentError$17("h2c-client: Only h2c protocol is supported"); - const { connect: connect$3, maxConcurrentStreams, pipelining,...opts } = clientOpts ?? {}; - let defaultMaxConcurrentStreams = 100; - let defaultPipelining = 100; - if (maxConcurrentStreams != null && Number.isInteger(maxConcurrentStreams) && maxConcurrentStreams > 0) defaultMaxConcurrentStreams = maxConcurrentStreams; - if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) defaultPipelining = pipelining; - if (defaultPipelining > defaultMaxConcurrentStreams) throw new InvalidArgumentError$17("h2c-client: pipelining cannot be greater than maxConcurrentStreams"); - this.#client = new Client$2(origin, { - ...opts, - connect: this.#buildConnector(connect$3), - maxConcurrentStreams: defaultMaxConcurrentStreams, - pipelining: defaultPipelining, - allowH2: true - }); - } - #buildConnector(connectOpts) { - return (opts, callback) => { - const timeout = connectOpts?.connectOpts ?? 1e4; - const { hostname, port, pathname } = opts; - const socket = connect$1({ - ...opts, - host: hostname, - port, - pathname - }); - if (opts.keepAlive == null || opts.keepAlive) { - const keepAliveInitialDelay = opts.keepAliveInitialDelay == null ? 6e4 : opts.keepAliveInitialDelay; - socket.setKeepAlive(true, keepAliveInitialDelay); - } - socket.alpnProtocol = "h2"; - const clearConnectTimeout = util$14.setupConnectTimeout(new WeakRef(socket), { - timeout, - hostname, - port - }); - socket.setNoDelay(true).once("connect", function() { - queueMicrotask(clearConnectTimeout); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - queueMicrotask(clearConnectTimeout); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }; - } - dispatch(opts, handler) { - return this.#client.dispatch(opts, handler); - } - async [kClose$2]() { - await this.#client.close(); - } - async [kDestroy]() { - await this.#client.destroy(); - } - }; - module.exports = H2CClient$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/readable.js -var require_readable = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/readable.js"(exports, module) { - const assert$18 = __require("node:assert"); - const { Readable: Readable$4 } = __require("node:stream"); - const { RequestAbortedError: RequestAbortedError$4, NotSupportedError, InvalidArgumentError: InvalidArgumentError$16, AbortError: AbortError$1 } = require_errors(); - const util$13 = require_util$5(); - const { ReadableStreamFrom } = require_util$5(); - const kConsume = Symbol("kConsume"); - const kReading = Symbol("kReading"); - const kBody$1 = Symbol("kBody"); - const kAbort = Symbol("kAbort"); - const kContentType = Symbol("kContentType"); - const kContentLength$1 = Symbol("kContentLength"); - const kUsed = Symbol("kUsed"); - const kBytesRead = Symbol("kBytesRead"); - const noop$5 = () => {}; - /** - * @class - * @extends {Readable} - * @see https://fetch.spec.whatwg.org/#body - */ - var BodyReadable = class extends Readable$4 { - /** - * @param {object} opts - * @param {(this: Readable, size: number) => void} opts.resume - * @param {() => (void | null)} opts.abort - * @param {string} [opts.contentType = ''] - * @param {number} [opts.contentLength] - * @param {number} [opts.highWaterMark = 64 * 1024] - */ - constructor({ resume: resume$1, abort: abort$1, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { - super({ - autoDestroy: true, - read: resume$1, - highWaterMark - }); - this._readableState.dataEmitted = false; - this[kAbort] = abort$1; - /** - * @type {Consume | null} - */ - this[kConsume] = null; - this[kBytesRead] = 0; - /** - * @type {ReadableStream|null} - */ - this[kBody$1] = null; - this[kUsed] = false; - this[kContentType] = contentType; - this[kContentLength$1] = Number.isFinite(contentLength) ? contentLength : null; - this[kReading] = false; - } - /** - * @param {Error|null} err - * @param {(error:(Error|null)) => void} callback - * @returns {void} - */ - _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$4(); - if (err) this[kAbort](); - if (!this[kUsed]) setImmediate(() => { - callback(err); - }); - else callback(err); - } - /** - * @param {string} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - on(event, listener) { - if (event === "data" || event === "readable") { - this[kReading] = true; - this[kUsed] = true; - } - return super.on(event, listener); - } - /** - * @param {string} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - addListener(event, listener) { - return this.on(event, listener); - } - /** - * @param {string|symbol} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - off(event, listener) { - const ret = super.off(event, listener); - if (event === "data" || event === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - return ret; - } - /** - * @param {string|symbol} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - removeListener(event, listener) { - return this.off(event, listener); - } - /** - * @param {Buffer|null} chunk - * @returns {boolean} - */ - push(chunk) { - this[kBytesRead] += chunk ? chunk.length : 0; - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk); - return this[kReading] ? super.push(chunk) : true; - } - return super.push(chunk); - } - /** - * Consumes and returns the body as a string. - * - * @see https://fetch.spec.whatwg.org/#dom-body-text - * @returns {Promise} - */ - text() { - return consume(this, "text"); - } - /** - * Consumes and returns the body as a JavaScript Object. - * - * @see https://fetch.spec.whatwg.org/#dom-body-json - * @returns {Promise} - */ - json() { - return consume(this, "json"); - } - /** - * Consumes and returns the body as a Blob - * - * @see https://fetch.spec.whatwg.org/#dom-body-blob - * @returns {Promise} - */ - blob() { - return consume(this, "blob"); - } - /** - * Consumes and returns the body as an Uint8Array. - * - * @see https://fetch.spec.whatwg.org/#dom-body-bytes - * @returns {Promise} - */ - bytes() { - return consume(this, "bytes"); - } - /** - * Consumes and returns the body as an ArrayBuffer. - * - * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer - * @returns {Promise} - */ - arrayBuffer() { - return consume(this, "arrayBuffer"); - } - /** - * Not implemented - * - * @see https://fetch.spec.whatwg.org/#dom-body-formdata - * @throws {NotSupportedError} - */ - async formData() { - throw new NotSupportedError(); - } - /** - * Returns true if the body is not null and the body has been consumed. - * Otherwise, returns false. - * - * @see https://fetch.spec.whatwg.org/#dom-body-bodyused - * @readonly - * @returns {boolean} - */ - get bodyUsed() { - return util$13.isDisturbed(this); - } - /** - * @see https://fetch.spec.whatwg.org/#dom-body-body - * @readonly - * @returns {ReadableStream} - */ - get body() { - if (!this[kBody$1]) { - this[kBody$1] = ReadableStreamFrom(this); - if (this[kConsume]) { - this[kBody$1].getReader(); - assert$18(this[kBody$1].locked); - } - } - return this[kBody$1]; - } - /** - * Dumps the response body by reading `limit` number of bytes. - * @param {object} opts - * @param {number} [opts.limit = 131072] Number of bytes to read. - * @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump. - * @returns {Promise} - */ - async dump(opts) { - const signal = opts?.signal; - if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) throw new InvalidArgumentError$16("signal must be an AbortSignal"); - const limit = opts?.limit && Number.isFinite(opts.limit) ? opts.limit : 128 * 1024; - signal?.throwIfAborted(); - if (this._readableState.closeEmitted) return null; - return await new Promise((resolve, reject) => { - if (this[kContentLength$1] && this[kContentLength$1] > limit || this[kBytesRead] > limit) this.destroy(new AbortError$1()); - if (signal) { - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError$1()); - }; - signal.addEventListener("abort", onAbort); - this.on("close", function() { - signal.removeEventListener("abort", onAbort); - if (signal.aborted) reject(signal.reason ?? new AbortError$1()); - else resolve(null); - }); - } else this.on("close", resolve); - this.on("error", noop$5).on("data", () => { - if (this[kBytesRead] > limit) this.destroy(); - }).resume(); - }); - } - /** - * @param {BufferEncoding} encoding - * @returns {this} - */ - setEncoding(encoding) { - if (Buffer.isEncoding(encoding)) this._readableState.encoding = encoding; - return this; - } - }; - /** - * @see https://streams.spec.whatwg.org/#readablestream-locked - * @param {BodyReadable} bodyReadable - * @returns {boolean} - */ - function isLocked(bodyReadable) { - return bodyReadable[kBody$1]?.locked === true || bodyReadable[kConsume] !== null; - } - /** - * @see https://fetch.spec.whatwg.org/#body-unusable - * @param {BodyReadable} bodyReadable - * @returns {boolean} - */ - function isUnusable(bodyReadable) { - return util$13.isDisturbed(bodyReadable) || isLocked(bodyReadable); - } - /** - * @typedef {object} Consume - * @property {string} type - * @property {BodyReadable} stream - * @property {((value?: any) => void)} resolve - * @property {((err: Error) => void)} reject - * @property {number} length - * @property {Buffer[]} body - */ - /** - * @param {BodyReadable} stream - * @param {string} type - * @returns {Promise} - */ - function consume(stream$3, type) { - assert$18(!stream$3[kConsume]); - return new Promise((resolve, reject) => { - if (isUnusable(stream$3)) { - const rState = stream$3._readableState; - if (rState.destroyed && rState.closeEmitted === false) stream$3.on("error", (err) => { - reject(err); - }).on("close", () => { - reject(new TypeError("unusable")); - }); - else reject(rState.errored ?? new TypeError("unusable")); - } else queueMicrotask(() => { - stream$3[kConsume] = { - type, - stream: stream$3, - resolve, - reject, - length: 0, - body: [] - }; - stream$3.on("error", function(err) { - consumeFinish(this[kConsume], err); - }).on("close", function() { - if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError$4()); - }); - consumeStart(stream$3[kConsume]); - }); - }); - } - /** - * @param {Consume} consume - * @returns {void} - */ - function consumeStart(consume$1) { - if (consume$1.body === null) return; - const { _readableState: state } = consume$1.stream; - if (state.bufferIndex) { - const start = state.bufferIndex; - const end = state.buffer.length; - for (let n = start; n < end; n++) consumePush(consume$1, state.buffer[n]); - } else for (const chunk of state.buffer) consumePush(consume$1, chunk); - if (state.endEmitted) consumeEnd(this[kConsume], this._readableState.encoding); - else consume$1.stream.on("end", function() { - consumeEnd(this[kConsume], this._readableState.encoding); - }); - consume$1.stream.resume(); - while (consume$1.stream.read() != null); - } - /** - * @param {Buffer[]} chunks - * @param {number} length - * @param {BufferEncoding} encoding - * @returns {string} - */ - function chunksDecode(chunks, length, encoding) { - if (chunks.length === 0 || length === 0) return ""; - const buffer$1 = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); - const bufferLength = buffer$1.length; - const start = bufferLength > 2 && buffer$1[0] === 239 && buffer$1[1] === 187 && buffer$1[2] === 191 ? 3 : 0; - if (!encoding || encoding === "utf8" || encoding === "utf-8") return buffer$1.utf8Slice(start, bufferLength); - else return buffer$1.subarray(start, bufferLength).toString(encoding); - } - /** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ - function chunksConcat(chunks, length) { - if (chunks.length === 0 || length === 0) return new Uint8Array(0); - if (chunks.length === 1) return new Uint8Array(chunks[0]); - const buffer$1 = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); - let offset = 0; - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i]; - buffer$1.set(chunk, offset); - offset += chunk.length; - } - return buffer$1; - } - /** - * @param {Consume} consume - * @param {BufferEncoding} encoding - * @returns {void} - */ - function consumeEnd(consume$1, encoding) { - const { type, body, resolve, stream: stream$3, length } = consume$1; - try { - if (type === "text") resolve(chunksDecode(body, length, encoding)); - else if (type === "json") resolve(JSON.parse(chunksDecode(body, length, encoding))); - else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); - else if (type === "blob") resolve(new Blob(body, { type: stream$3[kContentType] })); - else if (type === "bytes") resolve(chunksConcat(body, length)); - consumeFinish(consume$1); - } catch (err) { - stream$3.destroy(err); - } - } - /** - * @param {Consume} consume - * @param {Buffer} chunk - * @returns {void} - */ - function consumePush(consume$1, chunk) { - consume$1.length += chunk.length; - consume$1.body.push(chunk); - } - /** - * @param {Consume} consume - * @param {Error} [err] - * @returns {void} - */ - function consumeFinish(consume$1, err) { - if (consume$1.body === null) return; - if (err) consume$1.reject(err); - else consume$1.resolve(); - consume$1.type = null; - consume$1.stream = null; - consume$1.resolve = null; - consume$1.reject = null; - consume$1.length = 0; - consume$1.body = null; - } - module.exports = { - Readable: BodyReadable, - chunksDecode - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-request.js -var require_api_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-request.js"(exports, module) { - const assert$17 = __require("node:assert"); - const { AsyncResource: AsyncResource$4 } = __require("node:async_hooks"); - const { Readable: Readable$3 } = require_readable(); - const { InvalidArgumentError: InvalidArgumentError$15, RequestAbortedError: RequestAbortedError$3 } = require_errors(); - const util$12 = require_util$5(); - function noop$4() {} - var RequestHandler = class extends AsyncResource$4 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$15("invalid opts"); - const { signal, method, opaque, body, onInfo, responseHeaders, highWaterMark } = opts; - try { - if (typeof callback !== "function") throw new InvalidArgumentError$15("invalid callback"); - if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError$15("invalid highWaterMark"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$15("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$15("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$15("invalid onInfo callback"); - super("UNDICI_REQUEST"); - } catch (err) { - if (util$12.isStream(body)) util$12.destroy(body.on("error", noop$4), err); - throw err; - } - this.method = method; - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.res = null; - this.abort = null; - this.body = body; - this.trailers = {}; - this.context = null; - this.onInfo = onInfo || null; - this.highWaterMark = highWaterMark; - this.reason = null; - this.removeAbortListener = null; - if (signal?.aborted) this.reason = signal.reason ?? new RequestAbortedError$3(); - else if (signal) this.removeAbortListener = util$12.addAbortListener(signal, () => { - this.reason = signal.reason ?? new RequestAbortedError$3(); - if (this.res) util$12.destroy(this.res.on("error", noop$4), this.reason); - else if (this.abort) this.abort(this.reason); - }); - } - onConnect(abort$1, context) { - if (this.reason) { - abort$1(this.reason); - return; - } - assert$17(this.callback); - this.abort = abort$1; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { - const { callback, opaque, abort: abort$1, context, responseHeaders, highWaterMark } = this; - const headers = responseHeaders === "raw" ? util$12.parseRawHeaders(rawHeaders) : util$12.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode, - headers - }); - return; - } - const parsedHeaders = responseHeaders === "raw" ? util$12.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - const contentLength = parsedHeaders["content-length"]; - const res = new Readable$3({ - resume: resume$1, - abort: abort$1, - contentType, - contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, - highWaterMark - }); - if (this.removeAbortListener) { - res.on("close", this.removeAbortListener); - this.removeAbortListener = null; - } - this.callback = null; - this.res = res; - if (callback !== null) this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }); - } - onData(chunk) { - return this.res.push(chunk); - } - onComplete(trailers) { - util$12.parseHeaders(trailers, this.trailers); - this.res.push(null); - } - onError(err) { - const { res, callback, body, opaque } = this; - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (res) { - this.res = null; - queueMicrotask(() => { - util$12.destroy(res.on("error", noop$4), err); - }); - } - if (body) { - this.body = null; - if (util$12.isStream(body)) { - body.on("error", noop$4); - util$12.destroy(body, err); - } - } - if (this.removeAbortListener) { - this.removeAbortListener(); - this.removeAbortListener = null; - } - } - }; - function request(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const handler = new RequestHandler(opts, callback); - this.dispatch(opts, handler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = request; - module.exports.RequestHandler = RequestHandler; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/abort-signal.js -var require_abort_signal = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { - const { addAbortListener: addAbortListener$1 } = require_util$5(); - const { RequestAbortedError: RequestAbortedError$2 } = require_errors(); - const kListener = Symbol("kListener"); - const kSignal = Symbol("kSignal"); - function abort(self) { - if (self.abort) self.abort(self[kSignal]?.reason); - else self.reason = self[kSignal]?.reason ?? new RequestAbortedError$2(); - removeSignal$4(self); - } - function addSignal$4(self, signal) { - self.reason = null; - self[kSignal] = null; - self[kListener] = null; - if (!signal) return; - if (signal.aborted) { - abort(self); - return; - } - self[kSignal] = signal; - self[kListener] = () => { - abort(self); - }; - addAbortListener$1(self[kSignal], self[kListener]); - } - function removeSignal$4(self) { - if (!self[kSignal]) return; - if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); - else self[kSignal].removeListener("abort", self[kListener]); - self[kSignal] = null; - self[kListener] = null; - } - module.exports = { - addSignal: addSignal$4, - removeSignal: removeSignal$4 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-stream.js -var require_api_stream = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { - const assert$16 = __require("node:assert"); - const { finished: finished$1 } = __require("node:stream"); - const { AsyncResource: AsyncResource$3 } = __require("node:async_hooks"); - const { InvalidArgumentError: InvalidArgumentError$14, InvalidReturnValueError: InvalidReturnValueError$1 } = require_errors(); - const util$11 = require_util$5(); - const { addSignal: addSignal$3, removeSignal: removeSignal$3 } = require_abort_signal(); - function noop$3() {} - var StreamHandler = class extends AsyncResource$3 { - constructor(opts, factory, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$14("invalid opts"); - const { signal, method, opaque, body, onInfo, responseHeaders } = opts; - try { - if (typeof callback !== "function") throw new InvalidArgumentError$14("invalid callback"); - if (typeof factory !== "function") throw new InvalidArgumentError$14("invalid factory"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$14("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$14("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$14("invalid onInfo callback"); - super("UNDICI_STREAM"); - } catch (err) { - if (util$11.isStream(body)) util$11.destroy(body.on("error", noop$3), err); - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.factory = factory; - this.callback = callback; - this.res = null; - this.abort = null; - this.context = null; - this.trailers = null; - this.body = body; - this.onInfo = onInfo || null; - if (util$11.isStream(body)) body.on("error", (err) => { - this.onError(err); - }); - addSignal$3(this, signal); - } - onConnect(abort$1, context) { - if (this.reason) { - abort$1(this.reason); - return; - } - assert$16(this.callback); - this.abort = abort$1; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { - const { factory, opaque, context, responseHeaders } = this; - const headers = responseHeaders === "raw" ? util$11.parseRawHeaders(rawHeaders) : util$11.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode, - headers - }); - return; - } - this.factory = null; - if (factory === null) return; - const res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }); - if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError$1("expected Writable"); - finished$1(res, { readable: false }, (err) => { - const { callback, res: res$1, opaque: opaque$1, trailers, abort: abort$1 } = this; - this.res = null; - if (err || !res$1.readable) util$11.destroy(res$1, err); - this.callback = null; - this.runInAsyncScope(callback, null, err || null, { - opaque: opaque$1, - trailers - }); - if (err) abort$1(); - }); - res.on("drain", resume$1); - this.res = res; - const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain; - return needDrain !== true; - } - onData(chunk) { - const { res } = this; - return res ? res.write(chunk) : true; - } - onComplete(trailers) { - const { res } = this; - removeSignal$3(this); - if (!res) return; - this.trailers = util$11.parseHeaders(trailers); - res.end(); - } - onError(err) { - const { res, callback, opaque, body } = this; - removeSignal$3(this); - this.factory = null; - if (res) { - this.res = null; - util$11.destroy(res, err); - } else if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (body) { - this.body = null; - util$11.destroy(body, err); - } - } - }; - function stream$1(opts, factory, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - stream$1.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const handler = new StreamHandler(opts, factory, callback); - this.dispatch(opts, handler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = stream$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-pipeline.js -var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { - const { Readable: Readable$2, Duplex, PassThrough } = __require("node:stream"); - const assert$15 = __require("node:assert"); - const { AsyncResource: AsyncResource$2 } = __require("node:async_hooks"); - const { InvalidArgumentError: InvalidArgumentError$13, InvalidReturnValueError, RequestAbortedError: RequestAbortedError$1 } = require_errors(); - const util$10 = require_util$5(); - const { addSignal: addSignal$2, removeSignal: removeSignal$2 } = require_abort_signal(); - function noop$2() {} - const kResume = Symbol("resume"); - var PipelineRequest = class extends Readable$2 { - constructor() { - super({ autoDestroy: true }); - this[kResume] = null; - } - _read() { - const { [kResume]: resume$1 } = this; - if (resume$1) { - this[kResume] = null; - resume$1(); - } - } - _destroy(err, callback) { - this._read(); - callback(err); - } - }; - var PipelineResponse = class extends Readable$2 { - constructor(resume$1) { - super({ autoDestroy: true }); - this[kResume] = resume$1; - } - _read() { - this[kResume](); - } - _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$1(); - callback(err); - } - }; - var PipelineHandler = class extends AsyncResource$2 { - constructor(opts, handler) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$13("invalid opts"); - if (typeof handler !== "function") throw new InvalidArgumentError$13("invalid handler"); - const { signal, method, opaque, onInfo, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$13("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$13("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$13("invalid onInfo callback"); - super("UNDICI_PIPELINE"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.handler = handler; - this.abort = null; - this.context = null; - this.onInfo = onInfo || null; - this.req = new PipelineRequest().on("error", noop$2); - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this; - if (body?.resume) body.resume(); - }, - write: (chunk, encoding, callback) => { - const { req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); - else req[kResume] = callback; - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort: abort$1 } = this; - if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError$1(); - if (abort$1 && err) abort$1(); - util$10.destroy(body, err); - util$10.destroy(req, err); - util$10.destroy(res, err); - removeSignal$2(this); - callback(err); - } - }).on("prefinish", () => { - const { req } = this; - req.push(null); - }); - this.res = null; - addSignal$2(this, signal); - } - onConnect(abort$1, context) { - const { res } = this; - if (this.reason) { - abort$1(this.reason); - return; - } - assert$15(!res, "pipeline cannot be retried"); - this.abort = abort$1; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$1) { - const { opaque, handler, context } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? util$10.parseRawHeaders(rawHeaders) : util$10.parseHeaders(rawHeaders); - this.onInfo({ - statusCode, - headers - }); - } - return; - } - this.res = new PipelineResponse(resume$1); - let body; - try { - this.handler = null; - const headers = this.responseHeaders === "raw" ? util$10.parseRawHeaders(rawHeaders) : util$10.parseHeaders(rawHeaders); - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }); - } catch (err) { - this.res.on("error", noop$2); - throw err; - } - if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); - body.on("data", (chunk) => { - const { ret, body: body$1 } = this; - if (!ret.push(chunk) && body$1.pause) body$1.pause(); - }).on("error", (err) => { - const { ret } = this; - util$10.destroy(ret, err); - }).on("end", () => { - const { ret } = this; - ret.push(null); - }).on("close", () => { - const { ret } = this; - if (!ret._readableState.ended) util$10.destroy(ret, new RequestAbortedError$1()); - }); - this.body = body; - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - res.push(null); - } - onError(err) { - const { ret } = this; - this.handler = null; - util$10.destroy(ret, err); - } - }; - function pipeline$2(opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler); - this.dispatch({ - ...opts, - body: pipelineHandler.req - }, pipelineHandler); - return pipelineHandler.ret; - } catch (err) { - return new PassThrough().destroy(err); - } - } - module.exports = pipeline$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-upgrade.js -var require_api_upgrade = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$12, SocketError: SocketError$1 } = require_errors(); - const { AsyncResource: AsyncResource$1 } = __require("node:async_hooks"); - const assert$14 = __require("node:assert"); - const util$9 = require_util$5(); - const { addSignal: addSignal$1, removeSignal: removeSignal$1 } = require_abort_signal(); - var UpgradeHandler = class extends AsyncResource$1 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$12("invalid opts"); - if (typeof callback !== "function") throw new InvalidArgumentError$12("invalid callback"); - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$12("signal must be an EventEmitter or EventTarget"); - super("UNDICI_UPGRADE"); - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.abort = null; - this.context = null; - addSignal$1(this, signal); - } - onConnect(abort$1, context) { - if (this.reason) { - abort$1(this.reason); - return; - } - assert$14(this.callback); - this.abort = abort$1; - this.context = null; - } - onHeaders() { - throw new SocketError$1("bad upgrade", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - assert$14(statusCode === 101); - const { callback, opaque, context } = this; - removeSignal$1(this); - this.callback = null; - const headers = this.responseHeaders === "raw" ? util$9.parseRawHeaders(rawHeaders) : util$9.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal$1(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function upgrade(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const upgradeHandler = new UpgradeHandler(opts, callback); - const upgradeOpts = { - ...opts, - method: opts.method || "GET", - upgrade: opts.protocol || "Websocket" - }; - this.dispatch(upgradeOpts, upgradeHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = upgrade; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-connect.js -var require_api_connect = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { - const assert$13 = __require("node:assert"); - const { AsyncResource } = __require("node:async_hooks"); - const { InvalidArgumentError: InvalidArgumentError$11, SocketError } = require_errors(); - const util$8 = require_util$5(); - const { addSignal, removeSignal } = require_abort_signal(); - var ConnectHandler = class extends AsyncResource { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$11("invalid opts"); - if (typeof callback !== "function") throw new InvalidArgumentError$11("invalid callback"); - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$11("signal must be an EventEmitter or EventTarget"); - super("UNDICI_CONNECT"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.callback = callback; - this.abort = null; - addSignal(this, signal); - } - onConnect(abort$1, context) { - if (this.reason) { - abort$1(this.reason); - return; - } - assert$13(this.callback); - this.abort = abort$1; - this.context = context; - } - onHeaders() { - throw new SocketError("bad connect", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this; - removeSignal(this); - this.callback = null; - let headers = rawHeaders; - if (headers != null) headers = this.responseHeaders === "raw" ? util$8.parseRawHeaders(rawHeaders) : util$8.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function connect(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const connectHandler = new ConnectHandler(opts, callback); - const connectOptions = { - ...opts, - method: "CONNECT" - }; - this.dispatch(connectOptions, connectHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = connect; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/index.js -var require_api = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/api/index.js"(exports, module) { - module.exports.request = require_api_request(); - module.exports.stream = require_api_stream(); - module.exports.pipeline = require_api_pipeline(); - module.exports.upgrade = require_api_upgrade(); - module.exports.connect = require_api_connect(); -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-errors.js -var require_mock_errors = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { - const { UndiciError: UndiciError$1 } = require_errors(); - /** - * The request does not match any registered mock dispatches. - */ - var MockNotMatchedError$1 = class extends UndiciError$1 { - constructor(message) { - super(message); - this.name = "MockNotMatchedError"; - this.message = message || "The request does not match any registered mock dispatches"; - this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; - } - }; - module.exports = { MockNotMatchedError: MockNotMatchedError$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-symbols.js -var require_mock_symbols = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { - module.exports = { - kAgent: Symbol("agent"), - kOptions: Symbol("options"), - kFactory: Symbol("factory"), - kDispatches: Symbol("dispatches"), - kDispatchKey: Symbol("dispatch key"), - kDefaultHeaders: Symbol("default headers"), - kDefaultTrailers: Symbol("default trailers"), - kContentLength: Symbol("content length"), - kMockAgent: Symbol("mock agent"), - kMockAgentSet: Symbol("mock agent set"), - kMockAgentGet: Symbol("mock agent get"), - kMockDispatch: Symbol("mock dispatch"), - kClose: Symbol("close"), - kOriginalClose: Symbol("original agent close"), - kOriginalDispatch: Symbol("original dispatch"), - kOrigin: Symbol("origin"), - kIsMockActive: Symbol("is mock active"), - kNetConnect: Symbol("net connect"), - kGetNetConnect: Symbol("get net connect"), - kConnected: Symbol("connected"), - kIgnoreTrailingSlash: Symbol("ignore trailing slash"), - kMockAgentMockCallHistoryInstance: Symbol("mock agent mock call history name"), - kMockAgentRegisterCallHistory: Symbol("mock agent register mock call history"), - kMockAgentAddCallHistoryLog: Symbol("mock agent add call history log"), - kMockAgentIsCallHistoryEnabled: Symbol("mock agent is call history enabled"), - kMockAgentAcceptsNonStandardSearchParameters: Symbol("mock agent accepts non standard search parameters"), - kMockCallHistoryAddLog: Symbol("mock call history add log") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-utils.js -var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { - const { MockNotMatchedError } = require_mock_errors(); - const { kDispatches: kDispatches$4, kMockAgent: kMockAgent$2, kOriginalDispatch: kOriginalDispatch$2, kOrigin: kOrigin$2, kGetNetConnect: kGetNetConnect$1 } = require_mock_symbols(); - const { serializePathWithQuery: serializePathWithQuery$1 } = require_util$5(); - const { STATUS_CODES: STATUS_CODES$1 } = __require("node:http"); - const { types: { isPromise } } = __require("node:util"); - const { InvalidArgumentError: InvalidArgumentError$10 } = require_errors(); - function matchValue$1(match, value) { - if (typeof match === "string") return match === value; - if (match instanceof RegExp) return match.test(value); - if (typeof match === "function") return match(value) === true; - return false; - } - function lowerCaseEntries(headers) { - return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue]; - })); - } - /** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ - function getHeaderByName(headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; - return void 0; - } else if (typeof headers.get === "function") return headers.get(key); - else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; - } - /** @param {string[]} headers */ - function buildHeadersFromArray(headers) { - const clone = headers.slice(); - const entries = []; - for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); - return Object.fromEntries(entries); - } - function matchHeaders(mockDispatch$1, headers) { - if (typeof mockDispatch$1.headers === "function") { - if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); - return mockDispatch$1.headers(headers ? lowerCaseEntries(headers) : {}); - } - if (typeof mockDispatch$1.headers === "undefined") return true; - if (typeof headers !== "object" || typeof mockDispatch$1.headers !== "object") return false; - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch$1.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName); - if (!matchValue$1(matchHeaderValue, headerValue)) return false; - } - return true; - } - function normalizeSearchParams$1(query) { - if (typeof query !== "string") return query; - const originalQp = new URLSearchParams(query); - const normalizedQp = new URLSearchParams(); - for (let [key, value] of originalQp.entries()) { - key = key.replace("[]", ""); - const valueRepresentsString = /^(['"]).*\1$/.test(value); - if (valueRepresentsString) { - normalizedQp.append(key, value); - continue; - } - if (value.includes(",")) { - const values = value.split(","); - for (const v of values) normalizedQp.append(key, v); - continue; - } - normalizedQp.append(key, value); - } - return normalizedQp; - } - function safeUrl(path$3) { - if (typeof path$3 !== "string") return path$3; - const pathSegments = path$3.split("?", 3); - if (pathSegments.length !== 2) return path$3; - const qp = new URLSearchParams(pathSegments.pop()); - qp.sort(); - return [...pathSegments, qp.toString()].join("?"); - } - function matchKey(mockDispatch$1, { path: path$3, method, body, headers }) { - const pathMatch = matchValue$1(mockDispatch$1.path, path$3); - const methodMatch = matchValue$1(mockDispatch$1.method, method); - const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true; - const headersMatch = matchHeaders(mockDispatch$1, headers); - return pathMatch && methodMatch && bodyMatch && headersMatch; - } - function getResponseData$1(data) { - if (Buffer.isBuffer(data)) return data; - else if (data instanceof Uint8Array) return data; - else if (data instanceof ArrayBuffer) return data; - else if (typeof data === "object") return JSON.stringify(data); - else if (data) return data.toString(); - else return ""; - } - function getMockDispatch(mockDispatches, key) { - const basePath = key.query ? serializePathWithQuery$1(key.path, key.query) : key.path; - const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath); - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$3, ignoreTrailingSlash }) => { - return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$3)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$3), resolvedPath); - }); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method)); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue$1(body, key.body) : true); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch$1) => matchHeaders(mockDispatch$1, key.headers)); - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers; - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`); - } - return matchedMockDispatches[0]; - } - function addMockDispatch$1(mockDispatches, key, data, opts) { - const baseData = { - timesInvoked: 0, - times: 1, - persist: false, - consumed: false, - ...opts - }; - const replyData = typeof data === "function" ? { callback: data } : { ...data }; - const newMockDispatch = { - ...baseData, - ...key, - pending: true, - data: { - error: null, - ...replyData - } - }; - mockDispatches.push(newMockDispatch); - return newMockDispatch; - } - function deleteMockDispatch(mockDispatches, key) { - const index = mockDispatches.findIndex((dispatch) => { - if (!dispatch.consumed) return false; - return matchKey(dispatch, key); - }); - if (index !== -1) mockDispatches.splice(index, 1); - } - /** - * @param {string} path Path to remove trailing slash from - */ - function removeTrailingSlash(path$3) { - while (path$3.endsWith("/")) path$3 = path$3.slice(0, -1); - if (path$3.length === 0) path$3 = "/"; - return path$3; - } - function buildKey$1(opts) { - const { path: path$3, method, body, headers, query } = opts; - return { - path: path$3, - method, - body, - headers, - query - }; - } - function generateKeyValues(data) { - const keys = Object.keys(data); - const result = []; - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - const value = data[key]; - const name = Buffer.from(`${key}`); - if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); - else result.push(name, Buffer.from(`${value}`)); - } - return result; - } - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ - function getStatusText(statusCode) { - return STATUS_CODES$1[statusCode] || "unknown"; - } - async function getResponse(body) { - const buffers = []; - for await (const data of body) buffers.push(data); - return Buffer.concat(buffers).toString("utf8"); - } - /** - * Mock dispatch function used to simulate undici dispatches - */ - function mockDispatch(opts, handler) { - const key = buildKey$1(opts); - const mockDispatch$1 = getMockDispatch(this[kDispatches$4], key); - mockDispatch$1.timesInvoked++; - if (mockDispatch$1.data.callback) mockDispatch$1.data = { - ...mockDispatch$1.data, - ...mockDispatch$1.data.callback(opts) - }; - const { data: { statusCode, data, headers, trailers, error }, delay: delay$2, persist } = mockDispatch$1; - const { timesInvoked, times } = mockDispatch$1; - mockDispatch$1.consumed = !persist && timesInvoked >= times; - mockDispatch$1.pending = timesInvoked < times; - if (error !== null) { - deleteMockDispatch(this[kDispatches$4], key); - handler.onError(error); - return true; - } - if (typeof delay$2 === "number" && delay$2 > 0) setTimeout(() => { - handleReply(this[kDispatches$4]); - }, delay$2); - else handleReply(this[kDispatches$4]); - function handleReply(mockDispatches, _data = data) { - const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; - const body = typeof _data === "function" ? _data({ - ...opts, - headers: optsHeaders - }) : _data; - if (isPromise(body)) { - body.then((newData) => handleReply(mockDispatches, newData)); - return; - } - const responseData = getResponseData$1(body); - const responseHeaders = generateKeyValues(headers); - const responseTrailers = generateKeyValues(trailers); - handler.onConnect?.((err) => handler.onError(err), null); - handler.onHeaders?.(statusCode, responseHeaders, resume$1, getStatusText(statusCode)); - handler.onData?.(Buffer.from(responseData)); - handler.onComplete?.(responseTrailers); - deleteMockDispatch(mockDispatches, key); - } - function resume$1() {} - return true; - } - function buildMockDispatch$2() { - const agent = this[kMockAgent$2]; - const origin = this[kOrigin$2]; - const originalDispatch = this[kOriginalDispatch$2]; - return function dispatch(opts, handler) { - if (agent.isMockActive) try { - mockDispatch.call(this, opts, handler); - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect$1](); - if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); - if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); - else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); - } else throw error; - } - else originalDispatch.call(this, opts, handler); - }; - } - function checkNetConnect(netConnect, origin) { - const url = new URL(origin); - if (netConnect === true) return true; - else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue$1(matcher, url.host))) return true; - return false; - } - function buildAndValidateMockOptions$1(opts) { - if (opts) { - const { agent,...mockOptions } = opts; - if ("enableCallHistory" in mockOptions && typeof mockOptions.enableCallHistory !== "boolean") throw new InvalidArgumentError$10("options.enableCallHistory must to be a boolean"); - if ("acceptNonStandardSearchParameters" in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== "boolean") throw new InvalidArgumentError$10("options.acceptNonStandardSearchParameters must to be a boolean"); - return mockOptions; - } - } - module.exports = { - getResponseData: getResponseData$1, - getMockDispatch, - addMockDispatch: addMockDispatch$1, - deleteMockDispatch, - buildKey: buildKey$1, - generateKeyValues, - matchValue: matchValue$1, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch: buildMockDispatch$2, - checkNetConnect, - buildAndValidateMockOptions: buildAndValidateMockOptions$1, - getHeaderByName, - buildHeadersFromArray, - normalizeSearchParams: normalizeSearchParams$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-interceptor.js -var require_mock_interceptor = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { - const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); - const { kDispatches: kDispatches$3, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch, kIgnoreTrailingSlash: kIgnoreTrailingSlash$2 } = require_mock_symbols(); - const { InvalidArgumentError: InvalidArgumentError$9 } = require_errors(); - const { serializePathWithQuery } = require_util$5(); - /** - * Defines the scope API for an interceptor reply - */ - var MockScope = class { - constructor(mockDispatch$1) { - this[kMockDispatch] = mockDispatch$1; - } - /** - * Delay a reply by a set amount in ms. - */ - delay(waitInMs) { - if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError$9("waitInMs must be a valid integer > 0"); - this[kMockDispatch].delay = waitInMs; - return this; - } - /** - * For a defined reply, never mark as consumed. - */ - persist() { - this[kMockDispatch].persist = true; - return this; - } - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times(repeatTimes) { - if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError$9("repeatTimes must be a valid integer > 0"); - this[kMockDispatch].times = repeatTimes; - return this; - } - }; - /** - * Defines an interceptor for a Mock - */ - var MockInterceptor$2 = class { - constructor(opts, mockDispatches) { - if (typeof opts !== "object") throw new InvalidArgumentError$9("opts must be an object"); - if (typeof opts.path === "undefined") throw new InvalidArgumentError$9("opts.path must be defined"); - if (typeof opts.method === "undefined") opts.method = "GET"; - if (typeof opts.path === "string") if (opts.query) opts.path = serializePathWithQuery(opts.path, opts.query); - else { - const parsedURL = new URL(opts.path, "data://"); - opts.path = parsedURL.pathname + parsedURL.search; - } - if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); - this[kDispatchKey] = buildKey(opts); - this[kDispatches$3] = mockDispatches; - this[kIgnoreTrailingSlash$2] = opts.ignoreTrailingSlash ?? false; - this[kDefaultHeaders] = {}; - this[kDefaultTrailers] = {}; - this[kContentLength] = false; - } - createMockScopeDispatchData({ statusCode, data, responseOptions }) { - const responseData = getResponseData(data); - const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; - const headers = { - ...this[kDefaultHeaders], - ...contentLength, - ...responseOptions.headers - }; - const trailers = { - ...this[kDefaultTrailers], - ...responseOptions.trailers - }; - return { - statusCode, - data, - headers, - trailers - }; - } - validateReplyParameters(replyParameters) { - if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError$9("statusCode must be defined"); - if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError$9("responseOptions must be an object"); - } - /** - * Mock an undici request with a defined reply. - */ - reply(replyOptionsCallbackOrStatusCode) { - if (typeof replyOptionsCallbackOrStatusCode === "function") { - const wrappedDefaultsCallback = (opts) => { - const resolvedData = replyOptionsCallbackOrStatusCode(opts); - if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError$9("reply options callback must return an object"); - const replyParameters$1 = { - data: "", - responseOptions: {}, - ...resolvedData - }; - this.validateReplyParameters(replyParameters$1); - return { ...this.createMockScopeDispatchData(replyParameters$1) }; - }; - const newMockDispatch$1 = addMockDispatch(this[kDispatches$3], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash$2] }); - return new MockScope(newMockDispatch$1); - } - const replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === void 0 ? "" : arguments[1], - responseOptions: arguments[2] === void 0 ? {} : arguments[2] - }; - this.validateReplyParameters(replyParameters); - const dispatchData = this.createMockScopeDispatchData(replyParameters); - const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash$2] }); - return new MockScope(newMockDispatch); - } - /** - * Mock an undici request with a defined error. - */ - replyWithError(error) { - if (typeof error === "undefined") throw new InvalidArgumentError$9("error must be defined"); - const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash$2] }); - return new MockScope(newMockDispatch); - } - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders(headers) { - if (typeof headers === "undefined") throw new InvalidArgumentError$9("headers must be defined"); - this[kDefaultHeaders] = headers; - return this; - } - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers(trailers) { - if (typeof trailers === "undefined") throw new InvalidArgumentError$9("trailers must be defined"); - this[kDefaultTrailers] = trailers; - return this; - } - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength() { - this[kContentLength] = true; - return this; - } - }; - module.exports.MockInterceptor = MockInterceptor$2; - module.exports.MockScope = MockScope; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-client.js -var require_mock_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { - const { promisify: promisify$1 } = __require("node:util"); - const Client$1 = require_client(); - const { buildMockDispatch: buildMockDispatch$1 } = require_mock_utils(); - const { kDispatches: kDispatches$2, kMockAgent: kMockAgent$1, kClose: kClose$1, kOriginalClose: kOriginalClose$1, kOrigin: kOrigin$1, kOriginalDispatch: kOriginalDispatch$1, kConnected: kConnected$2, kIgnoreTrailingSlash: kIgnoreTrailingSlash$1 } = require_mock_symbols(); - const { MockInterceptor: MockInterceptor$1 } = require_mock_interceptor(); - const Symbols$1 = require_symbols(); - const { InvalidArgumentError: InvalidArgumentError$8 } = require_errors(); - /** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ - var MockClient$2 = class extends Client$1 { - constructor(origin, opts) { - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$8("Argument opts.agent must implement Agent"); - super(origin, opts); - this[kMockAgent$1] = opts.agent; - this[kOrigin$1] = origin; - this[kIgnoreTrailingSlash$1] = opts.ignoreTrailingSlash ?? false; - this[kDispatches$2] = []; - this[kConnected$2] = 1; - this[kOriginalDispatch$1] = this.dispatch; - this[kOriginalClose$1] = this.close.bind(this); - this.dispatch = buildMockDispatch$1.call(this); - this.close = this[kClose$1]; - } - get [Symbols$1.kConnected]() { - return this[kConnected$2]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept(opts) { - return new MockInterceptor$1(opts && { - ignoreTrailingSlash: this[kIgnoreTrailingSlash$1], - ...opts - }, this[kDispatches$2]); - } - async [kClose$1]() { - await promisify$1(this[kOriginalClose$1])(); - this[kConnected$2] = 0; - this[kMockAgent$1][Symbols$1.kClients].delete(this[kOrigin$1]); - } - }; - module.exports = MockClient$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-call-history.js -var require_mock_call_history = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-call-history.js"(exports, module) { - const { kMockCallHistoryAddLog: kMockCallHistoryAddLog$1 } = require_mock_symbols(); - const { InvalidArgumentError: InvalidArgumentError$7 } = require_errors(); - function handleFilterCallsWithOptions(criteria, options, handler, store) { - switch (options.operator) { - case "OR": - store.push(...handler(criteria)); - return store; - case "AND": return handler.call({ logs: store }, criteria); - default: throw new InvalidArgumentError$7("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); - } - } - function buildAndValidateFilterCallsOptions(options = {}) { - const finalOptions = {}; - if ("operator" in options) { - if (typeof options.operator !== "string" || options.operator.toUpperCase() !== "OR" && options.operator.toUpperCase() !== "AND") throw new InvalidArgumentError$7("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); - return { - ...finalOptions, - operator: options.operator.toUpperCase() - }; - } - return finalOptions; - } - function makeFilterCalls(parameterName) { - return (parameterValue) => { - if (typeof parameterValue === "string" || parameterValue == null) return this.logs.filter((log) => { - return log[parameterName] === parameterValue; - }); - if (parameterValue instanceof RegExp) return this.logs.filter((log) => { - return parameterValue.test(log[parameterName]); - }); - throw new InvalidArgumentError$7(`${parameterName} parameter should be one of string, regexp, undefined or null`); - }; - } - function computeUrlWithMaybeSearchParameters(requestInit) { - try { - const url = new URL(requestInit.path, requestInit.origin); - if (url.search.length !== 0) return url; - url.search = new URLSearchParams(requestInit.query).toString(); - return url; - } catch (error) { - throw new InvalidArgumentError$7("An error occurred when computing MockCallHistoryLog.url", { cause: error }); - } - } - var MockCallHistoryLog$1 = class { - constructor(requestInit = {}) { - this.body = requestInit.body; - this.headers = requestInit.headers; - this.method = requestInit.method; - const url = computeUrlWithMaybeSearchParameters(requestInit); - this.fullUrl = url.toString(); - this.origin = url.origin; - this.path = url.pathname; - this.searchParams = Object.fromEntries(url.searchParams); - this.protocol = url.protocol; - this.host = url.host; - this.port = url.port; - this.hash = url.hash; - } - toMap() { - return new Map([ - ["protocol", this.protocol], - ["host", this.host], - ["port", this.port], - ["origin", this.origin], - ["path", this.path], - ["hash", this.hash], - ["searchParams", this.searchParams], - ["fullUrl", this.fullUrl], - ["method", this.method], - ["body", this.body], - ["headers", this.headers] - ]); - } - toString() { - const options = { - betweenKeyValueSeparator: "->", - betweenPairSeparator: "|" - }; - let result = ""; - this.toMap().forEach((value, key) => { - if (typeof value === "string" || value === void 0 || value === null) result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}`; - if (typeof value === "object" && value !== null || Array.isArray(value)) result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}`; - }); - return result.slice(0, -1); - } - }; - var MockCallHistory$2 = class { - logs = []; - calls() { - return this.logs; - } - firstCall() { - return this.logs.at(0); - } - lastCall() { - return this.logs.at(-1); - } - nthCall(number) { - if (typeof number !== "number") throw new InvalidArgumentError$7("nthCall must be called with a number"); - if (!Number.isInteger(number)) throw new InvalidArgumentError$7("nthCall must be called with an integer"); - if (Math.sign(number) !== 1) throw new InvalidArgumentError$7("nthCall must be called with a positive value. use firstCall or lastCall instead"); - return this.logs.at(number - 1); - } - filterCalls(criteria, options) { - if (this.logs.length === 0) return this.logs; - if (typeof criteria === "function") return this.logs.filter(criteria); - if (criteria instanceof RegExp) return this.logs.filter((log) => { - return criteria.test(log.toString()); - }); - if (typeof criteria === "object" && criteria !== null) { - if (Object.keys(criteria).length === 0) return this.logs; - const finalOptions = { - operator: "OR", - ...buildAndValidateFilterCallsOptions(options) - }; - let maybeDuplicatedLogsFiltered = []; - if ("protocol" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered); - if ("host" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered); - if ("port" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered); - if ("origin" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered); - if ("path" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered); - if ("hash" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered); - if ("fullUrl" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered); - if ("method" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered); - const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)]; - return uniqLogsFiltered; - } - throw new InvalidArgumentError$7("criteria parameter should be one of function, regexp, or object"); - } - filterCallsByProtocol = makeFilterCalls.call(this, "protocol"); - filterCallsByHost = makeFilterCalls.call(this, "host"); - filterCallsByPort = makeFilterCalls.call(this, "port"); - filterCallsByOrigin = makeFilterCalls.call(this, "origin"); - filterCallsByPath = makeFilterCalls.call(this, "path"); - filterCallsByHash = makeFilterCalls.call(this, "hash"); - filterCallsByFullUrl = makeFilterCalls.call(this, "fullUrl"); - filterCallsByMethod = makeFilterCalls.call(this, "method"); - clear() { - this.logs = []; - } - [kMockCallHistoryAddLog$1](requestInit) { - const log = new MockCallHistoryLog$1(requestInit); - this.logs.push(log); - return log; - } - *[Symbol.iterator]() { - for (const log of this.calls()) yield log; - } - }; - module.exports.MockCallHistory = MockCallHistory$2; - module.exports.MockCallHistoryLog = MockCallHistoryLog$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-pool.js -var require_mock_pool = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { - const { promisify } = __require("node:util"); - const Pool$1 = require_pool(); - const { buildMockDispatch } = require_mock_utils(); - const { kDispatches: kDispatches$1, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected: kConnected$1, kIgnoreTrailingSlash } = require_mock_symbols(); - const { MockInterceptor } = require_mock_interceptor(); - const Symbols = require_symbols(); - const { InvalidArgumentError: InvalidArgumentError$6 } = require_errors(); - /** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ - var MockPool$2 = class extends Pool$1 { - constructor(origin, opts) { - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$6("Argument opts.agent must implement Agent"); - super(origin, opts); - this[kMockAgent] = opts.agent; - this[kOrigin] = origin; - this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; - this[kDispatches$1] = []; - this[kConnected$1] = 1; - this[kOriginalDispatch] = this.dispatch; - this[kOriginalClose] = this.close.bind(this); - this.dispatch = buildMockDispatch.call(this); - this.close = this[kClose]; - } - get [Symbols.kConnected]() { - return this[kConnected$1]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept(opts) { - return new MockInterceptor(opts && { - ignoreTrailingSlash: this[kIgnoreTrailingSlash], - ...opts - }, this[kDispatches$1]); - } - async [kClose]() { - await promisify(this[kOriginalClose])(); - this[kConnected$1] = 0; - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); - } - }; - module.exports = MockPool$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js -var require_pending_interceptors_formatter = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { - const { Transform: Transform$1 } = __require("node:stream"); - const { Console } = __require("node:console"); - const PERSISTENT = process.versions.icu ? "✅" : "Y "; - const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; - /** - * Gets the output of `console.table(…)` as a string. - */ - module.exports = class PendingInterceptorsFormatter$1 { - constructor({ disableColors } = {}) { - this.transform = new Transform$1({ transform(chunk, _enc, cb) { - cb(null, chunk); - } }); - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { colors: !disableColors && !process.env.CI } - }); - } - format(pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$3, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path$3, - "Status code": statusCode, - Persistent: persist ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })); - this.logger.table(withPrettyHeaders); - return this.transform.read().toString(); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-agent.js -var require_mock_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { - const { kClients } = require_symbols(); - const Agent$2 = require_agent(); - const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory, kMockAgentRegisterCallHistory, kMockAgentIsCallHistoryEnabled, kMockAgentAddCallHistoryLog, kMockAgentMockCallHistoryInstance, kMockAgentAcceptsNonStandardSearchParameters, kMockCallHistoryAddLog } = require_mock_symbols(); - const MockClient$1 = require_mock_client(); - const MockPool$1 = require_mock_pool(); - const { matchValue, normalizeSearchParams, buildAndValidateMockOptions } = require_mock_utils(); - const { InvalidArgumentError: InvalidArgumentError$5, UndiciError } = require_errors(); - const Dispatcher$1 = require_dispatcher(); - const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); - const { MockCallHistory: MockCallHistory$1 } = require_mock_call_history(); - var MockAgent$1 = class extends Dispatcher$1 { - constructor(opts) { - super(opts); - const mockOptions = buildAndValidateMockOptions(opts); - this[kNetConnect] = true; - this[kIsMockActive] = true; - this[kMockAgentIsCallHistoryEnabled] = mockOptions?.enableCallHistory ?? false; - this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions?.acceptNonStandardSearchParameters ?? false; - if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$5("Argument opts.agent must implement Agent"); - const agent = opts?.agent ? opts.agent : new Agent$2(opts); - this[kAgent] = agent; - this[kClients] = agent[kClients]; - this[kOptions] = mockOptions; - if (this[kMockAgentIsCallHistoryEnabled]) this[kMockAgentRegisterCallHistory](); - } - get(origin) { - let dispatcher = this[kMockAgentGet](origin); - if (!dispatcher) { - dispatcher = this[kFactory](origin); - this[kMockAgentSet](origin, dispatcher); - } - return dispatcher; - } - dispatch(opts, handler) { - this.get(opts.origin); - this[kMockAgentAddCallHistoryLog](opts); - const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters]; - const dispatchOpts = { ...opts }; - if (acceptNonStandardSearchParameters && dispatchOpts.path) { - const [path$3, searchParams] = dispatchOpts.path.split("?"); - const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters); - dispatchOpts.path = `${path$3}?${normalizedSearchParams}`; - } - return this[kAgent].dispatch(dispatchOpts, handler); - } - async close() { - this.clearCallHistory(); - await this[kAgent].close(); - this[kClients].clear(); - } - deactivate() { - this[kIsMockActive] = false; - } - activate() { - this[kIsMockActive] = true; - } - enableNetConnect(matcher) { - if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); - else this[kNetConnect] = [matcher]; - else if (typeof matcher === "undefined") this[kNetConnect] = true; - else throw new InvalidArgumentError$5("Unsupported matcher. Must be one of String|Function|RegExp."); - } - disableNetConnect() { - this[kNetConnect] = false; - } - enableCallHistory() { - this[kMockAgentIsCallHistoryEnabled] = true; - return this; - } - disableCallHistory() { - this[kMockAgentIsCallHistoryEnabled] = false; - return this; - } - getCallHistory() { - return this[kMockAgentMockCallHistoryInstance]; - } - clearCallHistory() { - if (this[kMockAgentMockCallHistoryInstance] !== void 0) this[kMockAgentMockCallHistoryInstance].clear(); - } - get isMockActive() { - return this[kIsMockActive]; - } - [kMockAgentRegisterCallHistory]() { - if (this[kMockAgentMockCallHistoryInstance] === void 0) this[kMockAgentMockCallHistoryInstance] = new MockCallHistory$1(); - } - [kMockAgentAddCallHistoryLog](opts) { - if (this[kMockAgentIsCallHistoryEnabled]) { - this[kMockAgentRegisterCallHistory](); - this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts); - } - } - [kMockAgentSet](origin, dispatcher) { - this[kClients].set(origin, dispatcher); - } - [kFactory](origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]); - return this[kOptions] && this[kOptions].connections === 1 ? new MockClient$1(origin, mockOptions) : new MockPool$1(origin, mockOptions); - } - [kMockAgentGet](origin) { - const client = this[kClients].get(origin); - if (client) return client; - if (typeof origin !== "string") { - const dispatcher = this[kFactory]("http://localhost:9999"); - this[kMockAgentSet](origin, dispatcher); - return dispatcher; - } - for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin); - this[kMockAgentSet](origin, dispatcher); - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; - return dispatcher; - } - } - [kGetNetConnect]() { - return this[kNetConnect]; - } - pendingInterceptors() { - const mockAgentClients = this[kClients]; - return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope[kDispatches].map((dispatch) => ({ - ...dispatch, - origin - }))).filter(({ pending }) => pending); - } - assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors(); - if (pending.length === 0) return; - throw new UndiciError(pending.length === 1 ? `1 interceptor is pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim() : `${pending.length} interceptors are pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim()); - } - }; - module.exports = MockAgent$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/global.js -var require_global = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/global.js"(exports, module) { - const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); - const { InvalidArgumentError: InvalidArgumentError$4 } = require_errors(); - const Agent$1 = require_agent(); - if (getGlobalDispatcher$3() === void 0) setGlobalDispatcher$1(new Agent$1()); - function setGlobalDispatcher$1(agent) { - if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError$4("Argument agent must implement Agent"); - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }); - } - function getGlobalDispatcher$3() { - return globalThis[globalDispatcher]; - } - module.exports = { - setGlobalDispatcher: setGlobalDispatcher$1, - getGlobalDispatcher: getGlobalDispatcher$3 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/decorator-handler.js -var require_decorator_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/decorator-handler.js"(exports, module) { - const assert$12 = __require("node:assert"); - const WrapHandler = require_wrap_handler(); - /** - * @deprecated - */ - module.exports = class DecoratorHandler$4 { - #handler; - #onCompleteCalled = false; - #onErrorCalled = false; - #onResponseStartCalled = false; - constructor(handler) { - if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); - this.#handler = WrapHandler.wrap(handler); - } - onRequestStart(...args) { - this.#handler.onRequestStart?.(...args); - } - onRequestUpgrade(...args) { - assert$12(!this.#onCompleteCalled); - assert$12(!this.#onErrorCalled); - return this.#handler.onRequestUpgrade?.(...args); - } - onResponseStart(...args) { - assert$12(!this.#onCompleteCalled); - assert$12(!this.#onErrorCalled); - assert$12(!this.#onResponseStartCalled); - this.#onResponseStartCalled = true; - return this.#handler.onResponseStart?.(...args); - } - onResponseData(...args) { - assert$12(!this.#onCompleteCalled); - assert$12(!this.#onErrorCalled); - return this.#handler.onResponseData?.(...args); - } - onResponseEnd(...args) { - assert$12(!this.#onCompleteCalled); - assert$12(!this.#onErrorCalled); - this.#onCompleteCalled = true; - return this.#handler.onResponseEnd?.(...args); - } - onResponseError(...args) { - this.#onErrorCalled = true; - return this.#handler.onResponseError?.(...args); - } - /** - * @deprecated - */ - onBodySent() {} - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/redirect-handler.js -var require_redirect_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/redirect-handler.js"(exports, module) { - const util$7 = require_util$5(); - const { kBodyUsed } = require_symbols(); - const assert$11 = __require("node:assert"); - const { InvalidArgumentError: InvalidArgumentError$3 } = require_errors(); - const EE$1 = __require("node:events"); - const redirectableStatusCodes = [ - 300, - 301, - 302, - 303, - 307, - 308 - ]; - const kBody = Symbol("body"); - const noop$1 = () => {}; - var BodyAsyncIterable = class { - constructor(body) { - this[kBody] = body; - this[kBodyUsed] = false; - } - async *[Symbol.asyncIterator]() { - assert$11(!this[kBodyUsed], "disturbed"); - this[kBodyUsed] = true; - yield* this[kBody]; - } - }; - var RedirectHandler$2 = class RedirectHandler$2 { - static buildDispatch(dispatcher, maxRedirections) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$3("maxRedirections must be a positive number"); - const dispatch = dispatcher.dispatch.bind(dispatcher); - return (opts, originalHandler) => dispatch(opts, new RedirectHandler$2(dispatch, maxRedirections, opts, originalHandler)); - } - constructor(dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$3("maxRedirections must be a positive number"); - this.dispatch = dispatch; - this.location = null; - this.opts = { - ...opts, - maxRedirections: 0 - }; - this.maxRedirections = maxRedirections; - this.handler = handler; - this.history = []; - if (util$7.isStream(this.opts.body)) { - if (util$7.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { - assert$11(false); - }); - if (typeof this.opts.body.readableDidRead !== "boolean") { - this.opts.body[kBodyUsed] = false; - EE$1.prototype.on.call(this.opts.body, "data", function() { - this[kBodyUsed] = true; - }); - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); - else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util$7.isIterable(this.opts.body) && !util$7.isFormDataLike(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); - } - onRequestStart(controller, context) { - this.handler.onRequestStart?.(controller, { - ...context, - history: this.history - }); - } - onRequestUpgrade(controller, statusCode, headers, socket) { - this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); - } - onResponseStart(controller, statusCode, headers, statusMessage) { - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) throw new Error("max redirects"); - if ((statusCode === 301 || statusCode === 302) && this.opts.method === "POST") { - this.opts.method = "GET"; - if (util$7.isStream(this.opts.body)) util$7.destroy(this.opts.body.on("error", noop$1)); - this.opts.body = null; - } - if (statusCode === 303 && this.opts.method !== "HEAD") { - this.opts.method = "GET"; - if (util$7.isStream(this.opts.body)) util$7.destroy(this.opts.body.on("error", noop$1)); - this.opts.body = null; - } - this.location = this.history.length >= this.maxRedirections || util$7.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 ? null : headers.location; - if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); - if (!this.location) { - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); - return; - } - const { origin, pathname, search } = util$7.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path$3 = search ? `${pathname}${search}` : pathname; - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path$3; - this.opts.origin = origin; - this.opts.maxRedirections = 0; - this.opts.query = null; - } - onResponseData(controller, chunk) { - if (this.location) {} else this.handler.onResponseData?.(controller, chunk); - } - onResponseEnd(controller, trailers) { - if (this.location) this.dispatch(this.opts, this); - else this.handler.onResponseEnd(controller, trailers); - } - onResponseError(controller, error) { - this.handler.onResponseError?.(controller, error); - } - }; - function shouldRemoveHeader(header, removeContent, unknownOrigin) { - if (header.length === 4) return util$7.headerNameToString(header) === "host"; - if (removeContent && util$7.headerNameToString(header).startsWith("content-")) return true; - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util$7.headerNameToString(header); - return name === "authorization" || name === "cookie" || name === "proxy-authorization"; - } - return false; - } - function cleanRequestHeaders(headers, removeContent, unknownOrigin) { - const ret = []; - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); - } else if (headers && typeof headers === "object") { - const entries = typeof headers[Symbol.iterator] === "function" ? headers : Object.entries(headers); - for (const [key, value] of entries) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, value); - } else assert$11(headers == null, "headers must be an object or an array"); - return ret; - } - module.exports = RedirectHandler$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/redirect.js -var require_redirect = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/redirect.js"(exports, module) { - const RedirectHandler$1 = require_redirect_handler(); - function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections } = {}) { - return (dispatch) => { - return function Intercept(opts, handler) { - const { maxRedirections = defaultMaxRedirections,...rest } = opts; - if (maxRedirections == null || maxRedirections === 0) return dispatch(opts, handler); - const dispatchOpts = { - ...rest, - maxRedirections: 0 - }; - const redirectHandler = new RedirectHandler$1(dispatch, maxRedirections, dispatchOpts, handler); - return dispatch(dispatchOpts, redirectHandler); - }; - }; - } - module.exports = createRedirectInterceptor; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/response-error.js -var require_response_error = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/response-error.js"(exports, module) { - const DecoratorHandler$3 = require_decorator_handler(); - const { ResponseError } = require_errors(); - var ResponseErrorHandler = class extends DecoratorHandler$3 { - #statusCode; - #contentType; - #decoder; - #headers; - #body; - constructor(_opts, { handler }) { - super(handler); - } - #checkContentType(contentType) { - return (this.#contentType ?? "").indexOf(contentType) === 0; - } - onRequestStart(controller, context) { - this.#statusCode = 0; - this.#contentType = null; - this.#decoder = null; - this.#headers = null; - this.#body = ""; - return super.onRequestStart(controller, context); - } - onResponseStart(controller, statusCode, headers, statusMessage) { - this.#statusCode = statusCode; - this.#headers = headers; - this.#contentType = headers["content-type"]; - if (this.#statusCode < 400) return super.onResponseStart(controller, statusCode, headers, statusMessage); - if (this.#checkContentType("application/json") || this.#checkContentType("text/plain")) this.#decoder = new TextDecoder("utf-8"); - } - onResponseData(controller, chunk) { - if (this.#statusCode < 400) return super.onResponseData(controller, chunk); - this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ""; - } - onResponseEnd(controller, trailers) { - if (this.#statusCode >= 400) { - this.#body += this.#decoder?.decode(void 0, { stream: false }) ?? ""; - if (this.#checkContentType("application/json")) try { - this.#body = JSON.parse(this.#body); - } catch {} - let err; - const stackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - try { - err = new ResponseError("Response Error", this.#statusCode, { - body: this.#body, - headers: this.#headers - }); - } finally { - Error.stackTraceLimit = stackTraceLimit; - } - super.onResponseError(controller, err); - } else super.onResponseEnd(controller, trailers); - } - onResponseError(controller, err) { - super.onResponseError(controller, err); - } - }; - module.exports = () => { - return (dispatch) => { - return function Intercept(opts, handler) { - return dispatch(opts, new ResponseErrorHandler(opts, { handler })); - }; - }; - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/retry.js -var require_retry = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/retry.js"(exports, module) { - const RetryHandler$1 = require_retry_handler(); - module.exports = (globalOpts) => { - return (dispatch) => { - return function retryInterceptor(opts, handler) { - return dispatch(opts, new RetryHandler$1({ - ...opts, - retryOptions: { - ...globalOpts, - ...opts.retryOptions - } - }, { - handler, - dispatch - })); - }; - }; - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/dump.js -var require_dump = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/dump.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$2, RequestAbortedError } = require_errors(); - const DecoratorHandler$2 = require_decorator_handler(); - var DumpHandler = class extends DecoratorHandler$2 { - #maxSize = 1024 * 1024; - #dumped = false; - #size = 0; - #controller = null; - aborted = false; - reason = false; - constructor({ maxSize, signal }, handler) { - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError$2("maxSize must be a number greater than 0"); - super(handler); - this.#maxSize = maxSize ?? this.#maxSize; - } - #abort(reason) { - this.aborted = true; - this.reason = reason; - } - onRequestStart(controller, context) { - controller.abort = this.#abort.bind(this); - this.#controller = controller; - return super.onRequestStart(controller, context); - } - onResponseStart(controller, statusCode, headers, statusMessage) { - const contentLength = headers["content-length"]; - if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); - if (this.aborted === true) return true; - return super.onResponseStart(controller, statusCode, headers, statusMessage); - } - onResponseError(controller, err) { - if (this.#dumped) return; - err = this.#controller.reason ?? err; - super.onResponseError(controller, err); - } - onResponseData(controller, chunk) { - this.#size = this.#size + chunk.length; - if (this.#size >= this.#maxSize) { - this.#dumped = true; - if (this.aborted === true) super.onResponseError(controller, this.reason); - else super.onResponseEnd(controller, {}); - } - return true; - } - onResponseEnd(controller, trailers) { - if (this.#dumped) return; - if (this.#controller.aborted === true) { - super.onResponseError(controller, this.reason); - return; - } - super.onResponseEnd(controller, trailers); - } - }; - function createDumpInterceptor({ maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 }) { - return (dispatch) => { - return function Intercept(opts, handler) { - const { dumpMaxSize = defaultMaxSize } = opts; - const dumpHandler = new DumpHandler({ - maxSize: dumpMaxSize, - signal: opts.signal - }, handler); - return dispatch(opts, dumpHandler); - }; - }; - } - module.exports = createDumpInterceptor; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/dns.js -var require_dns = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/dns.js"(exports, module) { - const { isIP } = __require("node:net"); - const { lookup } = __require("node:dns"); - const DecoratorHandler$1 = require_decorator_handler(); - const { InvalidArgumentError: InvalidArgumentError$1, InformationalError } = require_errors(); - const maxInt = Math.pow(2, 31) - 1; - var DNSInstance = class { - #maxTTL = 0; - #maxItems = 0; - #records = new Map(); - dualStack = true; - affinity = null; - lookup = null; - pick = null; - constructor(opts) { - this.#maxTTL = opts.maxTTL; - this.#maxItems = opts.maxItems; - this.dualStack = opts.dualStack; - this.affinity = opts.affinity; - this.lookup = opts.lookup ?? this.#defaultLookup; - this.pick = opts.pick ?? this.#defaultPick; - } - get full() { - return this.#records.size === this.#maxItems; - } - runLookup(origin, opts, cb) { - const ips = this.#records.get(origin.hostname); - if (ips == null && this.full) { - cb(null, origin); - return; - } - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems - }; - if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError("No DNS entries found")); - return; - } - this.setRecords(origin, addresses); - const records = this.#records.get(origin.hostname); - const ip = this.pick(origin, records, newOpts.affinity); - let port; - if (typeof ip.port === "number") port = `:${ip.port}`; - else if (origin.port !== "") port = `:${origin.port}`; - else port = ""; - cb(null, new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`)); - }); - else { - const ip = this.pick(origin, ips, newOpts.affinity); - if (ip == null) { - this.#records.delete(origin.hostname); - this.runLookup(origin, opts, cb); - return; - } - let port; - if (typeof ip.port === "number") port = `:${ip.port}`; - else if (origin.port !== "") port = `:${origin.port}`; - else port = ""; - cb(null, new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`)); - } - } - #defaultLookup(origin, opts, cb) { - lookup(origin.hostname, { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: "ipv4first" - }, (err, addresses) => { - if (err) return cb(err); - const results = new Map(); - for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); - cb(null, results.values()); - }); - } - #defaultPick(origin, hostnameRecords, affinity) { - let ip = null; - const { records, offset } = hostnameRecords; - let family; - if (this.dualStack) { - if (affinity == null) if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0; - affinity = 4; - } else { - hostnameRecords.offset++; - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; - } - if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; - else family = records[affinity === 4 ? 6 : 4]; - } else family = records[affinity]; - if (family == null || family.ips.length === 0) return ip; - if (family.offset == null || family.offset === maxInt) family.offset = 0; - else family.offset++; - const position = family.offset % family.ips.length; - ip = family.ips[position] ?? null; - if (ip == null) return ip; - if (Date.now() - ip.timestamp > ip.ttl) { - family.ips.splice(position, 1); - return this.pick(origin, hostnameRecords, affinity); - } - return ip; - } - pickFamily(origin, ipFamily) { - const records = this.#records.get(origin.hostname)?.records; - if (!records) return null; - const family = records[ipFamily]; - if (!family) return null; - if (family.offset == null || family.offset === maxInt) family.offset = 0; - else family.offset++; - const position = family.offset % family.ips.length; - const ip = family.ips[position] ?? null; - if (ip == null) return ip; - if (Date.now() - ip.timestamp > ip.ttl) family.ips.splice(position, 1); - return ip; - } - setRecords(origin, addresses) { - const timestamp = Date.now(); - const records = { records: { - 4: null, - 6: null - } }; - for (const record of addresses) { - record.timestamp = timestamp; - if (typeof record.ttl === "number") record.ttl = Math.min(record.ttl, this.#maxTTL); - else record.ttl = this.#maxTTL; - const familyRecords = records.records[record.family] ?? { ips: [] }; - familyRecords.ips.push(record); - records.records[record.family] = familyRecords; - } - this.#records.set(origin.hostname, records); - } - deleteRecords(origin) { - this.#records.delete(origin.hostname); - } - getHandler(meta, opts) { - return new DNSDispatchHandler(this, meta, opts); - } - }; - var DNSDispatchHandler = class extends DecoratorHandler$1 { - #state = null; - #opts = null; - #dispatch = null; - #origin = null; - #controller = null; - #newOrigin = null; - #firstTry = true; - constructor(state, { origin, handler, dispatch, newOrigin }, opts) { - super(handler); - this.#origin = origin; - this.#newOrigin = newOrigin; - this.#opts = { ...opts }; - this.#state = state; - this.#dispatch = dispatch; - } - onResponseError(controller, err) { - switch (err.code) { - case "ETIMEDOUT": - case "ECONNREFUSED": { - if (this.#state.dualStack) { - if (!this.#firstTry) { - super.onResponseError(controller, err); - return; - } - this.#firstTry = false; - const otherFamily = this.#newOrigin.hostname[0] === "[" ? 4 : 6; - const ip = this.#state.pickFamily(this.#origin, otherFamily); - if (ip == null) { - super.onResponseError(controller, err); - return; - } - let port; - if (typeof ip.port === "number") port = `:${ip.port}`; - else if (this.#origin.port !== "") port = `:${this.#origin.port}`; - else port = ""; - const dispatchOpts = { - ...this.#opts, - origin: `${this.#origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}` - }; - this.#dispatch(dispatchOpts, this); - return; - } - super.onResponseError(controller, err); - break; - } - case "ENOTFOUND": - this.#state.deleteRecords(this.#origin); - super.onResponseError(controller, err); - break; - default: - super.onResponseError(controller, err); - break; - } - } - }; - module.exports = (interceptorOpts) => { - if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError$1("Invalid maxTTL. Must be a positive number"); - if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError$1("Invalid maxItems. Must be a positive number and greater than zero"); - if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError$1("Invalid affinity. Must be either 4 or 6"); - if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError$1("Invalid dualStack. Must be a boolean"); - if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError$1("Invalid lookup. Must be a function"); - if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError$1("Invalid pick. Must be a function"); - const dualStack = interceptorOpts?.dualStack ?? true; - let affinity; - if (dualStack) affinity = interceptorOpts?.affinity ?? null; - else affinity = interceptorOpts?.affinity ?? 4; - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 1e4, - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity - }; - const instance = new DNSInstance(opts); - return (dispatch) => { - return function dnsInterceptor(origDispatchOpts, handler) { - const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); - if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) return handler.onResponseError(null, err); - const dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, - origin: newOrigin.origin, - headers: { - host: origin.host, - ...origDispatchOpts.headers - } - }; - dispatch(dispatchOpts, instance.getHandler({ - origin, - dispatch, - handler, - newOrigin - }, origDispatchOpts)); - }); - return true; - }; - }; - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/cache.js -var require_cache$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/cache.js"(exports, module) { - const { safeHTTPMethods } = require_util$5(); - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts - */ - function makeCacheKey$1(opts) { - if (!opts.origin) throw new Error("opts.origin is undefined"); - return { - origin: opts.origin.toString(), - method: opts.method, - path: opts.path, - headers: opts.headers - }; - } - /** - * @param {Record} - * @return {Record} - */ - function normaliseHeaders$1(opts) { - let headers; - if (opts.headers == null) headers = {}; - else if (typeof opts.headers[Symbol.iterator] === "function") { - headers = {}; - for (const x of opts.headers) { - if (!Array.isArray(x)) throw new Error("opts.headers is not a valid header map"); - const [key, val] = x; - if (typeof key !== "string" || typeof val !== "string") throw new Error("opts.headers is not a valid header map"); - headers[key.toLowerCase()] = val; - } - } else if (typeof opts.headers === "object") { - headers = {}; - for (const key of Object.keys(opts.headers)) headers[key.toLowerCase()] = opts.headers[key]; - } else throw new Error("opts.headers is not an object"); - return headers; - } - /** - * @param {any} key - */ - function assertCacheKey$2(key) { - if (typeof key !== "object") throw new TypeError(`expected key to be object, got ${typeof key}`); - for (const property of [ - "origin", - "method", - "path" - ]) if (typeof key[property] !== "string") throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`); - if (key.headers !== void 0 && typeof key.headers !== "object") throw new TypeError(`expected headers to be object, got ${typeof key}`); - } - /** - * @param {any} value - */ - function assertCacheValue$2(value) { - if (typeof value !== "object") throw new TypeError(`expected value to be object, got ${typeof value}`); - for (const property of [ - "statusCode", - "cachedAt", - "staleAt", - "deleteAt" - ]) if (typeof value[property] !== "number") throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`); - if (typeof value.statusMessage !== "string") throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`); - if (value.headers != null && typeof value.headers !== "object") throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`); - if (value.vary !== void 0 && typeof value.vary !== "object") throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`); - if (value.etag !== void 0 && typeof value.etag !== "string") throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`); - } - /** - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control - * @see https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml - - * @param {string | string[]} header - * @returns {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} - */ - function parseCacheControlHeader$2(header) { - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} - */ - const output = {}; - let directives; - if (Array.isArray(header)) { - directives = []; - for (const directive of header) directives.push(...directive.split(",")); - } else directives = header.split(","); - for (let i = 0; i < directives.length; i++) { - const directive = directives[i].toLowerCase(); - const keyValueDelimiter = directive.indexOf("="); - let key; - let value; - if (keyValueDelimiter !== -1) { - key = directive.substring(0, keyValueDelimiter).trimStart(); - value = directive.substring(keyValueDelimiter + 1); - } else key = directive.trim(); - switch (key) { - case "min-fresh": - case "max-stale": - case "max-age": - case "s-maxage": - case "stale-while-revalidate": - case "stale-if-error": { - if (value === void 0 || value[0] === " ") continue; - if (value.length >= 2 && value[0] === "\"" && value[value.length - 1] === "\"") value = value.substring(1, value.length - 1); - const parsedValue = parseInt(value, 10); - if (parsedValue !== parsedValue) continue; - if (key === "max-age" && key in output && output[key] >= parsedValue) continue; - output[key] = parsedValue; - break; - } - case "private": - case "no-cache": if (value) { - if (value[0] === "\"") { - const headers = [value.substring(1)]; - let foundEndingQuote = value[value.length - 1] === "\""; - if (!foundEndingQuote) for (let j = i + 1; j < directives.length; j++) { - const nextPart = directives[j]; - const nextPartLength = nextPart.length; - headers.push(nextPart.trim()); - if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === "\"") { - foundEndingQuote = true; - break; - } - } - if (foundEndingQuote) { - let lastHeader = headers[headers.length - 1]; - if (lastHeader[lastHeader.length - 1] === "\"") { - lastHeader = lastHeader.substring(0, lastHeader.length - 1); - headers[headers.length - 1] = lastHeader; - } - if (key in output) output[key] = output[key].concat(headers); - else output[key] = headers; - } - } else if (key in output) output[key] = output[key].concat(value); - else output[key] = [value]; - break; - } - case "public": - case "no-store": - case "must-revalidate": - case "proxy-revalidate": - case "immutable": - case "no-transform": - case "must-understand": - case "only-if-cached": - if (value) continue; - output[key] = true; - break; - default: continue; - } - } - return output; - } - /** - * @param {string | string[]} varyHeader Vary header from the server - * @param {Record} headers Request headers - * @returns {Record} - */ - function parseVaryHeader$1(varyHeader, headers) { - if (typeof varyHeader === "string" && varyHeader.includes("*")) return headers; - const output = {}; - const varyingHeaders = typeof varyHeader === "string" ? varyHeader.split(",") : varyHeader; - for (const header of varyingHeaders) { - const trimmedHeader = header.trim().toLowerCase(); - output[trimmedHeader] = headers[trimmedHeader] ?? null; - } - return output; - } - /** - * Note: this deviates from the spec a little. Empty etags ("", W/"") are valid, - * however, including them in cached resposnes serves little to no purpose. - * - * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-etag - * - * @param {string} etag - * @returns {boolean} - */ - function isEtagUsable$1(etag) { - if (etag.length <= 2) return false; - if (etag[0] === "\"" && etag[etag.length - 1] === "\"") return !(etag[1] === "\"" || etag.startsWith("\"W/")); - if (etag.startsWith("W/\"") && etag[etag.length - 1] === "\"") return etag.length !== 4; - return false; - } - /** - * @param {unknown} store - * @returns {asserts store is import('../../types/cache-interceptor.d.ts').default.CacheStore} - */ - function assertCacheStore$1(store, name = "CacheStore") { - if (typeof store !== "object" || store === null) throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? "null" : typeof store}`); - for (const fn of [ - "get", - "createWriteStream", - "delete" - ]) if (typeof store[fn] !== "function") throw new TypeError(`${name} needs to have a \`${fn}()\` function`); - } - /** - * @param {unknown} methods - * @returns {asserts methods is import('../../types/cache-interceptor.d.ts').default.CacheMethods[]} - */ - function assertCacheMethods$1(methods, name = "CacheMethods") { - if (!Array.isArray(methods)) throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? "null" : typeof methods}`); - if (methods.length === 0) throw new TypeError(`${name} needs to have at least one method`); - for (const method of methods) if (!safeHTTPMethods.includes(method)) throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(", ")}, got ${method}`); - } - module.exports = { - makeCacheKey: makeCacheKey$1, - normaliseHeaders: normaliseHeaders$1, - assertCacheKey: assertCacheKey$2, - assertCacheValue: assertCacheValue$2, - parseCacheControlHeader: parseCacheControlHeader$2, - parseVaryHeader: parseVaryHeader$1, - isEtagUsable: isEtagUsable$1, - assertCacheMethods: assertCacheMethods$1, - assertCacheStore: assertCacheStore$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/date.js -var require_date = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/util/date.js"(exports, module) { - const IMF_DAYS = [ - "mon", - "tue", - "wed", - "thu", - "fri", - "sat", - "sun" - ]; - const IMF_SPACES = [ - 4, - 7, - 11, - 16, - 25 - ]; - const IMF_MONTHS = [ - "jan", - "feb", - "mar", - "apr", - "may", - "jun", - "jul", - "aug", - "sep", - "oct", - "nov", - "dec" - ]; - const IMF_COLONS = [19, 22]; - const ASCTIME_SPACES = [ - 3, - 7, - 10, - 19 - ]; - const RFC850_DAYS = [ - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday", - "sunday" - ]; - /** - * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats - * - * @param {string} date - * @param {Date} [now] - * @returns {Date | undefined} - */ - function parseHttpDate$1(date, now) { - date = date.toLowerCase(); - switch (date[3]) { - case ",": return parseImfDate(date); - case " ": return parseAscTimeDate(date); - default: return parseRfc850Date(date, now); - } - } - /** - * @see https://httpwg.org/specs/rfc9110.html#preferred.date.format - * - * @param {string} date - * @returns {Date | undefined} - */ - function parseImfDate(date) { - if (date.length !== 29) return void 0; - if (!date.endsWith("gmt")) return void 0; - for (const spaceInx of IMF_SPACES) if (date[spaceInx] !== " ") return void 0; - for (const colonIdx of IMF_COLONS) if (date[colonIdx] !== ":") return void 0; - const dayName = date.substring(0, 3); - if (!IMF_DAYS.includes(dayName)) return void 0; - const dayString = date.substring(5, 7); - const day = Number.parseInt(dayString); - if (isNaN(day) || day < 10 && dayString[0] !== "0") return void 0; - const month = date.substring(8, 11); - const monthIdx = IMF_MONTHS.indexOf(month); - if (monthIdx === -1) return void 0; - const year = Number.parseInt(date.substring(12, 16)); - if (isNaN(year)) return void 0; - const hourString = date.substring(17, 19); - const hour = Number.parseInt(hourString); - if (isNaN(hour) || hour < 10 && hourString[0] !== "0") return void 0; - const minuteString = date.substring(20, 22); - const minute = Number.parseInt(minuteString); - if (isNaN(minute) || minute < 10 && minuteString[0] !== "0") return void 0; - const secondString = date.substring(23, 25); - const second = Number.parseInt(secondString); - if (isNaN(second) || second < 10 && secondString[0] !== "0") return void 0; - return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); - } - /** - * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats - * - * @param {string} date - * @returns {Date | undefined} - */ - function parseAscTimeDate(date) { - if (date.length !== 24) return void 0; - for (const spaceIdx of ASCTIME_SPACES) if (date[spaceIdx] !== " ") return void 0; - const dayName = date.substring(0, 3); - if (!IMF_DAYS.includes(dayName)) return void 0; - const month = date.substring(4, 7); - const monthIdx = IMF_MONTHS.indexOf(month); - if (monthIdx === -1) return void 0; - const dayString = date.substring(8, 10); - const day = Number.parseInt(dayString); - if (isNaN(day) || day < 10 && dayString[0] !== " ") return void 0; - const hourString = date.substring(11, 13); - const hour = Number.parseInt(hourString); - if (isNaN(hour) || hour < 10 && hourString[0] !== "0") return void 0; - const minuteString = date.substring(14, 16); - const minute = Number.parseInt(minuteString); - if (isNaN(minute) || minute < 10 && minuteString[0] !== "0") return void 0; - const secondString = date.substring(17, 19); - const second = Number.parseInt(secondString); - if (isNaN(second) || second < 10 && secondString[0] !== "0") return void 0; - const year = Number.parseInt(date.substring(20, 24)); - if (isNaN(year)) return void 0; - return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); - } - /** - * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats - * - * @param {string} date - * @param {Date} [now] - * @returns {Date | undefined} - */ - function parseRfc850Date(date, now = new Date()) { - if (!date.endsWith("gmt")) return void 0; - const commaIndex = date.indexOf(","); - if (commaIndex === -1) return void 0; - if (date.length - commaIndex - 1 !== 23) return void 0; - const dayName = date.substring(0, commaIndex); - if (!RFC850_DAYS.includes(dayName)) return void 0; - if (date[commaIndex + 1] !== " " || date[commaIndex + 4] !== "-" || date[commaIndex + 8] !== "-" || date[commaIndex + 11] !== " " || date[commaIndex + 14] !== ":" || date[commaIndex + 17] !== ":" || date[commaIndex + 20] !== " ") return void 0; - const dayString = date.substring(commaIndex + 2, commaIndex + 4); - const day = Number.parseInt(dayString); - if (isNaN(day) || day < 10 && dayString[0] !== "0") return void 0; - const month = date.substring(commaIndex + 5, commaIndex + 8); - const monthIdx = IMF_MONTHS.indexOf(month); - if (monthIdx === -1) return void 0; - let year = Number.parseInt(date.substring(commaIndex + 9, commaIndex + 11)); - if (isNaN(year)) return void 0; - const currentYear = now.getUTCFullYear(); - const currentDecade = currentYear % 100; - const currentCentury = Math.floor(currentYear / 100); - if (year > currentDecade && year - currentDecade >= 50) year += (currentCentury - 1) * 100; - else year += currentCentury * 100; - const hourString = date.substring(commaIndex + 12, commaIndex + 14); - const hour = Number.parseInt(hourString); - if (isNaN(hour) || hour < 10 && hourString[0] !== "0") return void 0; - const minuteString = date.substring(commaIndex + 15, commaIndex + 17); - const minute = Number.parseInt(minuteString); - if (isNaN(minute) || minute < 10 && minuteString[0] !== "0") return void 0; - const secondString = date.substring(commaIndex + 18, commaIndex + 20); - const second = Number.parseInt(secondString); - if (isNaN(second) || second < 10 && secondString[0] !== "0") return void 0; - return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); - } - module.exports = { parseHttpDate: parseHttpDate$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/cache-handler.js -var require_cache_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/cache-handler.js"(exports, module) { - const util$6 = require_util$5(); - const { parseCacheControlHeader: parseCacheControlHeader$1, parseVaryHeader, isEtagUsable } = require_cache$2(); - const { parseHttpDate } = require_date(); - function noop() {} - const HEURISTICALLY_CACHEABLE_STATUS_CODES = [ - 200, - 203, - 204, - 206, - 300, - 301, - 308, - 404, - 405, - 410, - 414, - 501 - ]; - const MAX_RESPONSE_AGE = 2147483647e3; - /** - * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler - * - * @implements {DispatchHandler} - */ - var CacheHandler$1 = class { - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} - */ - #cacheKey; - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions['type']} - */ - #cacheType; - /** - * @type {number | undefined} - */ - #cacheByDefault; - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheStore} - */ - #store; - /** - * @type {import('../../types/dispatcher.d.ts').default.DispatchHandler} - */ - #handler; - /** - * @type {import('node:stream').Writable | undefined} - */ - #writeStream; - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - */ - constructor({ store, type, cacheByDefault }, cacheKey, handler) { - this.#store = store; - this.#cacheType = type; - this.#cacheByDefault = cacheByDefault; - this.#cacheKey = cacheKey; - this.#handler = handler; - } - onRequestStart(controller, context) { - this.#writeStream?.destroy(); - this.#writeStream = void 0; - this.#handler.onRequestStart?.(controller, context); - } - onRequestUpgrade(controller, statusCode, headers, socket) { - this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket); - } - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {number} statusCode - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {string} statusMessage - */ - onResponseStart(controller, statusCode, resHeaders, statusMessage) { - const downstreamOnHeaders = () => this.#handler.onResponseStart?.(controller, statusCode, resHeaders, statusMessage); - if (!util$6.safeHTTPMethods.includes(this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) { - try { - this.#store.delete(this.#cacheKey)?.catch?.(noop); - } catch {} - return downstreamOnHeaders(); - } - const cacheControlHeader = resHeaders["cache-control"]; - const heuristicallyCacheable = resHeaders["last-modified"] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode); - if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) return downstreamOnHeaders(); - const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader$1(cacheControlHeader) : {}; - if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives)) return downstreamOnHeaders(); - const now = Date.now(); - const resAge = resHeaders.age ? getAge(resHeaders.age) : void 0; - if (resAge && resAge >= MAX_RESPONSE_AGE) return downstreamOnHeaders(); - const resDate = typeof resHeaders.date === "string" ? parseHttpDate(resHeaders.date) : void 0; - const staleAt = determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? this.#cacheByDefault; - if (staleAt === void 0 || resAge && resAge > staleAt) return downstreamOnHeaders(); - const baseTime = resDate ? resDate.getTime() : now; - const absoluteStaleAt = staleAt + baseTime; - if (now >= absoluteStaleAt) return downstreamOnHeaders(); - let varyDirectives; - if (this.#cacheKey.headers && resHeaders.vary) { - varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers); - if (!varyDirectives) return downstreamOnHeaders(); - } - const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt); - const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives); - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue} - */ - const value = { - statusCode, - statusMessage, - headers: strippedHeaders, - vary: varyDirectives, - cacheControlDirectives, - cachedAt: resAge ? now - resAge : now, - staleAt: absoluteStaleAt, - deleteAt - }; - if (typeof resHeaders.etag === "string" && isEtagUsable(resHeaders.etag)) value.etag = resHeaders.etag; - this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value); - if (!this.#writeStream) return downstreamOnHeaders(); - const handler = this; - this.#writeStream.on("drain", () => controller.resume()).on("error", function() { - handler.#writeStream = void 0; - handler.#store.delete(handler.#cacheKey); - }).on("close", function() { - if (handler.#writeStream === this) handler.#writeStream = void 0; - controller.resume(); - }); - return downstreamOnHeaders(); - } - onResponseData(controller, chunk) { - if (this.#writeStream?.write(chunk) === false) controller.pause(); - this.#handler.onResponseData?.(controller, chunk); - } - onResponseEnd(controller, trailers) { - this.#writeStream?.end(); - this.#handler.onResponseEnd?.(controller, trailers); - } - onResponseError(controller, err) { - this.#writeStream?.destroy(err); - this.#writeStream = void 0; - this.#handler.onResponseError?.(controller, err); - } - }; - /** - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen - * - * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType - * @param {number} statusCode - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - */ - function canCacheResponse(cacheType, statusCode, resHeaders, cacheControlDirectives) { - if (statusCode !== 200 && statusCode !== 307) return false; - if (cacheControlDirectives["no-store"]) return false; - if (cacheType === "shared" && cacheControlDirectives.private === true) return false; - if (resHeaders.vary?.includes("*")) return false; - if (resHeaders.authorization) { - if (!cacheControlDirectives.public || typeof resHeaders.authorization !== "string") return false; - if (Array.isArray(cacheControlDirectives["no-cache"]) && cacheControlDirectives["no-cache"].includes("authorization")) return false; - if (Array.isArray(cacheControlDirectives["private"]) && cacheControlDirectives["private"].includes("authorization")) return false; - } - return true; - } - /** - * @param {string | string[]} ageHeader - * @returns {number | undefined} - */ - function getAge(ageHeader) { - const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader); - return isNaN(age) ? void 0 : age * 1e3; - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType - * @param {number} now - * @param {number | undefined} age - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {Date | undefined} responseDate - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - * - * @returns {number | undefined} time that the value is stale at in seconds or undefined if it shouldn't be cached - */ - function determineStaleAt(cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) { - if (cacheType === "shared") { - const sMaxAge = cacheControlDirectives["s-maxage"]; - if (sMaxAge !== void 0) return sMaxAge > 0 ? sMaxAge * 1e3 : void 0; - } - const maxAge = cacheControlDirectives["max-age"]; - if (maxAge !== void 0) return maxAge > 0 ? maxAge * 1e3 : void 0; - if (typeof resHeaders.expires === "string") { - const expiresDate = parseHttpDate(resHeaders.expires); - if (expiresDate) { - if (now >= expiresDate.getTime()) return void 0; - if (responseDate) { - if (responseDate >= expiresDate) return void 0; - if (age !== void 0 && age > expiresDate - responseDate) return void 0; - } - return expiresDate.getTime() - now; - } - } - if (typeof resHeaders["last-modified"] === "string") { - const lastModified = new Date(resHeaders["last-modified"]); - if (isValidDate(lastModified)) { - if (lastModified.getTime() >= now) return void 0; - const responseAge = now - lastModified.getTime(); - return responseAge * .1; - } - } - if (cacheControlDirectives.immutable) return 31536e3; - return void 0; - } - /** - * @param {number} now - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - * @param {number} staleAt - */ - function determineDeleteAt(now, cacheControlDirectives, staleAt) { - let staleWhileRevalidate = -Infinity; - let staleIfError = -Infinity; - let immutable = -Infinity; - if (cacheControlDirectives["stale-while-revalidate"]) staleWhileRevalidate = staleAt + cacheControlDirectives["stale-while-revalidate"] * 1e3; - if (cacheControlDirectives["stale-if-error"]) staleIfError = staleAt + cacheControlDirectives["stale-if-error"] * 1e3; - if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity) immutable = now + 31536e6; - return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable); - } - /** - * Strips headers required to be removed in cached responses - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - * @returns {Record} - */ - function stripNecessaryHeaders(resHeaders, cacheControlDirectives) { - const headersToRemove = [ - "connection", - "proxy-authenticate", - "proxy-authentication-info", - "proxy-authorization", - "proxy-connection", - "te", - "transfer-encoding", - "upgrade", - "age" - ]; - if (resHeaders["connection"]) if (Array.isArray(resHeaders["connection"])) headersToRemove.push(...resHeaders["connection"].map((header) => header.trim())); - else headersToRemove.push(...resHeaders["connection"].split(",").map((header) => header.trim())); - if (Array.isArray(cacheControlDirectives["no-cache"])) headersToRemove.push(...cacheControlDirectives["no-cache"]); - if (Array.isArray(cacheControlDirectives["private"])) headersToRemove.push(...cacheControlDirectives["private"]); - let strippedHeaders; - for (const headerName of headersToRemove) if (resHeaders[headerName]) { - strippedHeaders ??= { ...resHeaders }; - delete strippedHeaders[headerName]; - } - return strippedHeaders ?? resHeaders; - } - /** - * @param {Date} date - * @returns {boolean} - */ - function isValidDate(date) { - return date instanceof Date && Number.isFinite(date.valueOf()); - } - module.exports = CacheHandler$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/cache/memory-cache-store.js -var require_memory_cache_store = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/cache/memory-cache-store.js"(exports, module) { - const { Writable: Writable$2 } = __require("node:stream"); - const { assertCacheKey: assertCacheKey$1, assertCacheValue: assertCacheValue$1 } = require_cache$2(); - /** - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheKey} CacheKey - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheValue} CacheValue - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore - * @typedef {import('../../types/cache-interceptor.d.ts').default.GetResult} GetResult - */ - /** - * @implements {CacheStore} - */ - var MemoryCacheStore$1 = class { - #maxCount = Infinity; - #maxSize = Infinity; - #maxEntrySize = Infinity; - #size = 0; - #count = 0; - #entries = new Map(); - /** - * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts] - */ - constructor(opts) { - if (opts) { - if (typeof opts !== "object") throw new TypeError("MemoryCacheStore options must be an object"); - if (opts.maxCount !== void 0) { - if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer"); - this.#maxCount = opts.maxCount; - } - if (opts.maxSize !== void 0) { - if (typeof opts.maxSize !== "number" || !Number.isInteger(opts.maxSize) || opts.maxSize < 0) throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer"); - this.#maxSize = opts.maxSize; - } - if (opts.maxEntrySize !== void 0) { - if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer"); - this.#maxEntrySize = opts.maxEntrySize; - } - } - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req - * @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} - */ - get(key) { - assertCacheKey$1(key); - const topLevelKey = `${key.origin}:${key.path}`; - const now = Date.now(); - const entries = this.#entries.get(topLevelKey); - const entry = entries ? findEntry(key, entries, now) : null; - return entry == null ? void 0 : { - statusMessage: entry.statusMessage, - statusCode: entry.statusCode, - headers: entry.headers, - body: entry.body, - vary: entry.vary ? entry.vary : void 0, - etag: entry.etag, - cacheControlDirectives: entry.cacheControlDirectives, - cachedAt: entry.cachedAt, - staleAt: entry.staleAt, - deleteAt: entry.deleteAt - }; - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val - * @returns {Writable | undefined} - */ - createWriteStream(key, val) { - assertCacheKey$1(key); - assertCacheValue$1(val); - const topLevelKey = `${key.origin}:${key.path}`; - const store = this; - const entry = { - ...key, - ...val, - body: [], - size: 0 - }; - return new Writable$2({ - write(chunk, encoding, callback) { - if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); - entry.size += chunk.byteLength; - if (entry.size >= store.#maxEntrySize) this.destroy(); - else entry.body.push(chunk); - callback(null); - }, - final(callback) { - let entries = store.#entries.get(topLevelKey); - if (!entries) { - entries = []; - store.#entries.set(topLevelKey, entries); - } - const previousEntry = findEntry(key, entries, Date.now()); - if (previousEntry) { - const index = entries.indexOf(previousEntry); - entries.splice(index, 1, entry); - store.#size -= previousEntry.size; - } else { - entries.push(entry); - store.#count += 1; - } - store.#size += entry.size; - if (store.#size > store.#maxSize || store.#count > store.#maxCount) for (const [key$1, entries$1] of store.#entries) { - for (const entry$1 of entries$1.splice(0, entries$1.length / 2)) { - store.#size -= entry$1.size; - store.#count -= 1; - } - if (entries$1.length === 0) store.#entries.delete(key$1); - } - callback(null); - } - }); - } - /** - * @param {CacheKey} key - */ - delete(key) { - if (typeof key !== "object") throw new TypeError(`expected key to be object, got ${typeof key}`); - const topLevelKey = `${key.origin}:${key.path}`; - for (const entry of this.#entries.get(topLevelKey) ?? []) { - this.#size -= entry.size; - this.#count -= 1; - } - this.#entries.delete(topLevelKey); - } - }; - function findEntry(key, entries, now) { - return entries.find((entry) => entry.deleteAt > now && entry.method === key.method && (entry.vary == null || Object.keys(entry.vary).every((headerName) => { - if (entry.vary[headerName] === null) return key.headers[headerName] === void 0; - return entry.vary[headerName] === key.headers[headerName]; - }))); - } - module.exports = MemoryCacheStore$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/cache-revalidation-handler.js -var require_cache_revalidation_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports, module) { - const assert$10 = __require("node:assert"); - /** - * This takes care of revalidation requests we send to the origin. If we get - * a response indicating that what we have is cached (via a HTTP 304), we can - * continue using the cached value. Otherwise, we'll receive the new response - * here, which we then just pass on to the next handler (most likely a - * CacheHandler). Note that this assumes the proper headers were already - * included in the request to tell the origin that we want to revalidate the - * response (i.e. if-modified-since or if-none-match). - * - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-validation - * - * @implements {import('../../types/dispatcher.d.ts').default.DispatchHandler} - */ - var CacheRevalidationHandler$1 = class { - #successful = false; - /** - * @type {((boolean, any) => void) | null} - */ - #callback; - /** - * @type {(import('../../types/dispatcher.d.ts').default.DispatchHandler)} - */ - #handler; - #context; - /** - * @type {boolean} - */ - #allowErrorStatusCodes; - /** - * @param {(boolean) => void} callback Function to call if the cached value is valid - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler - * @param {boolean} allowErrorStatusCodes - */ - constructor(callback, handler, allowErrorStatusCodes) { - if (typeof callback !== "function") throw new TypeError("callback must be a function"); - this.#callback = callback; - this.#handler = handler; - this.#allowErrorStatusCodes = allowErrorStatusCodes; - } - onRequestStart(_, context) { - this.#successful = false; - this.#context = context; - } - onRequestUpgrade(controller, statusCode, headers, socket) { - this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket); - } - onResponseStart(controller, statusCode, headers, statusMessage) { - assert$10(this.#callback != null); - this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504; - this.#callback(this.#successful, this.#context); - this.#callback = null; - if (this.#successful) return true; - this.#handler.onRequestStart?.(controller, this.#context); - this.#handler.onResponseStart?.(controller, statusCode, headers, statusMessage); - } - onResponseData(controller, chunk) { - if (this.#successful) return; - return this.#handler.onResponseData?.(controller, chunk); - } - onResponseEnd(controller, trailers) { - if (this.#successful) return; - this.#handler.onResponseEnd?.(controller, trailers); - } - onResponseError(controller, err) { - if (this.#successful) return; - if (this.#callback) { - this.#callback(false); - this.#callback = null; - } - if (typeof this.#handler.onResponseError === "function") this.#handler.onResponseError(controller, err); - else throw err; - } - }; - module.exports = CacheRevalidationHandler$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/cache.js -var require_cache$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/interceptor/cache.js"(exports, module) { - const assert$9 = __require("node:assert"); - const { Readable: Readable$1 } = __require("node:stream"); - const util$5 = require_util$5(); - const CacheHandler = require_cache_handler(); - const MemoryCacheStore = require_memory_cache_store(); - const CacheRevalidationHandler = require_cache_revalidation_handler(); - const { assertCacheStore, assertCacheMethods, makeCacheKey, normaliseHeaders, parseCacheControlHeader } = require_cache$2(); - const { AbortError } = require_errors(); - /** - * @typedef {(options: import('../../types/dispatcher.d.ts').default.DispatchOptions, handler: import('../../types/dispatcher.d.ts').default.DispatchHandler) => void} DispatchFn - */ - /** - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives - * @returns {boolean} - */ - function needsRevalidation(result, cacheControlDirectives) { - if (cacheControlDirectives?.["no-cache"]) return true; - if (result.cacheControlDirectives?.["no-cache"] && !Array.isArray(result.cacheControlDirectives["no-cache"])) return true; - const now = Date.now(); - if (now > result.staleAt) { - if (cacheControlDirectives?.["max-stale"]) { - const gracePeriod = result.staleAt + cacheControlDirectives["max-stale"] * 1e3; - return now > gracePeriod; - } - return true; - } - if (cacheControlDirectives?.["min-fresh"]) { - const timeLeftTillStale = result.staleAt - now; - const threshold = cacheControlDirectives["min-fresh"] * 1e3; - return timeLeftTillStale <= threshold; - } - return false; - } - /** - * @param {DispatchFn} dispatch - * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl - */ - function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl) { - if (reqCacheControl?.["only-if-cached"]) { - let aborted = false; - try { - if (typeof handler.onConnect === "function") { - handler.onConnect(() => { - aborted = true; - }); - if (aborted) return; - } - if (typeof handler.onHeaders === "function") { - handler.onHeaders(504, [], () => {}, "Gateway Timeout"); - if (aborted) return; - } - if (typeof handler.onComplete === "function") handler.onComplete([]); - } catch (err) { - if (typeof handler.onError === "function") handler.onError(err); - } - return true; - } - return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); - } - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result - * @param {number} age - * @param {any} context - * @param {boolean} isStale - */ - function sendCachedValue(handler, opts, result, age, context, isStale) { - const stream$3 = util$5.isStream(result.body) ? result.body : Readable$1.from(result.body ?? []); - assert$9(!stream$3.destroyed, "stream should not be destroyed"); - assert$9(!stream$3.readableDidRead, "stream should not be readableDidRead"); - const controller = { - resume() { - stream$3.resume(); - }, - pause() { - stream$3.pause(); - }, - get paused() { - return stream$3.isPaused(); - }, - get aborted() { - return stream$3.destroyed; - }, - get reason() { - return stream$3.errored; - }, - abort(reason) { - stream$3.destroy(reason ?? new AbortError()); - } - }; - stream$3.on("error", function(err) { - if (!this.readableEnded) if (typeof handler.onResponseError === "function") handler.onResponseError(controller, err); - else throw err; - }).on("close", function() { - if (!this.errored) handler.onResponseEnd?.(controller, {}); - }); - handler.onRequestStart?.(controller, context); - if (stream$3.destroyed) return; - const headers = { - ...result.headers, - age: String(age) - }; - if (isStale) headers.warning = "110 - \"response is stale\""; - handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage); - if (opts.method === "HEAD") stream$3.destroy(); - else stream$3.on("data", function(chunk) { - handler.onResponseData?.(controller, chunk); - }); - } - /** - * @param {DispatchFn} dispatch - * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} result - */ - function handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result) { - if (!result) return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl); - const now = Date.now(); - if (now > result.deleteAt) return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); - const age = Math.round((now - result.cachedAt) / 1e3); - if (reqCacheControl?.["max-age"] && age >= reqCacheControl["max-age"]) return dispatch(opts, handler); - if (needsRevalidation(result, reqCacheControl)) { - if (util$5.isStream(opts.body) && util$5.bodyLength(opts.body) !== 0) return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); - let withinStaleIfErrorThreshold = false; - const staleIfErrorExpiry = result.cacheControlDirectives["stale-if-error"] ?? reqCacheControl?.["stale-if-error"]; - if (staleIfErrorExpiry) withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1e3; - let headers = { - ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString() - }; - if (result.etag) headers["if-none-match"] = result.etag; - if (result.vary) headers = { - ...headers, - ...result.vary - }; - return dispatch({ - ...opts, - headers - }, new CacheRevalidationHandler((success, context) => { - if (success) sendCachedValue(handler, opts, result, age, context, true); - else if (util$5.isStream(result.body)) result.body.on("error", () => {}).destroy(); - }, new CacheHandler(globalOpts, cacheKey, handler), withinStaleIfErrorThreshold)); - } - if (util$5.isStream(opts.body)) opts.body.on("error", () => {}).destroy(); - sendCachedValue(handler, opts, result, age, null, false); - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions} [opts] - * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor} - */ - module.exports = (opts = {}) => { - const { store = new MemoryCacheStore(), methods = ["GET"], cacheByDefault = void 0, type = "shared" } = opts; - if (typeof opts !== "object" || opts === null) throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); - assertCacheStore(store, "opts.store"); - assertCacheMethods(methods, "opts.methods"); - if (typeof cacheByDefault !== "undefined" && typeof cacheByDefault !== "number") throw new TypeError(`exepcted opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`); - if (typeof type !== "undefined" && type !== "shared" && type !== "private") throw new TypeError(`exepcted opts.type to be shared, private, or undefined, got ${typeof type}`); - const globalOpts = { - store, - methods, - cacheByDefault, - type - }; - const safeMethodsToNotCache = util$5.safeHTTPMethods.filter((method) => methods.includes(method) === false); - return (dispatch) => { - return (opts$1, handler) => { - if (!opts$1.origin || safeMethodsToNotCache.includes(opts$1.method)) return dispatch(opts$1, handler); - opts$1 = { - ...opts$1, - headers: normaliseHeaders(opts$1) - }; - const reqCacheControl = opts$1.headers?.["cache-control"] ? parseCacheControlHeader(opts$1.headers["cache-control"]) : void 0; - if (reqCacheControl?.["no-store"]) return dispatch(opts$1, handler); - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} - */ - const cacheKey = makeCacheKey(opts$1); - const result = store.get(cacheKey); - if (result && typeof result.then === "function") result.then((result$1) => { - handleResult(dispatch, globalOpts, cacheKey, handler, opts$1, reqCacheControl, result$1); - }); - else handleResult(dispatch, globalOpts, cacheKey, handler, opts$1, reqCacheControl, result); - return true; - }; - }; - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/cache/sqlite-cache-store.js -var require_sqlite_cache_store = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/cache/sqlite-cache-store.js"(exports, module) { - const { Writable: Writable$1 } = __require("stream"); - const { assertCacheKey, assertCacheValue } = require_cache$2(); - let DatabaseSync; - const VERSION = 3; - const MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; - /** - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore - * @implements {CacheStore} - * - * @typedef {{ - * id: Readonly, - * body?: Uint8Array - * statusCode: number - * statusMessage: string - * headers?: string - * vary?: string - * etag?: string - * cacheControlDirectives?: string - * cachedAt: number - * staleAt: number - * deleteAt: number - * }} SqliteStoreValue - */ - module.exports = class SqliteCacheStore$1 { - #maxEntrySize = MAX_ENTRY_SIZE; - #maxCount = Infinity; - /** - * @type {import('node:sqlite').DatabaseSync} - */ - #db; - /** - * @type {import('node:sqlite').StatementSync} - */ - #getValuesQuery; - /** - * @type {import('node:sqlite').StatementSync} - */ - #updateValueQuery; - /** - * @type {import('node:sqlite').StatementSync} - */ - #insertValueQuery; - /** - * @type {import('node:sqlite').StatementSync} - */ - #deleteExpiredValuesQuery; - /** - * @type {import('node:sqlite').StatementSync} - */ - #deleteByUrlQuery; - /** - * @type {import('node:sqlite').StatementSync} - */ - #countEntriesQuery; - /** - * @type {import('node:sqlite').StatementSync | null} - */ - #deleteOldValuesQuery; - /** - * @param {import('../../types/cache-interceptor.d.ts').default.SqliteCacheStoreOpts | undefined} opts - */ - constructor(opts) { - if (opts) { - if (typeof opts !== "object") throw new TypeError("SqliteCacheStore options must be an object"); - if (opts.maxEntrySize !== void 0) { - if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer"); - if (opts.maxEntrySize > MAX_ENTRY_SIZE) throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb"); - this.#maxEntrySize = opts.maxEntrySize; - } - if (opts.maxCount !== void 0) { - if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer"); - this.#maxCount = opts.maxCount; - } - } - if (!DatabaseSync) DatabaseSync = __require("node:sqlite").DatabaseSync; - this.#db = new DatabaseSync(opts?.location ?? ":memory:"); - this.#db.exec(` - PRAGMA journal_mode = WAL; - PRAGMA synchronous = NORMAL; - PRAGMA temp_store = memory; - PRAGMA optimize; - - CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} ( - -- Data specific to us - id INTEGER PRIMARY KEY AUTOINCREMENT, - url TEXT NOT NULL, - method TEXT NOT NULL, - - -- Data returned to the interceptor - body BUF NULL, - deleteAt INTEGER NOT NULL, - statusCode INTEGER NOT NULL, - statusMessage TEXT NOT NULL, - headers TEXT NULL, - cacheControlDirectives TEXT NULL, - etag TEXT NULL, - vary TEXT NULL, - cachedAt INTEGER NOT NULL, - staleAt INTEGER NOT NULL - ); - - CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_getValuesQuery ON cacheInterceptorV${VERSION}(url, method, deleteAt); - CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteByUrlQuery ON cacheInterceptorV${VERSION}(deleteAt); - `); - this.#getValuesQuery = this.#db.prepare(` - SELECT - id, - body, - deleteAt, - statusCode, - statusMessage, - headers, - etag, - cacheControlDirectives, - vary, - cachedAt, - staleAt - FROM cacheInterceptorV${VERSION} - WHERE - url = ? - AND method = ? - ORDER BY - deleteAt ASC - `); - this.#updateValueQuery = this.#db.prepare(` - UPDATE cacheInterceptorV${VERSION} SET - body = ?, - deleteAt = ?, - statusCode = ?, - statusMessage = ?, - headers = ?, - etag = ?, - cacheControlDirectives = ?, - cachedAt = ?, - staleAt = ? - WHERE - id = ? - `); - this.#insertValueQuery = this.#db.prepare(` - INSERT INTO cacheInterceptorV${VERSION} ( - url, - method, - body, - deleteAt, - statusCode, - statusMessage, - headers, - etag, - cacheControlDirectives, - vary, - cachedAt, - staleAt - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - `); - this.#deleteByUrlQuery = this.#db.prepare(`DELETE FROM cacheInterceptorV${VERSION} WHERE url = ?`); - this.#countEntriesQuery = this.#db.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION}`); - this.#deleteExpiredValuesQuery = this.#db.prepare(`DELETE FROM cacheInterceptorV${VERSION} WHERE deleteAt <= ?`); - this.#deleteOldValuesQuery = this.#maxCount === Infinity ? null : this.#db.prepare(` - DELETE FROM cacheInterceptorV${VERSION} - WHERE id IN ( - SELECT - id - FROM cacheInterceptorV${VERSION} - ORDER BY cachedAt DESC - LIMIT ? - ) - `); - } - close() { - this.#db.close(); - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @returns {(import('../../types/cache-interceptor.d.ts').default.GetResult & { body?: Buffer }) | undefined} - */ - get(key) { - assertCacheKey(key); - const value = this.#findValue(key); - return value ? { - body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : void 0, - statusCode: value.statusCode, - statusMessage: value.statusMessage, - headers: value.headers ? JSON.parse(value.headers) : void 0, - etag: value.etag ? value.etag : void 0, - vary: value.vary ? JSON.parse(value.vary) : void 0, - cacheControlDirectives: value.cacheControlDirectives ? JSON.parse(value.cacheControlDirectives) : void 0, - cachedAt: value.cachedAt, - staleAt: value.staleAt, - deleteAt: value.deleteAt - } : void 0; - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue & { body: null | Buffer | Array}} value - */ - set(key, value) { - assertCacheKey(key); - const url = this.#makeValueUrl(key); - const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body; - const size = body?.byteLength; - if (size && size > this.#maxEntrySize) return; - const existingValue = this.#findValue(key, true); - if (existingValue) this.#updateValueQuery.run(body, value.deleteAt, value.statusCode, value.statusMessage, value.headers ? JSON.stringify(value.headers) : null, value.etag ? value.etag : null, value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, value.cachedAt, value.staleAt, existingValue.id); - else { - this.#prune(); - this.#insertValueQuery.run(url, key.method, body, value.deleteAt, value.statusCode, value.statusMessage, value.headers ? JSON.stringify(value.headers) : null, value.etag ? value.etag : null, value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, value.vary ? JSON.stringify(value.vary) : null, value.cachedAt, value.staleAt); - } - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} value - * @returns {Writable | undefined} - */ - createWriteStream(key, value) { - assertCacheKey(key); - assertCacheValue(value); - let size = 0; - /** - * @type {Buffer[] | null} - */ - const body = []; - const store = this; - return new Writable$1({ - decodeStrings: true, - write(chunk, encoding, callback) { - size += chunk.byteLength; - if (size < store.#maxEntrySize) body.push(chunk); - else this.destroy(); - callback(); - }, - final(callback) { - store.set(key, { - ...value, - body - }); - callback(); - } - }); - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - */ - delete(key) { - if (typeof key !== "object") throw new TypeError(`expected key to be object, got ${typeof key}`); - this.#deleteByUrlQuery.run(this.#makeValueUrl(key)); - } - #prune() { - if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) return 0; - { - const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes; - if (removed) return removed; - } - { - const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * .1), 1)).changes; - if (removed) return removed; - } - return 0; - } - /** - * Counts the number of rows in the cache - * @returns {Number} - */ - get size() { - const { total } = this.#countEntriesQuery.get(); - return total; - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @returns {string} - */ - #makeValueUrl(key) { - return `${key.origin}/${key.path}`; - } - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {boolean} [canBeExpired=false] - * @returns {SqliteStoreValue | undefined} - */ - #findValue(key, canBeExpired = false) { - const url = this.#makeValueUrl(key); - const { headers, method } = key; - /** - * @type {SqliteStoreValue[]} - */ - const values = this.#getValuesQuery.all(url, method); - if (values.length === 0) return void 0; - const now = Date.now(); - for (const value of values) { - if (now >= value.deleteAt && !canBeExpired) return void 0; - let matches = true; - if (value.vary) { - const vary = JSON.parse(value.vary); - for (const header in vary) if (!headerValueEquals(headers[header], vary[header])) { - matches = false; - break; - } - } - if (matches) return value; - } - return void 0; - } - }; - /** - * @param {string|string[]|null|undefined} lhs - * @param {string|string[]|null|undefined} rhs - * @returns {boolean} - */ - function headerValueEquals(lhs, rhs) { - if (lhs == null && rhs == null) return true; - if (lhs == null && rhs != null || lhs != null && rhs == null) return false; - if (Array.isArray(lhs) && Array.isArray(rhs)) { - if (lhs.length !== rhs.length) return false; - return lhs.every((x, i) => x === rhs[i]); - } - return lhs === rhs; - } -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/headers.js -var require_headers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/headers.js"(exports, module) { - const { kConstruct: kConstruct$7 } = require_symbols(); - const { kEnumerableProperty: kEnumerableProperty$9 } = require_util$5(); - const { iteratorMixin, isValidHeaderName: isValidHeaderName$1, isValidHeaderValue } = require_util$4(); - const { webidl: webidl$11 } = require_webidl(); - const assert$8 = __require("node:assert"); - const util$4 = __require("node:util"); - /** - * @param {number} code - * @returns {code is (0x0a | 0x0d | 0x09 | 0x20)} - */ - function isHTTPWhiteSpaceCharCode(code) { - return code === 10 || code === 13 || code === 9 || code === 32; - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - * @returns {string} - */ - function headerValueNormalize(potentialValue) { - let i = 0; - let j = potentialValue.length; - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); - } - /** - * @param {Headers} headers - * @param {Array|Object} object - */ - function fill$1(headers, object) { - if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { - const header = object[i]; - if (header.length !== 2) throw webidl$11.errors.exception({ - header: "Headers constructor", - message: `expected name/value pair to be length 2, found ${header.length}.` - }); - appendHeader(headers, header[0], header[1]); - } - else if (typeof object === "object" && object !== null) { - const keys = Object.keys(object); - for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); - } else throw webidl$11.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - * @param {Headers} headers - * @param {string} name - * @param {string} value - */ - function appendHeader(headers, name, value) { - value = headerValueNormalize(value); - if (!isValidHeaderName$1(name)) throw webidl$11.errors.invalidArgument({ - prefix: "Headers.append", - value: name, - type: "header name" - }); - else if (!isValidHeaderValue(value)) throw webidl$11.errors.invalidArgument({ - prefix: "Headers.append", - value, - type: "header value" - }); - if (getHeadersGuard$2(headers) === "immutable") throw new TypeError("immutable"); - return getHeadersList$2(headers).append(name, value, false); - } - /** - * @param {Headers} target - */ - function headersListSortAndCombine(target) { - const headersList = getHeadersList$2(target); - if (!headersList) return []; - if (headersList.sortedMap) return headersList.sortedMap; - const headers = []; - const names = headersList.toSortedArray(); - const cookies = headersList.cookies; - if (cookies === null || cookies.length === 1) return headersList.sortedMap = names; - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i]; - if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); - else headers.push([name, value]); - } - return headersList.sortedMap = headers; - } - function compareHeaderName(a, b) { - return a[0] < b[0] ? -1 : 1; - } - var HeadersList$3 = class HeadersList$3 { - /** @type {[string, string][]|null} */ - cookies = null; - sortedMap; - headersMap; - constructor(init) { - if (init instanceof HeadersList$3) { - this.headersMap = new Map(init.headersMap); - this.sortedMap = init.sortedMap; - this.cookies = init.cookies === null ? null : [...init.cookies]; - } else { - this.headersMap = new Map(init); - this.sortedMap = null; - } - } - /** - * @see https://fetch.spec.whatwg.org/#header-list-contains - * @param {string} name - * @param {boolean} isLowerCase - */ - contains(name, isLowerCase) { - return this.headersMap.has(isLowerCase ? name : name.toLowerCase()); - } - clear() { - this.headersMap.clear(); - this.sortedMap = null; - this.cookies = null; - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-append - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - append(name, value, isLowerCase) { - this.sortedMap = null; - const lowercaseName = isLowerCase ? name : name.toLowerCase(); - const exists = this.headersMap.get(lowercaseName); - if (exists) { - const delimiter = lowercaseName === "cookie" ? "; " : ", "; - this.headersMap.set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }); - } else this.headersMap.set(lowercaseName, { - name, - value - }); - if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-set - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - set(name, value, isLowerCase) { - this.sortedMap = null; - const lowercaseName = isLowerCase ? name : name.toLowerCase(); - if (lowercaseName === "set-cookie") this.cookies = [value]; - this.headersMap.set(lowercaseName, { - name, - value - }); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete(name, isLowerCase) { - this.sortedMap = null; - if (!isLowerCase) name = name.toLowerCase(); - if (name === "set-cookie") this.cookies = null; - this.headersMap.delete(name); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get - * @param {string} name - * @param {boolean} isLowerCase - * @returns {string | null} - */ - get(name, isLowerCase) { - return this.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null; - } - *[Symbol.iterator]() { - for (const { 0: name, 1: { value } } of this.headersMap) yield [name, value]; - } - get entries() { - const headers = {}; - if (this.headersMap.size !== 0) for (const { name, value } of this.headersMap.values()) headers[name] = value; - return headers; - } - rawValues() { - return this.headersMap.values(); - } - get entriesList() { - const headers = []; - if (this.headersMap.size !== 0) for (const { 0: lowerName, 1: { name, value } } of this.headersMap) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); - else headers.push([name, value]); - return headers; - } - toSortedArray() { - const size = this.headersMap.size; - const array = new Array(size); - if (size <= 32) { - if (size === 0) return array; - const iterator = this.headersMap[Symbol.iterator](); - const firstValue = iterator.next().value; - array[0] = [firstValue[0], firstValue[1].value]; - assert$8(firstValue[1].value !== null); - for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { - value = iterator.next().value; - x = array[i] = [value[0], value[1].value]; - assert$8(x[1] !== null); - left = 0; - right = i; - while (left < right) { - pivot = left + (right - left >> 1); - if (array[pivot][0] <= x[0]) left = pivot + 1; - else right = pivot; - } - if (i !== pivot) { - j = i; - while (j > left) array[j] = array[--j]; - array[left] = x; - } - } - /* c8 ignore next 4 */ - if (!iterator.next().done) throw new TypeError("Unreachable"); - return array; - } else { - let i = 0; - for (const { 0: name, 1: { value } } of this.headersMap) { - array[i++] = [name, value]; - assert$8(value !== null); - } - return array.sort(compareHeaderName); - } - } - }; - var Headers$4 = class Headers$4 { - #guard; - /** - * @type {HeadersList} - */ - #headersList; - /** - * @param {HeadersInit|Symbol} [init] - * @returns - */ - constructor(init = void 0) { - webidl$11.util.markAsUncloneable(this); - if (init === kConstruct$7) return; - this.#headersList = new HeadersList$3(); - this.#guard = "none"; - if (init !== void 0) { - init = webidl$11.converters.HeadersInit(init, "Headers constructor", "init"); - fill$1(this, init); - } - } - append(name, value) { - webidl$11.brandCheck(this, Headers$4); - webidl$11.argumentLengthCheck(arguments, 2, "Headers.append"); - const prefix = "Headers.append"; - name = webidl$11.converters.ByteString(name, prefix, "name"); - value = webidl$11.converters.ByteString(value, prefix, "value"); - return appendHeader(this, name, value); - } - delete(name) { - webidl$11.brandCheck(this, Headers$4); - webidl$11.argumentLengthCheck(arguments, 1, "Headers.delete"); - const prefix = "Headers.delete"; - name = webidl$11.converters.ByteString(name, prefix, "name"); - if (!isValidHeaderName$1(name)) throw webidl$11.errors.invalidArgument({ - prefix: "Headers.delete", - value: name, - type: "header name" - }); - if (this.#guard === "immutable") throw new TypeError("immutable"); - if (!this.#headersList.contains(name, false)) return; - this.#headersList.delete(name, false); - } - get(name) { - webidl$11.brandCheck(this, Headers$4); - webidl$11.argumentLengthCheck(arguments, 1, "Headers.get"); - const prefix = "Headers.get"; - name = webidl$11.converters.ByteString(name, prefix, "name"); - if (!isValidHeaderName$1(name)) throw webidl$11.errors.invalidArgument({ - prefix, - value: name, - type: "header name" - }); - return this.#headersList.get(name, false); - } - has(name) { - webidl$11.brandCheck(this, Headers$4); - webidl$11.argumentLengthCheck(arguments, 1, "Headers.has"); - const prefix = "Headers.has"; - name = webidl$11.converters.ByteString(name, prefix, "name"); - if (!isValidHeaderName$1(name)) throw webidl$11.errors.invalidArgument({ - prefix, - value: name, - type: "header name" - }); - return this.#headersList.contains(name, false); - } - set(name, value) { - webidl$11.brandCheck(this, Headers$4); - webidl$11.argumentLengthCheck(arguments, 2, "Headers.set"); - const prefix = "Headers.set"; - name = webidl$11.converters.ByteString(name, prefix, "name"); - value = webidl$11.converters.ByteString(value, prefix, "value"); - value = headerValueNormalize(value); - if (!isValidHeaderName$1(name)) throw webidl$11.errors.invalidArgument({ - prefix, - value: name, - type: "header name" - }); - else if (!isValidHeaderValue(value)) throw webidl$11.errors.invalidArgument({ - prefix, - value, - type: "header value" - }); - if (this.#guard === "immutable") throw new TypeError("immutable"); - this.#headersList.set(name, value, false); - } - getSetCookie() { - webidl$11.brandCheck(this, Headers$4); - const list = this.#headersList.cookies; - if (list) return [...list]; - return []; - } - [util$4.inspect.custom](depth, options) { - options.depth ??= depth; - return `Headers ${util$4.formatWithOptions(options, this.#headersList.entries)}`; - } - static getHeadersGuard(o) { - return o.#guard; - } - static setHeadersGuard(o, guard) { - o.#guard = guard; - } - /** - * @param {Headers} o - */ - static getHeadersList(o) { - return o.#headersList; - } - /** - * @param {Headers} target - * @param {HeadersList} list - */ - static setHeadersList(target, list) { - target.#headersList = list; - } - }; - const { getHeadersGuard: getHeadersGuard$2, setHeadersGuard: setHeadersGuard$2, getHeadersList: getHeadersList$2, setHeadersList: setHeadersList$2 } = Headers$4; - Reflect.deleteProperty(Headers$4, "getHeadersGuard"); - Reflect.deleteProperty(Headers$4, "setHeadersGuard"); - Reflect.deleteProperty(Headers$4, "getHeadersList"); - Reflect.deleteProperty(Headers$4, "setHeadersList"); - iteratorMixin("Headers", Headers$4, headersListSortAndCombine, 0, 1); - Object.defineProperties(Headers$4.prototype, { - append: kEnumerableProperty$9, - delete: kEnumerableProperty$9, - get: kEnumerableProperty$9, - has: kEnumerableProperty$9, - set: kEnumerableProperty$9, - getSetCookie: kEnumerableProperty$9, - [Symbol.toStringTag]: { - value: "Headers", - configurable: true - }, - [util$4.inspect.custom]: { enumerable: false } - }); - webidl$11.converters.HeadersInit = function(V, prefix, argument) { - if (webidl$11.util.Type(V) === webidl$11.util.Types.OBJECT) { - const iterator = Reflect.get(V, Symbol.iterator); - if (!util$4.types.isProxy(V) && iterator === Headers$4.prototype.entries) try { - return getHeadersList$2(V).entriesList; - } catch {} - if (typeof iterator === "function") return webidl$11.converters["sequence>"](V, prefix, argument, iterator.bind(V)); - return webidl$11.converters["record"](V, prefix, argument); - } - throw webidl$11.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - }; - module.exports = { - fill: fill$1, - compareHeaderName, - Headers: Headers$4, - HeadersList: HeadersList$3, - getHeadersGuard: getHeadersGuard$2, - setHeadersGuard: setHeadersGuard$2, - setHeadersList: setHeadersList$2, - getHeadersList: getHeadersList$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/response.js -var require_response = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/response.js"(exports, module) { - const { Headers: Headers$3, HeadersList: HeadersList$2, fill, getHeadersGuard: getHeadersGuard$1, setHeadersGuard: setHeadersGuard$1, setHeadersList: setHeadersList$1 } = require_headers(); - const { extractBody: extractBody$2, cloneBody: cloneBody$1, mixinBody: mixinBody$1, hasFinalizationRegistry, streamRegistry, bodyUnusable: bodyUnusable$1 } = require_body(); - const util$3 = require_util$5(); - const nodeUtil$1 = __require("node:util"); - const { kEnumerableProperty: kEnumerableProperty$8 } = util$3; - const { isValidReasonPhrase, isCancelled: isCancelled$1, isAborted: isAborted$1, serializeJavascriptValueToJSONString, isErrorLike: isErrorLike$1, isomorphicEncode: isomorphicEncode$1, environmentSettingsObject: relevantRealm } = require_util$4(); - const { redirectStatusSet: redirectStatusSet$1, nullBodyStatus: nullBodyStatus$1 } = require_constants$2(); - const { webidl: webidl$10 } = require_webidl(); - const { URLSerializer: URLSerializer$3 } = require_data_url(); - const { kConstruct: kConstruct$6 } = require_symbols(); - const assert$7 = __require("node:assert"); - const { types: types$2 } = __require("node:util"); - const textEncoder = new TextEncoder("utf-8"); - var Response = class Response { - /** @type {Headers} */ - #headers; - #state; - static error() { - const responseObject = fromInnerResponse$2(makeNetworkError$1(), "immutable"); - return responseObject; - } - static json(data, init = void 0) { - webidl$10.argumentLengthCheck(arguments, 1, "Response.json"); - if (init !== null) init = webidl$10.converters.ResponseInit(init); - const bytes = textEncoder.encode(serializeJavascriptValueToJSONString(data)); - const body = extractBody$2(bytes); - const responseObject = fromInnerResponse$2(makeResponse$1({}), "response"); - initializeResponse(responseObject, init, { - body: body[0], - type: "application/json" - }); - return responseObject; - } - static redirect(url, status = 302) { - webidl$10.argumentLengthCheck(arguments, 1, "Response.redirect"); - url = webidl$10.converters.USVString(url); - status = webidl$10.converters["unsigned short"](status); - let parsedURL; - try { - parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); - } catch (err) { - throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); - } - if (!redirectStatusSet$1.has(status)) throw new RangeError(`Invalid status code ${status}`); - const responseObject = fromInnerResponse$2(makeResponse$1({}), "immutable"); - responseObject.#state.status = status; - const value = isomorphicEncode$1(URLSerializer$3(parsedURL)); - responseObject.#state.headersList.append("location", value, true); - return responseObject; - } - constructor(body = null, init = void 0) { - webidl$10.util.markAsUncloneable(this); - if (body === kConstruct$6) return; - if (body !== null) body = webidl$10.converters.BodyInit(body); - init = webidl$10.converters.ResponseInit(init); - this.#state = makeResponse$1({}); - this.#headers = new Headers$3(kConstruct$6); - setHeadersGuard$1(this.#headers, "response"); - setHeadersList$1(this.#headers, this.#state.headersList); - let bodyWithType = null; - if (body != null) { - const [extractedBody, type] = extractBody$2(body); - bodyWithType = { - body: extractedBody, - type - }; - } - initializeResponse(this, init, bodyWithType); - } - get type() { - webidl$10.brandCheck(this, Response); - return this.#state.type; - } - get url() { - webidl$10.brandCheck(this, Response); - const urlList = this.#state.urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) return ""; - return URLSerializer$3(url, true); - } - get redirected() { - webidl$10.brandCheck(this, Response); - return this.#state.urlList.length > 1; - } - get status() { - webidl$10.brandCheck(this, Response); - return this.#state.status; - } - get ok() { - webidl$10.brandCheck(this, Response); - return this.#state.status >= 200 && this.#state.status <= 299; - } - get statusText() { - webidl$10.brandCheck(this, Response); - return this.#state.statusText; - } - get headers() { - webidl$10.brandCheck(this, Response); - return this.#headers; - } - get body() { - webidl$10.brandCheck(this, Response); - return this.#state.body ? this.#state.body.stream : null; - } - get bodyUsed() { - webidl$10.brandCheck(this, Response); - return !!this.#state.body && util$3.isDisturbed(this.#state.body.stream); - } - clone() { - webidl$10.brandCheck(this, Response); - if (bodyUnusable$1(this.#state)) throw webidl$10.errors.exception({ - header: "Response.clone", - message: "Body has already been consumed." - }); - const clonedResponse = cloneResponse$1(this.#state); - return fromInnerResponse$2(clonedResponse, getHeadersGuard$1(this.#headers)); - } - [nodeUtil$1.inspect.custom](depth, options) { - if (options.depth === null) options.depth = 2; - options.colors ??= true; - const properties = { - status: this.status, - statusText: this.statusText, - headers: this.headers, - body: this.body, - bodyUsed: this.bodyUsed, - ok: this.ok, - redirected: this.redirected, - type: this.type, - url: this.url - }; - return `Response ${nodeUtil$1.formatWithOptions(options, properties)}`; - } - /** - * @param {Response} response - */ - static getResponseHeaders(response) { - return response.#headers; - } - /** - * @param {Response} response - * @param {Headers} newHeaders - */ - static setResponseHeaders(response, newHeaders) { - response.#headers = newHeaders; - } - /** - * @param {Response} response - */ - static getResponseState(response) { - return response.#state; - } - /** - * @param {Response} response - * @param {any} newState - */ - static setResponseState(response, newState) { - response.#state = newState; - } - }; - const { getResponseHeaders, setResponseHeaders, getResponseState: getResponseState$2, setResponseState } = Response; - Reflect.deleteProperty(Response, "getResponseHeaders"); - Reflect.deleteProperty(Response, "setResponseHeaders"); - Reflect.deleteProperty(Response, "getResponseState"); - Reflect.deleteProperty(Response, "setResponseState"); - mixinBody$1(Response, getResponseState$2); - Object.defineProperties(Response.prototype, { - type: kEnumerableProperty$8, - url: kEnumerableProperty$8, - status: kEnumerableProperty$8, - ok: kEnumerableProperty$8, - redirected: kEnumerableProperty$8, - statusText: kEnumerableProperty$8, - headers: kEnumerableProperty$8, - clone: kEnumerableProperty$8, - body: kEnumerableProperty$8, - bodyUsed: kEnumerableProperty$8, - [Symbol.toStringTag]: { - value: "Response", - configurable: true - } - }); - Object.defineProperties(Response, { - json: kEnumerableProperty$8, - redirect: kEnumerableProperty$8, - error: kEnumerableProperty$8 - }); - function cloneResponse$1(response) { - if (response.internalResponse) return filterResponse$1(cloneResponse$1(response.internalResponse), response.type); - const newResponse = makeResponse$1({ - ...response, - body: null - }); - if (response.body != null) newResponse.body = cloneBody$1(newResponse, response.body); - return newResponse; - } - function makeResponse$1(init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: "default", - status: 200, - timingInfo: null, - cacheState: "", - statusText: "", - ...init, - headersList: init?.headersList ? new HeadersList$2(init?.headersList) : new HeadersList$2(), - urlList: init?.urlList ? [...init.urlList] : [] - }; - } - function makeNetworkError$1(reason) { - const isError = isErrorLike$1(reason); - return makeResponse$1({ - type: "error", - status: 0, - error: isError ? reason : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === "AbortError" - }); - } - function isNetworkError$1(response) { - return response.type === "error" && response.status === 0; - } - function makeFilteredResponse(response, state) { - state = { - internalResponse: response, - ...state - }; - return new Proxy(response, { - get(target, p) { - return p in state ? state[p] : target[p]; - }, - set(target, p, value) { - assert$7(!(p in state)); - target[p] = value; - return true; - } - }); - } - function filterResponse$1(response, type) { - if (type === "basic") return makeFilteredResponse(response, { - type: "basic", - headersList: response.headersList - }); - else if (type === "cors") return makeFilteredResponse(response, { - type: "cors", - headersList: response.headersList - }); - else if (type === "opaque") return makeFilteredResponse(response, { - type: "opaque", - urlList: Object.freeze([]), - status: 0, - statusText: "", - body: null - }); - else if (type === "opaqueredirect") return makeFilteredResponse(response, { - type: "opaqueredirect", - status: 0, - statusText: "", - headersList: [], - body: null - }); - else assert$7(false); - } - function makeAppropriateNetworkError$1(fetchParams, err = null) { - assert$7(isCancelled$1(fetchParams)); - return isAborted$1(fetchParams) ? makeNetworkError$1(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError$1(Object.assign(new DOMException("Request was cancelled."), { cause: err })); - } - function initializeResponse(response, init, body) { - if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); - if ("statusText" in init && init.statusText != null) { - if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); - } - if ("status" in init && init.status != null) getResponseState$2(response).status = init.status; - if ("statusText" in init && init.statusText != null) getResponseState$2(response).statusText = init.statusText; - if ("headers" in init && init.headers != null) fill(getResponseHeaders(response), init.headers); - if (body) { - if (nullBodyStatus$1.includes(response.status)) throw webidl$10.errors.exception({ - header: "Response constructor", - message: `Invalid response status code ${response.status}` - }); - getResponseState$2(response).body = body.body; - if (body.type != null && !getResponseState$2(response).headersList.contains("content-type", true)) getResponseState$2(response).headersList.append("content-type", body.type, true); - } - } - /** - * @see https://fetch.spec.whatwg.org/#response-create - * @param {any} innerResponse - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Response} - */ - function fromInnerResponse$2(innerResponse, guard) { - const response = new Response(kConstruct$6); - setResponseState(response, innerResponse); - const headers = new Headers$3(kConstruct$6); - setResponseHeaders(response, headers); - setHeadersList$1(headers, innerResponse.headersList); - setHeadersGuard$1(headers, guard); - if (hasFinalizationRegistry && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); - return response; - } - webidl$10.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { - if (typeof V === "string") return webidl$10.converters.USVString(V, prefix, name); - if (webidl$10.is.Blob(V)) return V; - if (ArrayBuffer.isView(V) || types$2.isArrayBuffer(V)) return V; - if (webidl$10.is.FormData(V)) return V; - if (webidl$10.is.URLSearchParams(V)) return V; - return webidl$10.converters.DOMString(V, prefix, name); - }; - webidl$10.converters.BodyInit = function(V, prefix, argument) { - if (webidl$10.is.ReadableStream(V)) return V; - if (V?.[Symbol.asyncIterator]) return V; - return webidl$10.converters.XMLHttpRequestBodyInit(V, prefix, argument); - }; - webidl$10.converters.ResponseInit = webidl$10.dictionaryConverter([ - { - key: "status", - converter: webidl$10.converters["unsigned short"], - defaultValue: () => 200 - }, - { - key: "statusText", - converter: webidl$10.converters.ByteString, - defaultValue: () => "" - }, - { - key: "headers", - converter: webidl$10.converters.HeadersInit - } - ]); - webidl$10.is.Response = webidl$10.util.MakeTypeAssertion(Response); - module.exports = { - isNetworkError: isNetworkError$1, - makeNetworkError: makeNetworkError$1, - makeResponse: makeResponse$1, - makeAppropriateNetworkError: makeAppropriateNetworkError$1, - filterResponse: filterResponse$1, - Response, - cloneResponse: cloneResponse$1, - fromInnerResponse: fromInnerResponse$2, - getResponseState: getResponseState$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js -var require_dispatcher_weakref = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js"(exports, module) { - const { kConnected, kSize } = require_symbols(); - var CompatWeakRef = class { - constructor(value) { - this.value = value; - } - deref() { - return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; - } - }; - var CompatFinalizer = class { - constructor(finalizer) { - this.finalizer = finalizer; - } - register(dispatcher, key) { - if (dispatcher.on) dispatcher.on("disconnect", () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) this.finalizer(key); - }); - } - unregister(key) {} - }; - module.exports = function() { - if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { - process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - }; - } - return { - WeakRef, - FinalizationRegistry - }; - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/request.js -var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/request.js"(exports, module) { - const { extractBody: extractBody$1, mixinBody, cloneBody, bodyUnusable } = require_body(); - const { Headers: Headers$2, fill: fillHeaders, HeadersList: HeadersList$1, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList: getHeadersList$1 } = require_headers(); - const { FinalizationRegistry: FinalizationRegistry$1 } = require_dispatcher_weakref()(); - const util$2 = require_util$5(); - const nodeUtil = __require("node:util"); - const { isValidHTTPToken, sameOrigin: sameOrigin$1, environmentSettingsObject: environmentSettingsObject$3 } = require_util$4(); - const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$2(); - const { kEnumerableProperty: kEnumerableProperty$7, normalizedMethodRecordsBase, normalizedMethodRecords } = util$2; - const { webidl: webidl$9 } = require_webidl(); - const { URLSerializer: URLSerializer$2 } = require_data_url(); - const { kConstruct: kConstruct$5 } = require_symbols(); - const assert$6 = __require("node:assert"); - const { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("node:events"); - const kAbortController = Symbol("abortController"); - const requestFinalizer = new FinalizationRegistry$1(({ signal, abort: abort$1 }) => { - signal.removeEventListener("abort", abort$1); - }); - const dependentControllerMap = new WeakMap(); - let abortSignalHasEventHandlerLeakWarning; - try { - abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0; - } catch { - abortSignalHasEventHandlerLeakWarning = false; - } - function buildAbort(acRef) { - return abort$1; - function abort$1() { - const ac = acRef.deref(); - if (ac !== void 0) { - requestFinalizer.unregister(abort$1); - this.removeEventListener("abort", abort$1); - ac.abort(this.reason); - const controllerList = dependentControllerMap.get(ac.signal); - if (controllerList !== void 0) { - if (controllerList.size !== 0) { - for (const ref of controllerList) { - const ctrl = ref.deref(); - if (ctrl !== void 0) ctrl.abort(this.reason); - } - controllerList.clear(); - } - dependentControllerMap.delete(ac.signal); - } - } - } - } - let patchMethodWarning = false; - var Request$2 = class Request$2 { - /** @type {AbortSignal} */ - #signal; - /** @type {import('../../dispatcher/dispatcher')} */ - #dispatcher; - /** @type {Headers} */ - #headers; - #state; - constructor(input, init = void 0) { - webidl$9.util.markAsUncloneable(this); - if (input === kConstruct$5) return; - const prefix = "Request constructor"; - webidl$9.argumentLengthCheck(arguments, 1, prefix); - input = webidl$9.converters.RequestInfo(input, prefix, "input"); - init = webidl$9.converters.RequestInit(init, prefix, "init"); - let request$1 = null; - let fallbackMode = null; - const baseUrl = environmentSettingsObject$3.settingsObject.baseUrl; - let signal = null; - if (typeof input === "string") { - this.#dispatcher = init.dispatcher; - let parsedURL; - try { - parsedURL = new URL(input, baseUrl); - } catch (err) { - throw new TypeError("Failed to parse URL from " + input, { cause: err }); - } - if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); - request$1 = makeRequest$2({ urlList: [parsedURL] }); - fallbackMode = "cors"; - } else { - assert$6(webidl$9.is.Request(input)); - request$1 = input.#state; - signal = input.#signal; - this.#dispatcher = init.dispatcher || input.#dispatcher; - } - const origin = environmentSettingsObject$3.settingsObject.origin; - let window = "client"; - if (request$1.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin$1(request$1.window, origin)) window = request$1.window; - if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); - if ("window" in init) window = "no-window"; - request$1 = makeRequest$2({ - method: request$1.method, - headersList: request$1.headersList, - unsafeRequest: request$1.unsafeRequest, - client: environmentSettingsObject$3.settingsObject, - window, - priority: request$1.priority, - origin: request$1.origin, - referrer: request$1.referrer, - referrerPolicy: request$1.referrerPolicy, - mode: request$1.mode, - credentials: request$1.credentials, - cache: request$1.cache, - redirect: request$1.redirect, - integrity: request$1.integrity, - keepalive: request$1.keepalive, - reloadNavigation: request$1.reloadNavigation, - historyNavigation: request$1.historyNavigation, - urlList: [...request$1.urlList] - }); - const initHasKey = Object.keys(init).length !== 0; - if (initHasKey) { - if (request$1.mode === "navigate") request$1.mode = "same-origin"; - request$1.reloadNavigation = false; - request$1.historyNavigation = false; - request$1.origin = "client"; - request$1.referrer = "client"; - request$1.referrerPolicy = ""; - request$1.url = request$1.urlList[request$1.urlList.length - 1]; - request$1.urlList = [request$1.url]; - } - if (init.referrer !== void 0) { - const referrer = init.referrer; - if (referrer === "") request$1.referrer = "no-referrer"; - else { - let parsedReferrer; - try { - parsedReferrer = new URL(referrer, baseUrl); - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); - } - if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin$1(parsedReferrer, environmentSettingsObject$3.settingsObject.baseUrl)) request$1.referrer = "client"; - else request$1.referrer = parsedReferrer; - } - } - if (init.referrerPolicy !== void 0) request$1.referrerPolicy = init.referrerPolicy; - let mode; - if (init.mode !== void 0) mode = init.mode; - else mode = fallbackMode; - if (mode === "navigate") throw webidl$9.errors.exception({ - header: "Request constructor", - message: "invalid request mode navigate." - }); - if (mode != null) request$1.mode = mode; - if (init.credentials !== void 0) request$1.credentials = init.credentials; - if (init.cache !== void 0) request$1.cache = init.cache; - if (request$1.cache === "only-if-cached" && request$1.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); - if (init.redirect !== void 0) request$1.redirect = init.redirect; - if (init.integrity != null) request$1.integrity = String(init.integrity); - if (init.keepalive !== void 0) request$1.keepalive = Boolean(init.keepalive); - if (init.method !== void 0) { - let method = init.method; - const mayBeNormalized = normalizedMethodRecords[method]; - if (mayBeNormalized !== void 0) request$1.method = mayBeNormalized; - else { - if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); - const upperCase = method.toUpperCase(); - if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); - method = normalizedMethodRecordsBase[upperCase] ?? method; - request$1.method = method; - } - if (!patchMethodWarning && request$1.method === "patch") { - process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); - patchMethodWarning = true; - } - } - if (init.signal !== void 0) signal = init.signal; - this.#state = request$1; - const ac = new AbortController(); - this.#signal = ac.signal; - if (signal != null) if (signal.aborted) ac.abort(signal.reason); - else { - this[kAbortController] = ac; - const acRef = new WeakRef(ac); - const abort$1 = buildAbort(acRef); - if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); - util$2.addAbortListener(signal, abort$1); - requestFinalizer.register(ac, { - signal, - abort: abort$1 - }, abort$1); - } - this.#headers = new Headers$2(kConstruct$5); - setHeadersList(this.#headers, request$1.headersList); - setHeadersGuard(this.#headers, "request"); - if (mode === "no-cors") { - if (!corsSafeListedMethodsSet.has(request$1.method)) throw new TypeError(`'${request$1.method} is unsupported in no-cors mode.`); - setHeadersGuard(this.#headers, "request-no-cors"); - } - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList$1(this.#headers); - const headers = init.headers !== void 0 ? init.headers : new HeadersList$1(headersList); - headersList.clear(); - if (headers instanceof HeadersList$1) { - for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); - headersList.cookies = headers.cookies; - } else fillHeaders(this.#headers, headers); - } - const inputBody = webidl$9.is.Request(input) ? input.#state.body : null; - if ((init.body != null || inputBody != null) && (request$1.method === "GET" || request$1.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); - let initBody = null; - if (init.body != null) { - const [extractedBody, contentType] = extractBody$1(init.body, request$1.keepalive); - initBody = extractedBody; - if (contentType && !getHeadersList$1(this.#headers).contains("content-type", true)) this.#headers.append("content-type", contentType, true); - } - const inputOrInitBody = initBody ?? inputBody; - if (inputOrInitBody != null && inputOrInitBody.source == null) { - if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); - if (request$1.mode !== "same-origin" && request$1.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); - request$1.useCORSPreflightFlag = true; - } - let finalBody = inputOrInitBody; - if (initBody == null && inputBody != null) { - if (bodyUnusable(input.#state)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); - const identityTransform = new TransformStream(); - inputBody.stream.pipeThrough(identityTransform); - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - }; - } - this.#state.body = finalBody; - } - get method() { - webidl$9.brandCheck(this, Request$2); - return this.#state.method; - } - get url() { - webidl$9.brandCheck(this, Request$2); - return URLSerializer$2(this.#state.url); - } - get headers() { - webidl$9.brandCheck(this, Request$2); - return this.#headers; - } - get destination() { - webidl$9.brandCheck(this, Request$2); - return this.#state.destination; - } - get referrer() { - webidl$9.brandCheck(this, Request$2); - if (this.#state.referrer === "no-referrer") return ""; - if (this.#state.referrer === "client") return "about:client"; - return this.#state.referrer.toString(); - } - get referrerPolicy() { - webidl$9.brandCheck(this, Request$2); - return this.#state.referrerPolicy; - } - get mode() { - webidl$9.brandCheck(this, Request$2); - return this.#state.mode; - } - get credentials() { - webidl$9.brandCheck(this, Request$2); - return this.#state.credentials; - } - get cache() { - webidl$9.brandCheck(this, Request$2); - return this.#state.cache; - } - get redirect() { - webidl$9.brandCheck(this, Request$2); - return this.#state.redirect; - } - get integrity() { - webidl$9.brandCheck(this, Request$2); - return this.#state.integrity; - } - get keepalive() { - webidl$9.brandCheck(this, Request$2); - return this.#state.keepalive; - } - get isReloadNavigation() { - webidl$9.brandCheck(this, Request$2); - return this.#state.reloadNavigation; - } - get isHistoryNavigation() { - webidl$9.brandCheck(this, Request$2); - return this.#state.historyNavigation; - } - get signal() { - webidl$9.brandCheck(this, Request$2); - return this.#signal; - } - get body() { - webidl$9.brandCheck(this, Request$2); - return this.#state.body ? this.#state.body.stream : null; - } - get bodyUsed() { - webidl$9.brandCheck(this, Request$2); - return !!this.#state.body && util$2.isDisturbed(this.#state.body.stream); - } - get duplex() { - webidl$9.brandCheck(this, Request$2); - return "half"; - } - clone() { - webidl$9.brandCheck(this, Request$2); - if (bodyUnusable(this.#state)) throw new TypeError("unusable"); - const clonedRequest = cloneRequest$1(this.#state); - const ac = new AbortController(); - if (this.signal.aborted) ac.abort(this.signal.reason); - else { - let list = dependentControllerMap.get(this.signal); - if (list === void 0) { - list = new Set(); - dependentControllerMap.set(this.signal, list); - } - const acRef = new WeakRef(ac); - list.add(acRef); - util$2.addAbortListener(ac.signal, buildAbort(acRef)); - } - return fromInnerRequest$1(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers)); - } - [nodeUtil.inspect.custom](depth, options) { - if (options.depth === null) options.depth = 2; - options.colors ??= true; - const properties = { - method: this.method, - url: this.url, - headers: this.headers, - destination: this.destination, - referrer: this.referrer, - referrerPolicy: this.referrerPolicy, - mode: this.mode, - credentials: this.credentials, - cache: this.cache, - redirect: this.redirect, - integrity: this.integrity, - keepalive: this.keepalive, - isReloadNavigation: this.isReloadNavigation, - isHistoryNavigation: this.isHistoryNavigation, - signal: this.signal - }; - return `Request ${nodeUtil.formatWithOptions(options, properties)}`; - } - /** - * @param {Request} request - * @param {AbortSignal} newSignal - */ - static setRequestSignal(request$1, newSignal) { - request$1.#signal = newSignal; - return request$1; - } - /** - * @param {Request} request - */ - static getRequestDispatcher(request$1) { - return request$1.#dispatcher; - } - /** - * @param {Request} request - * @param {import('../../dispatcher/dispatcher')} newDispatcher - */ - static setRequestDispatcher(request$1, newDispatcher) { - request$1.#dispatcher = newDispatcher; - } - /** - * @param {Request} request - * @param {Headers} newHeaders - */ - static setRequestHeaders(request$1, newHeaders) { - request$1.#headers = newHeaders; - } - /** - * @param {Request} request - */ - static getRequestState(request$1) { - return request$1.#state; - } - /** - * @param {Request} request - * @param {any} newState - */ - static setRequestState(request$1, newState) { - request$1.#state = newState; - } - }; - const { setRequestSignal, getRequestDispatcher: getRequestDispatcher$1, setRequestDispatcher, setRequestHeaders, getRequestState: getRequestState$2, setRequestState } = Request$2; - Reflect.deleteProperty(Request$2, "setRequestSignal"); - Reflect.deleteProperty(Request$2, "getRequestDispatcher"); - Reflect.deleteProperty(Request$2, "setRequestDispatcher"); - Reflect.deleteProperty(Request$2, "setRequestHeaders"); - Reflect.deleteProperty(Request$2, "getRequestState"); - Reflect.deleteProperty(Request$2, "setRequestState"); - mixinBody(Request$2, getRequestState$2); - function makeRequest$2(init) { - return { - method: init.method ?? "GET", - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? "", - window: init.window ?? "client", - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? "all", - initiator: init.initiator ?? "", - destination: init.destination ?? "", - priority: init.priority ?? null, - origin: init.origin ?? "client", - policyContainer: init.policyContainer ?? "client", - referrer: init.referrer ?? "client", - referrerPolicy: init.referrerPolicy ?? "", - mode: init.mode ?? "no-cors", - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? "same-origin", - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? "default", - redirect: init.redirect ?? "follow", - integrity: init.integrity ?? "", - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", - parserMetadata: init.parserMetadata ?? "", - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? "basic", - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList ? new HeadersList$1(init.headersList) : new HeadersList$1() - }; - } - function cloneRequest$1(request$1) { - const newRequest = makeRequest$2({ - ...request$1, - body: null - }); - if (request$1.body != null) newRequest.body = cloneBody(newRequest, request$1.body); - return newRequest; - } - /** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {import('../../dispatcher/agent')} dispatcher - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ - function fromInnerRequest$1(innerRequest, dispatcher, signal, guard) { - const request$1 = new Request$2(kConstruct$5); - setRequestState(request$1, innerRequest); - setRequestDispatcher(request$1, dispatcher); - setRequestSignal(request$1, signal); - const headers = new Headers$2(kConstruct$5); - setRequestHeaders(request$1, headers); - setHeadersList(headers, innerRequest.headersList); - setHeadersGuard(headers, guard); - return request$1; - } - Object.defineProperties(Request$2.prototype, { - method: kEnumerableProperty$7, - url: kEnumerableProperty$7, - headers: kEnumerableProperty$7, - redirect: kEnumerableProperty$7, - clone: kEnumerableProperty$7, - signal: kEnumerableProperty$7, - duplex: kEnumerableProperty$7, - destination: kEnumerableProperty$7, - body: kEnumerableProperty$7, - bodyUsed: kEnumerableProperty$7, - isHistoryNavigation: kEnumerableProperty$7, - isReloadNavigation: kEnumerableProperty$7, - keepalive: kEnumerableProperty$7, - integrity: kEnumerableProperty$7, - cache: kEnumerableProperty$7, - credentials: kEnumerableProperty$7, - attribute: kEnumerableProperty$7, - referrerPolicy: kEnumerableProperty$7, - referrer: kEnumerableProperty$7, - mode: kEnumerableProperty$7, - [Symbol.toStringTag]: { - value: "Request", - configurable: true - } - }); - webidl$9.is.Request = webidl$9.util.MakeTypeAssertion(Request$2); - webidl$9.converters.RequestInfo = function(V, prefix, argument) { - if (typeof V === "string") return webidl$9.converters.USVString(V); - if (webidl$9.is.Request(V)) return V; - return webidl$9.converters.USVString(V); - }; - webidl$9.converters.RequestInit = webidl$9.dictionaryConverter([ - { - key: "method", - converter: webidl$9.converters.ByteString - }, - { - key: "headers", - converter: webidl$9.converters.HeadersInit - }, - { - key: "body", - converter: webidl$9.nullableConverter(webidl$9.converters.BodyInit) - }, - { - key: "referrer", - converter: webidl$9.converters.USVString - }, - { - key: "referrerPolicy", - converter: webidl$9.converters.DOMString, - allowedValues: referrerPolicy - }, - { - key: "mode", - converter: webidl$9.converters.DOMString, - allowedValues: requestMode - }, - { - key: "credentials", - converter: webidl$9.converters.DOMString, - allowedValues: requestCredentials - }, - { - key: "cache", - converter: webidl$9.converters.DOMString, - allowedValues: requestCache - }, - { - key: "redirect", - converter: webidl$9.converters.DOMString, - allowedValues: requestRedirect - }, - { - key: "integrity", - converter: webidl$9.converters.DOMString - }, - { - key: "keepalive", - converter: webidl$9.converters.boolean - }, - { - key: "signal", - converter: webidl$9.nullableConverter((signal) => webidl$9.converters.AbortSignal(signal, "RequestInit", "signal")) - }, - { - key: "window", - converter: webidl$9.converters.any - }, - { - key: "duplex", - converter: webidl$9.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: "dispatcher", - converter: webidl$9.converters.any - } - ]); - module.exports = { - Request: Request$2, - makeRequest: makeRequest$2, - fromInnerRequest: fromInnerRequest$1, - cloneRequest: cloneRequest$1, - getRequestDispatcher: getRequestDispatcher$1, - getRequestState: getRequestState$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/index.js -var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/fetch/index.js"(exports, module) { - const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse: fromInnerResponse$1, getResponseState: getResponseState$1 } = require_response(); - const { HeadersList } = require_headers(); - const { Request: Request$1, cloneRequest, getRequestDispatcher, getRequestState: getRequestState$1 } = require_request(); - const zlib = __require("node:zlib"); - const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise: createDeferredPromise$2, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$1, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require_util$4(); - const assert$5 = __require("node:assert"); - const { safelyExtractBody, extractBody } = require_body(); - const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require_constants$2(); - const EE = __require("node:events"); - const { Readable, pipeline: pipeline$1, finished, isErrored, isReadable } = __require("node:stream"); - const { addAbortListener, bufferToLowerCasedHeaderName } = require_util$5(); - const { dataURLProcessor, serializeAMimeType: serializeAMimeType$1, minimizeSupportedMimeType } = require_data_url(); - const { getGlobalDispatcher: getGlobalDispatcher$2 } = require_global(); - const { webidl: webidl$8 } = require_webidl(); - const { STATUS_CODES } = __require("node:http"); - const GET_OR_HEAD = ["GET", "HEAD"]; - const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; - /** @type {import('buffer').resolveObjectURL} */ - let resolveObjectURL; - var Fetch = class extends EE { - constructor(dispatcher) { - super(); - this.dispatcher = dispatcher; - this.connection = null; - this.dump = false; - this.state = "ongoing"; - } - terminate(reason) { - if (this.state !== "ongoing") return; - this.state = "terminated"; - this.connection?.destroy(reason); - this.emit("terminated", reason); - } - abort(error) { - if (this.state !== "ongoing") return; - this.state = "aborted"; - if (!error) error = new DOMException("The operation was aborted.", "AbortError"); - this.serializedAbortReason = error; - this.connection?.destroy(error); - this.emit("terminated", error); - } - }; - function handleFetchDone(response) { - finalizeAndReportTiming(response, "fetch"); - } - function fetch(input, init = void 0) { - webidl$8.argumentLengthCheck(arguments, 1, "globalThis.fetch"); - let p = createDeferredPromise$2(); - let requestObject; - try { - requestObject = new Request$1(input, init); - } catch (e) { - p.reject(e); - return p.promise; - } - const request$1 = getRequestState$1(requestObject); - if (requestObject.signal.aborted) { - abortFetch(p, request$1, null, requestObject.signal.reason); - return p.promise; - } - const globalObject = request$1.client.globalObject; - if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request$1.serviceWorkers = "none"; - let responseObject = null; - let locallyAborted = false; - let controller = null; - addAbortListener(requestObject.signal, () => { - locallyAborted = true; - assert$5(controller != null); - controller.abort(requestObject.signal.reason); - const realResponse = responseObject?.deref(); - abortFetch(p, request$1, realResponse, requestObject.signal.reason); - }); - const processResponse = (response) => { - if (locallyAborted) return; - if (response.aborted) { - abortFetch(p, request$1, responseObject, controller.serializedAbortReason); - return; - } - if (response.type === "error") { - p.reject(new TypeError("fetch failed", { cause: response.error })); - return; - } - responseObject = new WeakRef(fromInnerResponse$1(response, "immutable")); - p.resolve(responseObject.deref()); - p = null; - }; - controller = fetching$3({ - request: request$1, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: getRequestDispatcher(requestObject) - }); - return p.promise; - } - function finalizeAndReportTiming(response, initiatorType = "other") { - if (response.type === "error" && response.aborted) return; - if (!response.urlList?.length) return; - const originalURL = response.urlList[0]; - let timingInfo = response.timingInfo; - let cacheState = response.cacheState; - if (!urlIsHttpHttpsScheme$1(originalURL)) return; - if (timingInfo === null) return; - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); - cacheState = ""; - } - timingInfo.endTime = coarsenedSharedCurrentTime(); - response.timingInfo = timingInfo; - markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState, "", response.status); - } - const markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request$1, responseObject, error) { - if (p) p.reject(error); - if (request$1.body?.stream != null && isReadable(request$1.body.stream)) request$1.body.stream.cancel(error).catch((err) => { - if (err.code === "ERR_INVALID_STATE") return; - throw err; - }); - if (responseObject == null) return; - const response = getResponseState$1(responseObject); - if (response.body?.stream != null && isReadable(response.body.stream)) response.body.stream.cancel(error).catch((err) => { - if (err.code === "ERR_INVALID_STATE") return; - throw err; - }); - } - function fetching$3({ request: request$1, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher$2() }) { - assert$5(dispatcher); - let taskDestination = null; - let crossOriginIsolatedCapability = false; - if (request$1.client != null) { - taskDestination = request$1.client.globalObject; - crossOriginIsolatedCapability = request$1.client.crossOriginIsolatedCapability; - } - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); - const timingInfo = createOpaqueTimingInfo({ startTime: currentTime }); - const fetchParams = { - controller: new Fetch(dispatcher), - request: request$1, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - }; - assert$5(!request$1.body || request$1.body.stream); - if (request$1.window === "client") request$1.window = request$1.client?.globalObject?.constructor?.name === "Window" ? request$1.client : "no-window"; - if (request$1.origin === "client") request$1.origin = request$1.client.origin; - if (request$1.policyContainer === "client") if (request$1.client != null) request$1.policyContainer = clonePolicyContainer(request$1.client.policyContainer); - else request$1.policyContainer = makePolicyContainer(); - if (!request$1.headersList.contains("accept", true)) { - const value = "*/*"; - request$1.headersList.append("accept", value, true); - } - if (!request$1.headersList.contains("accept-language", true)) request$1.headersList.append("accept-language", "*", true); - if (request$1.priority === null) {} - if (subresourceSet.has(request$1.destination)) {} - mainFetch(fetchParams).catch((err) => { - fetchParams.controller.terminate(err); - }); - return fetchParams.controller; - } - async function mainFetch(fetchParams, recursive = false) { - const request$1 = fetchParams.request; - let response = null; - if (request$1.localURLsOnly && !urlIsLocal(requestCurrentURL(request$1))) response = makeNetworkError("local URLs only"); - tryUpgradeRequestToAPotentiallyTrustworthyURL(request$1); - if (requestBadPort(request$1) === "blocked") response = makeNetworkError("bad port"); - if (request$1.referrerPolicy === "") request$1.referrerPolicy = request$1.policyContainer.referrerPolicy; - if (request$1.referrer !== "no-referrer") request$1.referrer = determineRequestsReferrer(request$1); - if (response === null) { - const currentURL = requestCurrentURL(request$1); - if (sameOrigin(currentURL, request$1.url) && request$1.responseTainting === "basic" || currentURL.protocol === "data:" || request$1.mode === "navigate" || request$1.mode === "websocket") { - request$1.responseTainting = "basic"; - response = await schemeFetch(fetchParams); - } else if (request$1.mode === "same-origin") response = makeNetworkError("request mode cannot be \"same-origin\""); - else if (request$1.mode === "no-cors") if (request$1.redirect !== "follow") response = makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); - else { - request$1.responseTainting = "opaque"; - response = await schemeFetch(fetchParams); - } - else if (!urlIsHttpHttpsScheme$1(requestCurrentURL(request$1))) response = makeNetworkError("URL scheme must be a HTTP(S) scheme"); - else { - request$1.responseTainting = "cors"; - response = await httpFetch(fetchParams); - } - } - if (recursive) return response; - if (response.status !== 0 && !response.internalResponse) { - if (request$1.responseTainting === "cors") {} - if (request$1.responseTainting === "basic") response = filterResponse(response, "basic"); - else if (request$1.responseTainting === "cors") response = filterResponse(response, "cors"); - else if (request$1.responseTainting === "opaque") response = filterResponse(response, "opaque"); - else assert$5(false); - } - let internalResponse = response.status === 0 ? response : response.internalResponse; - if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request$1.urlList); - if (!request$1.timingAllowFailed) response.timingAllowPassed = true; - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request$1.headers.contains("range", true)) response = internalResponse = makeNetworkError(); - if (response.status !== 0 && (request$1.method === "HEAD" || request$1.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { - internalResponse.body = null; - fetchParams.controller.dump = true; - } - if (request$1.integrity) { - const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); - if (request$1.responseTainting === "opaque" || response.body == null) { - processBodyError(response.error); - return; - } - const processBody = (bytes) => { - if (!bytesMatch(bytes, request$1.integrity)) { - processBodyError("integrity mismatch"); - return; - } - response.body = safelyExtractBody(bytes)[0]; - fetchFinale(fetchParams, response); - }; - await fullyReadBody(response.body, processBody, processBodyError); - } else fetchFinale(fetchParams, response); - } - function schemeFetch(fetchParams) { - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); - const { request: request$1 } = fetchParams; - const { protocol: scheme } = requestCurrentURL(request$1); - switch (scheme) { - case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); - case "blob:": { - if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; - const blobURLEntry = requestCurrentURL(request$1); - if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); - const blob = resolveObjectURL(blobURLEntry.toString()); - if (request$1.method !== "GET" || !webidl$8.is.Blob(blob)) return Promise.resolve(makeNetworkError("invalid method")); - const response = makeResponse(); - const fullLength = blob.size; - const serializedFullLength = isomorphicEncode(`${fullLength}`); - const type = blob.type; - if (!request$1.headersList.contains("range", true)) { - const bodyWithType = extractBody(blob); - response.statusText = "OK"; - response.body = bodyWithType[0]; - response.headersList.set("content-length", serializedFullLength, true); - response.headersList.set("content-type", type, true); - } else { - response.rangeRequested = true; - const rangeHeader = request$1.headersList.get("range", true); - const rangeValue = simpleRangeHeaderValue(rangeHeader, true); - if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); - let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; - if (rangeStart === null) { - rangeStart = fullLength - rangeEnd; - rangeEnd = rangeStart + rangeEnd - 1; - } else { - if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); - if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; - } - const slicedBlob = blob.slice(rangeStart, rangeEnd, type); - const slicedBodyWithType = extractBody(slicedBlob); - response.body = slicedBodyWithType[0]; - const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); - const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); - response.status = 206; - response.statusText = "Partial Content"; - response.headersList.set("content-length", serializedSlicedLength, true); - response.headersList.set("content-type", type, true); - response.headersList.set("content-range", contentRange, true); - } - return Promise.resolve(response); - } - case "data:": { - const currentURL = requestCurrentURL(request$1); - const dataURLStruct = dataURLProcessor(currentURL); - if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); - const mimeType = serializeAMimeType$1(dataURLStruct.mimeType); - return Promise.resolve(makeResponse({ - statusText: "OK", - headersList: [["content-type", { - name: "Content-Type", - value: mimeType - }]], - body: safelyExtractBody(dataURLStruct.body)[0] - })); - } - case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); - case "http:": - case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); - default: return Promise.resolve(makeNetworkError("unknown scheme")); - } - } - function finalizeResponse(fetchParams, response) { - fetchParams.request.done = true; - if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); - } - function fetchFinale(fetchParams, response) { - let timingInfo = fetchParams.timingInfo; - const processResponseEndOfBody = () => { - const unsafeEndTime = Date.now(); - if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; - fetchParams.controller.reportTimingSteps = () => { - if (!urlIsHttpHttpsScheme$1(fetchParams.request.url)) return; - timingInfo.endTime = unsafeEndTime; - let cacheState = response.cacheState; - const bodyInfo = response.bodyInfo; - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo(timingInfo); - cacheState = ""; - } - let responseStatus = 0; - if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { - responseStatus = response.status; - const mimeType = extractMimeType(response.headersList); - if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); - } - if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); - }; - const processResponseEndOfBodyTask = () => { - fetchParams.request.done = true; - if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); - if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); - }; - queueMicrotask(() => processResponseEndOfBodyTask()); - }; - if (fetchParams.processResponse != null) queueMicrotask(() => { - fetchParams.processResponse(response); - fetchParams.processResponse = null; - }); - const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; - if (internalResponse.body == null) processResponseEndOfBody(); - else finished(internalResponse.body.stream, () => { - processResponseEndOfBody(); - }); - } - async function httpFetch(fetchParams) { - const request$1 = fetchParams.request; - let response = null; - let actualResponse = null; - const timingInfo = fetchParams.timingInfo; - if (request$1.serviceWorkers === "all") {} - if (response === null) { - if (request$1.redirect === "follow") request$1.serviceWorkers = "none"; - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); - if (request$1.responseTainting === "cors" && corsCheck(request$1, response) === "failure") return makeNetworkError("cors failure"); - if (TAOCheck(request$1, response) === "failure") request$1.timingAllowFailed = true; - } - if ((request$1.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request$1.origin, request$1.client, request$1.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); - if (redirectStatusSet.has(actualResponse.status)) { - if (request$1.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); - if (request$1.redirect === "error") response = makeNetworkError("unexpected redirect"); - else if (request$1.redirect === "manual") response = actualResponse; - else if (request$1.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); - else assert$5(false); - } - response.timingInfo = timingInfo; - return response; - } - function httpRedirectFetch(fetchParams, response) { - const request$1 = fetchParams.request; - const actualResponse = response.internalResponse ? response.internalResponse : response; - let locationURL; - try { - locationURL = responseLocationURL(actualResponse, requestCurrentURL(request$1).hash); - if (locationURL == null) return response; - } catch (err) { - return Promise.resolve(makeNetworkError(err)); - } - if (!urlIsHttpHttpsScheme$1(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); - if (request$1.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); - request$1.redirectCount += 1; - if (request$1.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request$1, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); - if (request$1.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); - if (actualResponse.status !== 303 && request$1.body != null && request$1.body.source == null) return Promise.resolve(makeNetworkError()); - if ([301, 302].includes(actualResponse.status) && request$1.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request$1.method)) { - request$1.method = "GET"; - request$1.body = null; - for (const headerName of requestBodyHeader) request$1.headersList.delete(headerName); - } - if (!sameOrigin(requestCurrentURL(request$1), locationURL)) { - request$1.headersList.delete("authorization", true); - request$1.headersList.delete("proxy-authorization", true); - request$1.headersList.delete("cookie", true); - request$1.headersList.delete("host", true); - } - if (request$1.body != null) { - assert$5(request$1.body.source != null); - request$1.body = safelyExtractBody(request$1.body.source)[0]; - } - const timingInfo = fetchParams.timingInfo; - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); - if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; - request$1.urlList.push(locationURL); - setRequestReferrerPolicyOnRedirect(request$1, actualResponse); - return mainFetch(fetchParams, true); - } - async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - const request$1 = fetchParams.request; - let httpFetchParams = null; - let httpRequest = null; - let response = null; - const httpCache = null; - const revalidatingFlag = false; - if (request$1.window === "no-window" && request$1.redirect === "error") { - httpFetchParams = fetchParams; - httpRequest = request$1; - } else { - httpRequest = cloneRequest(request$1); - httpFetchParams = { ...fetchParams }; - httpFetchParams.request = httpRequest; - } - const includeCredentials = request$1.credentials === "include" || request$1.credentials === "same-origin" && request$1.responseTainting === "basic"; - const contentLength = httpRequest.body ? httpRequest.body.length : null; - let contentLengthHeaderValue = null; - if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; - if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); - if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); - if (contentLength != null && httpRequest.keepalive) {} - if (webidl$8.is.URL(httpRequest.referrer)) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); - appendRequestOriginHeader(httpRequest); - appendFetchMetadata(httpRequest); - if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent, true); - if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; - if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); - if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { - if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); - if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); - } - if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); - if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); - else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); - httpRequest.headersList.delete("host", true); - if (includeCredentials) {} - if (httpCache == null) httpRequest.cache = "no-store"; - if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} - if (response == null) { - if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); - const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); - if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} - if (revalidatingFlag && forwardResponse.status === 304) {} - if (response == null) response = forwardResponse; - } - response.urlList = [...httpRequest.urlList]; - if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; - response.requestIncludesCredentials = includeCredentials; - if (response.status === 407) { - if (request$1.window === "no-window") return makeNetworkError(); - if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); - return makeNetworkError("proxy authentication required"); - } - if (response.status === 421 && !isNewConnectionFetch && (request$1.body == null || request$1.body.source != null)) { - if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); - fetchParams.controller.connection.destroy(); - response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); - } - if (isAuthenticationFetch) {} - return response; - } - async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert$5(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy(err, abort$1 = true) { - if (!this.destroyed) { - this.destroyed = true; - if (abort$1) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); - } - } - }; - const request$1 = fetchParams.request; - let response = null; - const timingInfo = fetchParams.timingInfo; - const httpCache = null; - if (httpCache == null) request$1.cache = "no-store"; - const newConnection = forceNewConnection ? "yes" : "no"; - if (request$1.mode === "websocket") {} - let requestBody = null; - if (request$1.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); - else if (request$1.body != null) { - const processBodyChunk = async function* (bytes) { - if (isCancelled(fetchParams)) return; - yield bytes; - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); - }; - const processEndOfBody = () => { - if (isCancelled(fetchParams)) return; - if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); - }; - const processBodyError = (e) => { - if (isCancelled(fetchParams)) return; - if (e.name === "AbortError") fetchParams.controller.abort(); - else fetchParams.controller.terminate(e); - }; - requestBody = async function* () { - try { - for await (const bytes of request$1.body.stream) yield* processBodyChunk(bytes); - processEndOfBody(); - } catch (err) { - processBodyError(err); - } - }(); - } - try { - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); - if (socket) response = makeResponse({ - status, - statusText, - headersList, - socket - }); - else { - const iterator = body[Symbol.asyncIterator](); - fetchParams.controller.next = () => iterator.next(); - response = makeResponse({ - status, - statusText, - headersList - }); - } - } catch (err) { - if (err.name === "AbortError") { - fetchParams.controller.connection.destroy(); - return makeAppropriateNetworkError(fetchParams, err); - } - return makeNetworkError(err); - } - const pullAlgorithm = () => { - return fetchParams.controller.resume(); - }; - const cancelAlgorithm = (reason) => { - if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); - }; - const stream$3 = new ReadableStream({ - async start(controller) { - fetchParams.controller.controller = controller; - }, - async pull(controller) { - await pullAlgorithm(controller); - }, - async cancel(reason) { - await cancelAlgorithm(reason); - }, - type: "bytes" - }); - response.body = { - stream: stream$3, - source: null, - length: null - }; - if (!fetchParams.controller.resume) fetchParams.controller.on("terminated", onAborted); - fetchParams.controller.resume = async () => { - while (true) { - let bytes; - let isFailure; - try { - const { done, value } = await fetchParams.controller.next(); - if (isAborted(fetchParams)) break; - bytes = done ? void 0 : value; - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; - else { - bytes = err; - isFailure = true; - } - } - if (bytes === void 0) { - readableStreamClose(fetchParams.controller.controller); - finalizeResponse(fetchParams, response); - return; - } - timingInfo.decodedBodySize += bytes?.byteLength ?? 0; - if (isFailure) { - fetchParams.controller.terminate(bytes); - return; - } - const buffer$1 = new Uint8Array(bytes); - if (buffer$1.byteLength) fetchParams.controller.controller.enqueue(buffer$1); - if (isErrored(stream$3)) { - fetchParams.controller.terminate(); - return; - } - if (fetchParams.controller.controller.desiredSize <= 0) return; - } - }; - function onAborted(reason) { - if (isAborted(fetchParams)) { - response.aborted = true; - if (isReadable(stream$3)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); - } else if (isReadable(stream$3)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); - fetchParams.controller.connection.destroy(); - } - return response; - function dispatch({ body }) { - const url = requestCurrentURL(request$1); - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher; - return new Promise((resolve, reject) => agent.dispatch({ - path: url.pathname + url.search, - origin: url.origin, - method: request$1.method, - body: agent.isMockActive ? request$1.body && (request$1.body.source || request$1.body.stream) : body, - headers: request$1.headersList.entries, - maxRedirections: 0, - upgrade: request$1.mode === "websocket" ? "websocket" : void 0 - }, { - body: null, - abort: null, - onConnect(abort$1) { - const { connection } = fetchParams.controller; - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); - if (connection.destroyed) abort$1(new DOMException("The operation was aborted.", "AbortError")); - else { - fetchParams.controller.on("terminated", abort$1); - this.abort = connection.abort = abort$1; - } - timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); - }, - onResponseStarted() { - timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); - }, - onHeaders(status, rawHeaders, resume$1, statusText) { - if (status < 200) return; - /** @type {string[]} */ - let codings = []; - let location = ""; - const headersList = new HeadersList(); - for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); - const contentEncoding = headersList.get("content-encoding", true); - if (contentEncoding) codings = contentEncoding.toLowerCase().split(",").map((x) => x.trim()); - location = headersList.get("location", true); - this.body = new Readable({ read: resume$1 }); - const decoders = []; - const willFollow = location && request$1.redirect === "follow" && redirectStatusSet.has(status); - if (codings.length !== 0 && request$1.method !== "HEAD" && request$1.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) for (let i = codings.length - 1; i >= 0; --i) { - const coding = codings[i]; - if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })); - else if (coding === "deflate") decoders.push(createInflate({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })); - else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH - })); - else { - decoders.length = 0; - break; - } - } - const onError$1 = this.onError.bind(this); - resolve({ - status, - statusText, - headersList, - body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { - if (err) this.onError(err); - }).on("error", onError$1) : this.body.on("error", onError$1) - }); - return true; - }, - onData(chunk) { - if (fetchParams.controller.dump) return; - const bytes = chunk; - timingInfo.encodedBodySize += bytes.byteLength; - return this.body.push(bytes); - }, - onComplete() { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - fetchParams.controller.ended = true; - this.body.push(null); - }, - onError(error) { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - this.body?.destroy(error); - fetchParams.controller.terminate(error); - reject(error); - }, - onUpgrade(status, rawHeaders, socket) { - if (status !== 101) return; - const headersList = new HeadersList(); - for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }); - return true; - } - })); - } - } - module.exports = { - fetch, - Fetch, - fetching: fetching$3, - finalizeAndReportTiming - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cache/util.js -var require_util$3 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cache/util.js"(exports, module) { - const assert$4 = __require("node:assert"); - const { URLSerializer: URLSerializer$1 } = require_data_url(); - const { isValidHeaderName } = require_util$4(); - /** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ - function urlEquals$1(A, B, excludeFragment = false) { - const serializedA = URLSerializer$1(A, excludeFragment); - const serializedB = URLSerializer$1(B, excludeFragment); - return serializedA === serializedB; - } - /** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ - function getFieldValues$1(header) { - assert$4(header !== null); - const values = []; - for (let value of header.split(",")) { - value = value.trim(); - if (isValidHeaderName(value)) values.push(value); - } - return values; - } - module.exports = { - urlEquals: urlEquals$1, - getFieldValues: getFieldValues$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cache/cache.js -var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cache/cache.js"(exports, module) { - const { kConstruct: kConstruct$4 } = require_symbols(); - const { urlEquals, getFieldValues } = require_util$3(); - const { kEnumerableProperty: kEnumerableProperty$6, isDisturbed } = require_util$5(); - const { webidl: webidl$7 } = require_webidl(); - const { cloneResponse, fromInnerResponse, getResponseState } = require_response(); - const { Request, fromInnerRequest, getRequestState } = require_request(); - const { fetching: fetching$2 } = require_fetch(); - const { urlIsHttpHttpsScheme, createDeferredPromise: createDeferredPromise$1, readAllBytes } = require_util$4(); - const assert$3 = __require("node:assert"); - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - var Cache$1 = class Cache$1 { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList; - constructor() { - if (arguments[0] !== kConstruct$4) webidl$7.illegalConstructor(); - webidl$7.util.markAsUncloneable(this); - this.#relevantRequestResponseList = arguments[1]; - } - async match(request$1, options = {}) { - webidl$7.brandCheck(this, Cache$1); - const prefix = "Cache.match"; - webidl$7.argumentLengthCheck(arguments, 1, prefix); - request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); - options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); - const p = this.#internalMatchAll(request$1, options, 1); - if (p.length === 0) return; - return p[0]; - } - async matchAll(request$1 = void 0, options = {}) { - webidl$7.brandCheck(this, Cache$1); - const prefix = "Cache.matchAll"; - if (request$1 !== void 0) request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); - options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); - return this.#internalMatchAll(request$1, options); - } - async add(request$1) { - webidl$7.brandCheck(this, Cache$1); - const prefix = "Cache.add"; - webidl$7.argumentLengthCheck(arguments, 1, prefix); - request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); - const requests = [request$1]; - const responseArrayPromise = this.addAll(requests); - return await responseArrayPromise; - } - async addAll(requests) { - webidl$7.brandCheck(this, Cache$1); - const prefix = "Cache.addAll"; - webidl$7.argumentLengthCheck(arguments, 1, prefix); - const responsePromises = []; - const requestList = []; - for (let request$1 of requests) { - if (request$1 === void 0) throw webidl$7.errors.conversionFailed({ - prefix, - argument: "Argument 1", - types: ["undefined is not allowed"] - }); - request$1 = webidl$7.converters.RequestInfo(request$1); - if (typeof request$1 === "string") continue; - const r = getRequestState(request$1); - if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl$7.errors.exception({ - header: prefix, - message: "Expected http/s scheme when method is not GET." - }); - } - /** @type {ReturnType[]} */ - const fetchControllers = []; - for (const request$1 of requests) { - const r = getRequestState(new Request(request$1)); - if (!urlIsHttpHttpsScheme(r.url)) throw webidl$7.errors.exception({ - header: prefix, - message: "Expected http/s scheme." - }); - r.initiator = "fetch"; - r.destination = "subresource"; - requestList.push(r); - const responsePromise = createDeferredPromise$1(); - fetchControllers.push(fetching$2({ - request: r, - processResponse(response) { - if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl$7.errors.exception({ - header: "Cache.addAll", - message: "Received an invalid status code or the request failed." - })); - else if (response.headersList.contains("vary")) { - const fieldValues = getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues) if (fieldValue === "*") { - responsePromise.reject(webidl$7.errors.exception({ - header: "Cache.addAll", - message: "invalid vary field value" - })); - for (const controller of fetchControllers) controller.abort(); - return; - } - } - }, - processResponseEndOfBody(response) { - if (response.aborted) { - responsePromise.reject(new DOMException("aborted", "AbortError")); - return; - } - responsePromise.resolve(response); - } - })); - responsePromises.push(responsePromise.promise); - } - const p = Promise.all(responsePromises); - const responses = await p; - const operations = []; - let index = 0; - for (const response of responses) { - /** @type {CacheBatchOperation} */ - const operation = { - type: "put", - request: requestList[index], - response - }; - operations.push(operation); - index++; - } - const cacheJobPromise = createDeferredPromise$1(); - let errorData = null; - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(void 0); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - async put(request$1, response) { - webidl$7.brandCheck(this, Cache$1); - const prefix = "Cache.put"; - webidl$7.argumentLengthCheck(arguments, 2, prefix); - request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); - response = webidl$7.converters.Response(response, prefix, "response"); - let innerRequest = null; - if (webidl$7.is.Request(request$1)) innerRequest = getRequestState(request$1); - else innerRequest = getRequestState(new Request(request$1)); - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl$7.errors.exception({ - header: prefix, - message: "Expected an http/s scheme when method is not GET" - }); - const innerResponse = getResponseState(response); - if (innerResponse.status === 206) throw webidl$7.errors.exception({ - header: prefix, - message: "Got 206 status" - }); - if (innerResponse.headersList.contains("vary")) { - const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); - for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl$7.errors.exception({ - header: prefix, - message: "Got * vary field value" - }); - } - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl$7.errors.exception({ - header: prefix, - message: "Response body is locked or disturbed" - }); - const clonedResponse = cloneResponse(innerResponse); - const bodyReadPromise = createDeferredPromise$1(); - if (innerResponse.body != null) { - const stream$3 = innerResponse.body.stream; - const reader = stream$3.getReader(); - readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject); - } else bodyReadPromise.resolve(void 0); - /** @type {CacheBatchOperation[]} */ - const operations = []; - /** @type {CacheBatchOperation} */ - const operation = { - type: "put", - request: innerRequest, - response: clonedResponse - }; - operations.push(operation); - const bytes = await bodyReadPromise.promise; - if (clonedResponse.body != null) clonedResponse.body.source = bytes; - const cacheJobPromise = createDeferredPromise$1(); - let errorData = null; - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - async delete(request$1, options = {}) { - webidl$7.brandCheck(this, Cache$1); - const prefix = "Cache.delete"; - webidl$7.argumentLengthCheck(arguments, 1, prefix); - request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); - options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); - /** - * @type {Request} - */ - let r = null; - if (webidl$7.is.Request(request$1)) { - r = getRequestState(request$1); - if (r.method !== "GET" && !options.ignoreMethod) return false; - } else { - assert$3(typeof request$1 === "string"); - r = getRequestState(new Request(request$1)); - } - /** @type {CacheBatchOperation[]} */ - const operations = []; - /** @type {CacheBatchOperation} */ - const operation = { - type: "delete", - request: r, - options - }; - operations.push(operation); - const cacheJobPromise = createDeferredPromise$1(); - let errorData = null; - let requestResponses; - try { - requestResponses = this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {Promise} - */ - async keys(request$1 = void 0, options = {}) { - webidl$7.brandCheck(this, Cache$1); - const prefix = "Cache.keys"; - if (request$1 !== void 0) request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); - options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); - let r = null; - if (request$1 !== void 0) { - if (webidl$7.is.Request(request$1)) { - r = getRequestState(request$1); - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$1 === "string") r = getRequestState(new Request(request$1)); - } - const promise = createDeferredPromise$1(); - const requests = []; - if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); - else { - const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) requests.push(requestResponse[0]); - } - queueMicrotask(() => { - const requestList = []; - for (const request$2 of requests) { - const requestObject = fromInnerRequest(request$2, void 0, new AbortController().signal, "immutable"); - requestList.push(requestObject); - } - promise.resolve(Object.freeze(requestList)); - }); - return promise.promise; - } - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations(operations) { - const cache$1 = this.#relevantRequestResponseList; - const backupCache = [...cache$1]; - const addedItems = []; - const resultList = []; - try { - for (const operation of operations) { - if (operation.type !== "delete" && operation.type !== "put") throw webidl$7.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "operation type does not match \"delete\" or \"put\"" - }); - if (operation.type === "delete" && operation.response != null) throw webidl$7.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "delete operation should not have an associated response" - }); - if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); - let requestResponses; - if (operation.type === "delete") { - requestResponses = this.#queryCache(operation.request, operation.options); - if (requestResponses.length === 0) return []; - for (const requestResponse of requestResponses) { - const idx = cache$1.indexOf(requestResponse); - assert$3(idx !== -1); - cache$1.splice(idx, 1); - } - } else if (operation.type === "put") { - if (operation.response == null) throw webidl$7.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "put operation should have an associated response" - }); - const r = operation.request; - if (!urlIsHttpHttpsScheme(r.url)) throw webidl$7.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "expected http or https scheme" - }); - if (r.method !== "GET") throw webidl$7.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "not get method" - }); - if (operation.options != null) throw webidl$7.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "options must not be defined" - }); - requestResponses = this.#queryCache(operation.request); - for (const requestResponse of requestResponses) { - const idx = cache$1.indexOf(requestResponse); - assert$3(idx !== -1); - cache$1.splice(idx, 1); - } - cache$1.push([operation.request, operation.response]); - addedItems.push([operation.request, operation.response]); - } - resultList.push([operation.request, operation.response]); - } - return resultList; - } catch (e) { - this.#relevantRequestResponseList.length = 0; - this.#relevantRequestResponseList = backupCache; - throw e; - } - } - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache(requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = []; - const storage = targetStorage ?? this.#relevantRequestResponseList; - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse; - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); - } - return resultList; - } - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem(requestQuery, request$1, response = null, options) { - const queryURL = new URL(requestQuery.url); - const cachedURL = new URL(request$1.url); - if (options?.ignoreSearch) { - cachedURL.search = ""; - queryURL.search = ""; - } - if (!urlEquals(queryURL, cachedURL, true)) return false; - if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; - const fieldValues = getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues) { - if (fieldValue === "*") return false; - const requestValue = request$1.headersList.get(fieldValue); - const queryValue = requestQuery.headersList.get(fieldValue); - if (requestValue !== queryValue) return false; - } - return true; - } - #internalMatchAll(request$1, options, maxResponses = Infinity) { - let r = null; - if (request$1 !== void 0) { - if (webidl$7.is.Request(request$1)) { - r = getRequestState(request$1); - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$1 === "string") r = getRequestState(new Request(request$1)); - } - const responses = []; - if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); - else { - const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) responses.push(requestResponse[1]); - } - const responseList = []; - for (const response of responses) { - const responseObject = fromInnerResponse(response, "immutable"); - responseList.push(responseObject.clone()); - if (responseList.length >= maxResponses) break; - } - return Object.freeze(responseList); - } - }; - Object.defineProperties(Cache$1.prototype, { - [Symbol.toStringTag]: { - value: "Cache", - configurable: true - }, - match: kEnumerableProperty$6, - matchAll: kEnumerableProperty$6, - add: kEnumerableProperty$6, - addAll: kEnumerableProperty$6, - put: kEnumerableProperty$6, - delete: kEnumerableProperty$6, - keys: kEnumerableProperty$6 - }); - const cacheQueryOptionConverters = [ - { - key: "ignoreSearch", - converter: webidl$7.converters.boolean, - defaultValue: () => false - }, - { - key: "ignoreMethod", - converter: webidl$7.converters.boolean, - defaultValue: () => false - }, - { - key: "ignoreVary", - converter: webidl$7.converters.boolean, - defaultValue: () => false - } - ]; - webidl$7.converters.CacheQueryOptions = webidl$7.dictionaryConverter(cacheQueryOptionConverters); - webidl$7.converters.MultiCacheQueryOptions = webidl$7.dictionaryConverter([...cacheQueryOptionConverters, { - key: "cacheName", - converter: webidl$7.converters.DOMString - }]); - webidl$7.converters.Response = webidl$7.interfaceConverter(webidl$7.is.Response, "Response"); - webidl$7.converters["sequence"] = webidl$7.sequenceConverter(webidl$7.converters.RequestInfo); - module.exports = { Cache: Cache$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cache/cachestorage.js -var require_cachestorage = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cache/cachestorage.js"(exports, module) { - const { Cache } = require_cache(); - const { webidl: webidl$6 } = require_webidl(); - const { kEnumerableProperty: kEnumerableProperty$5 } = require_util$5(); - const { kConstruct: kConstruct$3 } = require_symbols(); - var CacheStorage$1 = class CacheStorage$1 { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has(cacheName) { - webidl$6.brandCheck(this, CacheStorage$1); - const prefix = "CacheStorage.has"; - webidl$6.argumentLengthCheck(arguments, 1, prefix); - cacheName = webidl$6.converters.DOMString(cacheName, prefix, "cacheName"); - return this.#caches.has(cacheName); - } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open(cacheName) { - webidl$6.brandCheck(this, CacheStorage$1); - const prefix = "CacheStorage.open"; - webidl$6.argumentLengthCheck(arguments, 1, prefix); - cacheName = webidl$6.converters.DOMString(cacheName, prefix, "cacheName"); - if (this.#caches.has(cacheName)) { - const cache$2 = this.#caches.get(cacheName); - return new Cache(kConstruct$3, cache$2); - } - const cache$1 = []; - this.#caches.set(cacheName, cache$1); - return new Cache(kConstruct$3, cache$1); - } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete(cacheName) { - webidl$6.brandCheck(this, CacheStorage$1); - const prefix = "CacheStorage.delete"; - webidl$6.argumentLengthCheck(arguments, 1, prefix); - cacheName = webidl$6.converters.DOMString(cacheName, prefix, "cacheName"); - return this.#caches.delete(cacheName); - } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {Promise} - */ - async keys() { - webidl$6.brandCheck(this, CacheStorage$1); - const keys = this.#caches.keys(); - return [...keys]; - } - }; - Object.defineProperties(CacheStorage$1.prototype, { - [Symbol.toStringTag]: { - value: "CacheStorage", - configurable: true - }, - match: kEnumerableProperty$5, - has: kEnumerableProperty$5, - open: kEnumerableProperty$5, - delete: kEnumerableProperty$5, - keys: kEnumerableProperty$5 - }); - module.exports = { CacheStorage: CacheStorage$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/constants.js -var require_constants$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/constants.js"(exports, module) { - const maxAttributeValueSize$1 = 1024; - const maxNameValuePairSize$1 = 4096; - module.exports = { - maxAttributeValueSize: maxAttributeValueSize$1, - maxNameValuePairSize: maxNameValuePairSize$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/util.js -var require_util$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/util.js"(exports, module) { - /** - * @param {string} value - * @returns {boolean} - */ - function isCTLExcludingHtab$1(value) { - for (let i = 0; i < value.length; ++i) { - const code = value.charCodeAt(i); - if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; - } - return false; - } - /** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ - function validateCookieName(name) { - for (let i = 0; i < name.length; ++i) { - const code = name.charCodeAt(i); - if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); - } - } - /** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ - function validateCookieValue(value) { - let len = value.length; - let i = 0; - if (value[0] === "\"") { - if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); - --len; - ++i; - } - while (i < len) { - const code = value.charCodeAt(i++); - if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); - } - } - /** - * path-value = - * @param {string} path - */ - function validateCookiePath(path$3) { - for (let i = 0; i < path$3.length; ++i) { - const code = path$3.charCodeAt(i); - if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); - } - } - /** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ - function validateCookieDomain(domain) { - if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); - } - const IMFDays = [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ]; - const IMFMonths = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ]; - const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); - /** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ - function toIMFDate(date) { - if (typeof date === "number") date = new Date(date); - return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; - } - /** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ - function validateCookieMaxAge(maxAge) { - if (maxAge < 0) throw new Error("Invalid cookie max-age"); - } - /** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ - function stringify$1(cookie) { - if (cookie.name.length === 0) return null; - validateCookieName(cookie.name); - validateCookieValue(cookie.value); - const out = [`${cookie.name}=${cookie.value}`]; - if (cookie.name.startsWith("__Secure-")) cookie.secure = true; - if (cookie.name.startsWith("__Host-")) { - cookie.secure = true; - cookie.domain = null; - cookie.path = "/"; - } - if (cookie.secure) out.push("Secure"); - if (cookie.httpOnly) out.push("HttpOnly"); - if (typeof cookie.maxAge === "number") { - validateCookieMaxAge(cookie.maxAge); - out.push(`Max-Age=${cookie.maxAge}`); - } - if (cookie.domain) { - validateCookieDomain(cookie.domain); - out.push(`Domain=${cookie.domain}`); - } - if (cookie.path) { - validateCookiePath(cookie.path); - out.push(`Path=${cookie.path}`); - } - if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); - if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); - for (const part of cookie.unparsed) { - if (!part.includes("=")) throw new Error("Invalid unparsed"); - const [key, ...value] = part.split("="); - out.push(`${key.trim()}=${value.join("=")}`); - } - return out.join("; "); - } - module.exports = { - isCTLExcludingHtab: isCTLExcludingHtab$1, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify: stringify$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/parse.js -var require_parse = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/parse.js"(exports, module) { - const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$1(); - const { isCTLExcludingHtab } = require_util$2(); - const { collectASequenceOfCodePointsFast: collectASequenceOfCodePointsFast$1 } = require_data_url(); - const assert$2 = __require("node:assert"); - const { unescape } = __require("node:querystring"); - /** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns {import('./index').Cookie|null} if the header is invalid, null will be returned - */ - function parseSetCookie$1(header) { - if (isCTLExcludingHtab(header)) return null; - let nameValuePair = ""; - let unparsedAttributes = ""; - let name = ""; - let value = ""; - if (header.includes(";")) { - const position = { position: 0 }; - nameValuePair = collectASequenceOfCodePointsFast$1(";", header, position); - unparsedAttributes = header.slice(position.position); - } else nameValuePair = header; - if (!nameValuePair.includes("=")) value = nameValuePair; - else { - const position = { position: 0 }; - name = collectASequenceOfCodePointsFast$1("=", nameValuePair, position); - value = nameValuePair.slice(position.position + 1); - } - name = name.trim(); - value = value.trim(); - if (name.length + value.length > maxNameValuePairSize) return null; - return { - name, - value: unescape(value), - ...parseUnparsedAttributes(unparsedAttributes) - }; - } - /** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {Object.} [cookieAttributeList={}] - */ - function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { - if (unparsedAttributes.length === 0) return cookieAttributeList; - assert$2(unparsedAttributes[0] === ";"); - unparsedAttributes = unparsedAttributes.slice(1); - let cookieAv = ""; - if (unparsedAttributes.includes(";")) { - cookieAv = collectASequenceOfCodePointsFast$1(";", unparsedAttributes, { position: 0 }); - unparsedAttributes = unparsedAttributes.slice(cookieAv.length); - } else { - cookieAv = unparsedAttributes; - unparsedAttributes = ""; - } - let attributeName = ""; - let attributeValue = ""; - if (cookieAv.includes("=")) { - const position = { position: 0 }; - attributeName = collectASequenceOfCodePointsFast$1("=", cookieAv, position); - attributeValue = cookieAv.slice(position.position + 1); - } else attributeName = cookieAv; - attributeName = attributeName.trim(); - attributeValue = attributeValue.trim(); - if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - const attributeNameLowercase = attributeName.toLowerCase(); - if (attributeNameLowercase === "expires") { - const expiryTime = new Date(attributeValue); - cookieAttributeList.expires = expiryTime; - } else if (attributeNameLowercase === "max-age") { - const charCode = attributeValue.charCodeAt(0); - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - const deltaSeconds = Number(attributeValue); - cookieAttributeList.maxAge = deltaSeconds; - } else if (attributeNameLowercase === "domain") { - let cookieDomain = attributeValue; - if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); - cookieDomain = cookieDomain.toLowerCase(); - cookieAttributeList.domain = cookieDomain; - } else if (attributeNameLowercase === "path") { - let cookiePath = ""; - if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; - else cookiePath = attributeValue; - cookieAttributeList.path = cookiePath; - } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; - else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; - else if (attributeNameLowercase === "samesite") { - let enforcement = "Default"; - const attributeValueLowercase = attributeValue.toLowerCase(); - if (attributeValueLowercase.includes("none")) enforcement = "None"; - if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; - if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; - cookieAttributeList.sameSite = enforcement; - } else { - cookieAttributeList.unparsed ??= []; - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); - } - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - } - module.exports = { - parseSetCookie: parseSetCookie$1, - parseUnparsedAttributes - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/index.js -var require_cookies = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/cookies/index.js"(exports, module) { - const { parseSetCookie } = require_parse(); - const { stringify } = require_util$2(); - const { webidl: webidl$5 } = require_webidl(); - const { Headers: Headers$1 } = require_headers(); - const brandChecks = webidl$5.brandCheckMultiple([Headers$1, globalThis.Headers].filter(Boolean)); - /** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number} [expires] - * @property {number} [maxAge] - * @property {string} [domain] - * @property {string} [path] - * @property {boolean} [secure] - * @property {boolean} [httpOnly] - * @property {'Strict'|'Lax'|'None'} [sameSite] - * @property {string[]} [unparsed] - */ - /** - * @param {Headers} headers - * @returns {Record} - */ - function getCookies$1(headers) { - webidl$5.argumentLengthCheck(arguments, 1, "getCookies"); - brandChecks(headers); - const cookie = headers.get("cookie"); - /** @type {Record} */ - const out = {}; - if (!cookie) return out; - for (const piece of cookie.split(";")) { - const [name, ...value] = piece.split("="); - out[name.trim()] = value.join("="); - } - return out; - } - /** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ - function deleteCookie$1(headers, name, attributes) { - brandChecks(headers); - const prefix = "deleteCookie"; - webidl$5.argumentLengthCheck(arguments, 2, prefix); - name = webidl$5.converters.DOMString(name, prefix, "name"); - attributes = webidl$5.converters.DeleteCookieAttributes(attributes); - setCookie$1(headers, { - name, - value: "", - expires: new Date(0), - ...attributes - }); - } - /** - * @param {Headers} headers - * @returns {Cookie[]} - */ - function getSetCookies$1(headers) { - webidl$5.argumentLengthCheck(arguments, 1, "getSetCookies"); - brandChecks(headers); - const cookies = headers.getSetCookie(); - if (!cookies) return []; - return cookies.map((pair) => parseSetCookie(pair)); - } - /** - * Parses a cookie string - * @param {string} cookie - */ - function parseCookie$1(cookie) { - cookie = webidl$5.converters.DOMString(cookie); - return parseSetCookie(cookie); - } - /** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ - function setCookie$1(headers, cookie) { - webidl$5.argumentLengthCheck(arguments, 2, "setCookie"); - brandChecks(headers); - cookie = webidl$5.converters.Cookie(cookie); - const str = stringify(cookie); - if (str) headers.append("set-cookie", str, true); - } - webidl$5.converters.DeleteCookieAttributes = webidl$5.dictionaryConverter([{ - converter: webidl$5.nullableConverter(webidl$5.converters.DOMString), - key: "path", - defaultValue: () => null - }, { - converter: webidl$5.nullableConverter(webidl$5.converters.DOMString), - key: "domain", - defaultValue: () => null - }]); - webidl$5.converters.Cookie = webidl$5.dictionaryConverter([ - { - converter: webidl$5.converters.DOMString, - key: "name" - }, - { - converter: webidl$5.converters.DOMString, - key: "value" - }, - { - converter: webidl$5.nullableConverter((value) => { - if (typeof value === "number") return webidl$5.converters["unsigned long long"](value); - return new Date(value); - }), - key: "expires", - defaultValue: () => null - }, - { - converter: webidl$5.nullableConverter(webidl$5.converters["long long"]), - key: "maxAge", - defaultValue: () => null - }, - { - converter: webidl$5.nullableConverter(webidl$5.converters.DOMString), - key: "domain", - defaultValue: () => null - }, - { - converter: webidl$5.nullableConverter(webidl$5.converters.DOMString), - key: "path", - defaultValue: () => null - }, - { - converter: webidl$5.nullableConverter(webidl$5.converters.boolean), - key: "secure", - defaultValue: () => null - }, - { - converter: webidl$5.nullableConverter(webidl$5.converters.boolean), - key: "httpOnly", - defaultValue: () => null - }, - { - converter: webidl$5.converters.USVString, - key: "sameSite", - allowedValues: [ - "Strict", - "Lax", - "None" - ] - }, - { - converter: webidl$5.sequenceConverter(webidl$5.converters.DOMString), - key: "unparsed", - defaultValue: () => new Array(0) - } - ]); - module.exports = { - getCookies: getCookies$1, - deleteCookie: deleteCookie$1, - getSetCookies: getSetCookies$1, - setCookie: setCookie$1, - parseCookie: parseCookie$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/events.js -var require_events = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/events.js"(exports, module) { - const { webidl: webidl$4 } = require_webidl(); - const { kEnumerableProperty: kEnumerableProperty$4 } = require_util$5(); - const { kConstruct: kConstruct$2 } = require_symbols(); - /** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ - var MessageEvent$1 = class MessageEvent$1 extends Event { - #eventInit; - constructor(type, eventInitDict = {}) { - if (type === kConstruct$2) { - super(arguments[1], arguments[2]); - webidl$4.util.markAsUncloneable(this); - return; - } - const prefix = "MessageEvent constructor"; - webidl$4.argumentLengthCheck(arguments, 1, prefix); - type = webidl$4.converters.DOMString(type, prefix, "type"); - eventInitDict = webidl$4.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); - super(type, eventInitDict); - this.#eventInit = eventInitDict; - webidl$4.util.markAsUncloneable(this); - } - get data() { - webidl$4.brandCheck(this, MessageEvent$1); - return this.#eventInit.data; - } - get origin() { - webidl$4.brandCheck(this, MessageEvent$1); - return this.#eventInit.origin; - } - get lastEventId() { - webidl$4.brandCheck(this, MessageEvent$1); - return this.#eventInit.lastEventId; - } - get source() { - webidl$4.brandCheck(this, MessageEvent$1); - return this.#eventInit.source; - } - get ports() { - webidl$4.brandCheck(this, MessageEvent$1); - if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); - return this.#eventInit.ports; - } - initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { - webidl$4.brandCheck(this, MessageEvent$1); - webidl$4.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); - return new MessageEvent$1(type, { - bubbles, - cancelable, - data, - origin, - lastEventId, - source, - ports - }); - } - static createFastMessageEvent(type, init) { - const messageEvent = new MessageEvent$1(kConstruct$2, type, init); - messageEvent.#eventInit = init; - messageEvent.#eventInit.data ??= null; - messageEvent.#eventInit.origin ??= ""; - messageEvent.#eventInit.lastEventId ??= ""; - messageEvent.#eventInit.source ??= null; - messageEvent.#eventInit.ports ??= []; - return messageEvent; - } - }; - const { createFastMessageEvent: createFastMessageEvent$2 } = MessageEvent$1; - delete MessageEvent$1.createFastMessageEvent; - /** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ - var CloseEvent$2 = class CloseEvent$2 extends Event { - #eventInit; - constructor(type, eventInitDict = {}) { - const prefix = "CloseEvent constructor"; - webidl$4.argumentLengthCheck(arguments, 1, prefix); - type = webidl$4.converters.DOMString(type, prefix, "type"); - eventInitDict = webidl$4.converters.CloseEventInit(eventInitDict); - super(type, eventInitDict); - this.#eventInit = eventInitDict; - webidl$4.util.markAsUncloneable(this); - } - get wasClean() { - webidl$4.brandCheck(this, CloseEvent$2); - return this.#eventInit.wasClean; - } - get code() { - webidl$4.brandCheck(this, CloseEvent$2); - return this.#eventInit.code; - } - get reason() { - webidl$4.brandCheck(this, CloseEvent$2); - return this.#eventInit.reason; - } - }; - var ErrorEvent$2 = class ErrorEvent$2 extends Event { - #eventInit; - constructor(type, eventInitDict) { - const prefix = "ErrorEvent constructor"; - webidl$4.argumentLengthCheck(arguments, 1, prefix); - super(type, eventInitDict); - webidl$4.util.markAsUncloneable(this); - type = webidl$4.converters.DOMString(type, prefix, "type"); - eventInitDict = webidl$4.converters.ErrorEventInit(eventInitDict ?? {}); - this.#eventInit = eventInitDict; - } - get message() { - webidl$4.brandCheck(this, ErrorEvent$2); - return this.#eventInit.message; - } - get filename() { - webidl$4.brandCheck(this, ErrorEvent$2); - return this.#eventInit.filename; - } - get lineno() { - webidl$4.brandCheck(this, ErrorEvent$2); - return this.#eventInit.lineno; - } - get colno() { - webidl$4.brandCheck(this, ErrorEvent$2); - return this.#eventInit.colno; - } - get error() { - webidl$4.brandCheck(this, ErrorEvent$2); - return this.#eventInit.error; - } - }; - Object.defineProperties(MessageEvent$1.prototype, { - [Symbol.toStringTag]: { - value: "MessageEvent", - configurable: true - }, - data: kEnumerableProperty$4, - origin: kEnumerableProperty$4, - lastEventId: kEnumerableProperty$4, - source: kEnumerableProperty$4, - ports: kEnumerableProperty$4, - initMessageEvent: kEnumerableProperty$4 - }); - Object.defineProperties(CloseEvent$2.prototype, { - [Symbol.toStringTag]: { - value: "CloseEvent", - configurable: true - }, - reason: kEnumerableProperty$4, - code: kEnumerableProperty$4, - wasClean: kEnumerableProperty$4 - }); - Object.defineProperties(ErrorEvent$2.prototype, { - [Symbol.toStringTag]: { - value: "ErrorEvent", - configurable: true - }, - message: kEnumerableProperty$4, - filename: kEnumerableProperty$4, - lineno: kEnumerableProperty$4, - colno: kEnumerableProperty$4, - error: kEnumerableProperty$4 - }); - webidl$4.converters.MessagePort = webidl$4.interfaceConverter(webidl$4.is.MessagePort, "MessagePort"); - webidl$4.converters["sequence"] = webidl$4.sequenceConverter(webidl$4.converters.MessagePort); - const eventInit = [ - { - key: "bubbles", - converter: webidl$4.converters.boolean, - defaultValue: () => false - }, - { - key: "cancelable", - converter: webidl$4.converters.boolean, - defaultValue: () => false - }, - { - key: "composed", - converter: webidl$4.converters.boolean, - defaultValue: () => false - } - ]; - webidl$4.converters.MessageEventInit = webidl$4.dictionaryConverter([ - ...eventInit, - { - key: "data", - converter: webidl$4.converters.any, - defaultValue: () => null - }, - { - key: "origin", - converter: webidl$4.converters.USVString, - defaultValue: () => "" - }, - { - key: "lastEventId", - converter: webidl$4.converters.DOMString, - defaultValue: () => "" - }, - { - key: "source", - converter: webidl$4.nullableConverter(webidl$4.converters.MessagePort), - defaultValue: () => null - }, - { - key: "ports", - converter: webidl$4.converters["sequence"], - defaultValue: () => new Array(0) - } - ]); - webidl$4.converters.CloseEventInit = webidl$4.dictionaryConverter([ - ...eventInit, - { - key: "wasClean", - converter: webidl$4.converters.boolean, - defaultValue: () => false - }, - { - key: "code", - converter: webidl$4.converters["unsigned short"], - defaultValue: () => 0 - }, - { - key: "reason", - converter: webidl$4.converters.USVString, - defaultValue: () => "" - } - ]); - webidl$4.converters.ErrorEventInit = webidl$4.dictionaryConverter([ - ...eventInit, - { - key: "message", - converter: webidl$4.converters.DOMString, - defaultValue: () => "" - }, - { - key: "filename", - converter: webidl$4.converters.USVString, - defaultValue: () => "" - }, - { - key: "lineno", - converter: webidl$4.converters["unsigned long"], - defaultValue: () => 0 - }, - { - key: "colno", - converter: webidl$4.converters["unsigned long"], - defaultValue: () => 0 - }, - { - key: "error", - converter: webidl$4.converters.any - } - ]); - module.exports = { - MessageEvent: MessageEvent$1, - CloseEvent: CloseEvent$2, - ErrorEvent: ErrorEvent$2, - createFastMessageEvent: createFastMessageEvent$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/constants.js -var require_constants = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/constants.js"(exports, module) { - /** - * This is a Globally Unique Identifier unique used to validate that the - * endpoint accepts websocket connections. - * @see https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 - * @type {'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'} - */ - const uid$1 = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; - /** - * @type {PropertyDescriptor} - */ - const staticPropertyDescriptors$1 = { - enumerable: true, - writable: false, - configurable: false - }; - /** - * The states of the WebSocket connection. - * - * @readonly - * @enum - * @property {0} CONNECTING - * @property {1} OPEN - * @property {2} CLOSING - * @property {3} CLOSED - */ - const states$5 = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 - }; - /** - * @readonly - * @enum - * @property {0} NOT_SENT - * @property {1} PROCESSING - * @property {2} SENT - */ - const sentCloseFrameState$4 = { - SENT: 1, - RECEIVED: 2 - }; - /** - * The WebSocket opcodes. - * - * @readonly - * @enum - * @property {0x0} CONTINUATION - * @property {0x1} TEXT - * @property {0x2} BINARY - * @property {0x8} CLOSE - * @property {0x9} PING - * @property {0xA} PONG - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - */ - const opcodes$7 = { - CONTINUATION: 0, - TEXT: 1, - BINARY: 2, - CLOSE: 8, - PING: 9, - PONG: 10 - }; - /** - * The maximum value for an unsigned 16-bit integer. - * - * @type {65535} 2 ** 16 - 1 - */ - const maxUnsigned16Bit$1 = 65535; - /** - * The states of the parser. - * - * @readonly - * @enum - * @property {0} INFO - * @property {2} PAYLOADLENGTH_16 - * @property {3} PAYLOADLENGTH_64 - * @property {4} READ_DATA - */ - const parserStates$1 = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 - }; - /** - * An empty buffer. - * - * @type {Buffer} - */ - const emptyBuffer$2 = Buffer.allocUnsafe(0); - /** - * @readonly - * @property {1} text - * @property {2} typedArray - * @property {3} arrayBuffer - * @property {4} blob - */ - const sendHints$2 = { - text: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 - }; - module.exports = { - uid: uid$1, - sentCloseFrameState: sentCloseFrameState$4, - staticPropertyDescriptors: staticPropertyDescriptors$1, - states: states$5, - opcodes: opcodes$7, - maxUnsigned16Bit: maxUnsigned16Bit$1, - parserStates: parserStates$1, - emptyBuffer: emptyBuffer$2, - sendHints: sendHints$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/util.js -var require_util$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/util.js"(exports, module) { - const { states: states$4, opcodes: opcodes$6 } = require_constants(); - const { isUtf8 } = __require("node:buffer"); - const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); - /** - * @param {number} readyState - * @returns {boolean} - */ - function isConnecting$1(readyState) { - return readyState === states$4.CONNECTING; - } - /** - * @param {number} readyState - * @returns {boolean} - */ - function isEstablished$3(readyState) { - return readyState === states$4.OPEN; - } - /** - * @param {number} readyState - * @returns {boolean} - */ - function isClosing$2(readyState) { - return readyState === states$4.CLOSING; - } - /** - * @param {number} readyState - * @returns {boolean} - */ - function isClosed$1(readyState) { - return readyState === states$4.CLOSED; - } - /** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {(...args: ConstructorParameters) => Event} eventFactory - * @param {EventInit | undefined} eventInitDict - * @returns {void} - */ - function fireEvent$1(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { - const event = eventFactory(e, eventInitDict); - target.dispatchEvent(event); - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').Handler} handler - * @param {number} type Opcode - * @param {Buffer} data application data - * @returns {void} - */ - function websocketMessageReceived$1(handler, type, data) { - handler.onMessage(type, data); - } - /** - * @param {Buffer} buffer - * @returns {ArrayBuffer} - */ - function toArrayBuffer$1(buffer$1) { - if (buffer$1.byteLength === buffer$1.buffer.byteLength) return buffer$1.buffer; - return new Uint8Array(buffer$1).buffer; - } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - * @returns {boolean} - */ - function isValidSubprotocol$2(protocol) { - if (protocol.length === 0) return false; - for (let i = 0; i < protocol.length; ++i) { - const code = protocol.charCodeAt(i); - if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; - } - return true; - } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - * @returns {boolean} - */ - function isValidStatusCode$1(code) { - if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; - return code >= 3e3 && code <= 4999; - } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - * @returns {boolean} - */ - function isControlFrame$1(opcode) { - return opcode === opcodes$6.CLOSE || opcode === opcodes$6.PING || opcode === opcodes$6.PONG; - } - /** - * @param {number} opcode - * @returns {boolean} - */ - function isContinuationFrame$1(opcode) { - return opcode === opcodes$6.CONTINUATION; - } - /** - * @param {number} opcode - * @returns {boolean} - */ - function isTextBinaryFrame$1(opcode) { - return opcode === opcodes$6.TEXT || opcode === opcodes$6.BINARY; - } - /** - * - * @param {number} opcode - * @returns {boolean} - */ - function isValidOpcode$1(opcode) { - return isTextBinaryFrame$1(opcode) || isContinuationFrame$1(opcode) || isControlFrame$1(opcode); - } - /** - * Parses a Sec-WebSocket-Extensions header value. - * @param {string} extensions - * @returns {Map} - */ - function parseExtensions$1(extensions) { - const position = { position: 0 }; - const extensionList = new Map(); - while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(";", extensions, position); - const [name, value = ""] = pair.split("=", 2); - extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); - position.position++; - } - return extensionList; - } - /** - * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 - * @description "client-max-window-bits = 1*DIGIT" - * @param {string} value - * @returns {boolean} - */ - function isValidClientWindowBits$1(value) { - for (let i = 0; i < value.length; i++) { - const byte = value.charCodeAt(i); - if (byte < 48 || byte > 57) return false; - } - return true; - } - /** - * @see https://whatpr.org/websockets/48/7b748d3...d5570f3.html#get-a-url-record - * @param {string} url - * @param {string} [baseURL] - */ - function getURLRecord$2(url, baseURL) { - let urlRecord; - try { - urlRecord = new URL(url, baseURL); - } catch (e) { - throw new DOMException(e, "SyntaxError"); - } - if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; - else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; - if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException("expected a ws: or wss: url", "SyntaxError"); - if (urlRecord.hash.length || urlRecord.href.endsWith("#")) throw new DOMException("hash", "SyntaxError"); - return urlRecord; - } - function validateCloseCodeAndReason$2(code, reason) { - if (code !== null) { - if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); - } - if (reason !== null) { - const reasonBytesLength = Buffer.byteLength(reason); - if (reasonBytesLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, "SyntaxError"); - } - } - /** - * Converts a Buffer to utf-8, even on platforms without icu. - * @type {(buffer: Buffer) => string} - */ - const utf8Decode$3 = (() => { - if (typeof process.versions.icu === "string") { - const fatalDecoder = new TextDecoder("utf-8", { fatal: true }); - return fatalDecoder.decode.bind(fatalDecoder); - } - return function(buffer$1) { - if (isUtf8(buffer$1)) return buffer$1.toString("utf-8"); - throw new TypeError("Invalid utf-8 received."); - }; - })(); - module.exports = { - isConnecting: isConnecting$1, - isEstablished: isEstablished$3, - isClosing: isClosing$2, - isClosed: isClosed$1, - fireEvent: fireEvent$1, - isValidSubprotocol: isValidSubprotocol$2, - isValidStatusCode: isValidStatusCode$1, - websocketMessageReceived: websocketMessageReceived$1, - utf8Decode: utf8Decode$3, - isControlFrame: isControlFrame$1, - isContinuationFrame: isContinuationFrame$1, - isTextBinaryFrame: isTextBinaryFrame$1, - isValidOpcode: isValidOpcode$1, - parseExtensions: parseExtensions$1, - isValidClientWindowBits: isValidClientWindowBits$1, - toArrayBuffer: toArrayBuffer$1, - getURLRecord: getURLRecord$2, - validateCloseCodeAndReason: validateCloseCodeAndReason$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/frame.js -var require_frame = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/frame.js"(exports, module) { - const { maxUnsigned16Bit, opcodes: opcodes$5 } = require_constants(); - const BUFFER_SIZE = 8 * 1024; - /** @type {import('crypto')} */ - let crypto$2; - let buffer = null; - let bufIdx = BUFFER_SIZE; - try { - crypto$2 = __require("node:crypto"); - } catch { - crypto$2 = { randomFillSync: function randomFillSync(buffer$1, _offset, _size) { - for (let i = 0; i < buffer$1.length; ++i) buffer$1[i] = Math.random() * 255 | 0; - return buffer$1; - } }; - } - function generateMask() { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0; - crypto$2.randomFillSync(buffer ??= Buffer.allocUnsafeSlow(BUFFER_SIZE), 0, BUFFER_SIZE); - } - return [ - buffer[bufIdx++], - buffer[bufIdx++], - buffer[bufIdx++], - buffer[bufIdx++] - ]; - } - var WebsocketFrameSend$4 = class { - /** - * @param {Buffer|undefined} data - */ - constructor(data) { - this.frameData = data; - } - createFrame(opcode) { - const frameData = this.frameData; - const maskKey = generateMask(); - const bodyLength$1 = frameData?.byteLength ?? 0; - /** @type {number} */ - let payloadLength = bodyLength$1; - let offset = 6; - if (bodyLength$1 > maxUnsigned16Bit) { - offset += 8; - payloadLength = 127; - } else if (bodyLength$1 > 125) { - offset += 2; - payloadLength = 126; - } - const buffer$1 = Buffer.allocUnsafe(bodyLength$1 + offset); - buffer$1[0] = buffer$1[1] = 0; - buffer$1[0] |= 128; - buffer$1[0] = (buffer$1[0] & 240) + opcode; - /*! ws. MIT License. Einar Otto Stangvik */ - buffer$1[offset - 4] = maskKey[0]; - buffer$1[offset - 3] = maskKey[1]; - buffer$1[offset - 2] = maskKey[2]; - buffer$1[offset - 1] = maskKey[3]; - buffer$1[1] = payloadLength; - if (payloadLength === 126) buffer$1.writeUInt16BE(bodyLength$1, 2); - else if (payloadLength === 127) { - buffer$1[2] = buffer$1[3] = 0; - buffer$1.writeUIntBE(bodyLength$1, 4, 6); - } - buffer$1[1] |= 128; - for (let i = 0; i < bodyLength$1; ++i) buffer$1[offset + i] = frameData[i] ^ maskKey[i & 3]; - return buffer$1; - } - /** - * @param {Uint8Array} buffer - */ - static createFastTextFrame(buffer$1) { - const maskKey = generateMask(); - const bodyLength$1 = buffer$1.length; - for (let i = 0; i < bodyLength$1; ++i) buffer$1[i] ^= maskKey[i & 3]; - let payloadLength = bodyLength$1; - let offset = 6; - if (bodyLength$1 > maxUnsigned16Bit) { - offset += 8; - payloadLength = 127; - } else if (bodyLength$1 > 125) { - offset += 2; - payloadLength = 126; - } - const head = Buffer.allocUnsafeSlow(offset); - head[0] = 128 | opcodes$5.TEXT; - head[1] = payloadLength | 128; - head[offset - 4] = maskKey[0]; - head[offset - 3] = maskKey[1]; - head[offset - 2] = maskKey[2]; - head[offset - 1] = maskKey[3]; - if (payloadLength === 126) head.writeUInt16BE(bodyLength$1, 2); - else if (payloadLength === 127) { - head[2] = head[3] = 0; - head.writeUIntBE(bodyLength$1, 4, 6); - } - return [head, buffer$1]; - } - }; - module.exports = { WebsocketFrameSend: WebsocketFrameSend$4 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/connection.js -var require_connection = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/connection.js"(exports, module) { - const { uid, states: states$3, sentCloseFrameState: sentCloseFrameState$3, emptyBuffer: emptyBuffer$1, opcodes: opcodes$4 } = require_constants(); - const { parseExtensions, isClosed, isClosing: isClosing$1, isEstablished: isEstablished$2, validateCloseCodeAndReason: validateCloseCodeAndReason$1 } = require_util$1(); - const { channels: channels$3 } = require_diagnostics(); - const { makeRequest: makeRequest$1 } = require_request(); - const { fetching: fetching$1 } = require_fetch(); - const { Headers, getHeadersList } = require_headers(); - const { getDecodeSplit } = require_util$4(); - const { WebsocketFrameSend: WebsocketFrameSend$3 } = require_frame(); - const assert$1 = __require("node:assert"); - /** @type {import('crypto')} */ - let crypto$1; - try { - crypto$1 = __require("node:crypto"); - } catch {} - /** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').Handler} handler - * @param {Partial} options - */ - function establishWebSocketConnection$2(url, protocols, client, handler, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; - const request$1 = makeRequest$1({ - urlList: [requestURL], - client, - serviceWorkers: "none", - referrer: "no-referrer", - mode: "websocket", - credentials: "include", - cache: "no-store", - redirect: "error" - }); - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)); - request$1.headersList = headersList; - } - const keyValue = crypto$1.randomBytes(16).toString("base64"); - request$1.headersList.append("sec-websocket-key", keyValue, true); - request$1.headersList.append("sec-websocket-version", "13", true); - for (const protocol of protocols) request$1.headersList.append("sec-websocket-protocol", protocol, true); - const permessageDeflate = "permessage-deflate; client_max_window_bits"; - request$1.headersList.append("sec-websocket-extensions", permessageDeflate, true); - const controller = fetching$1({ - request: request$1, - useParallelQueue: true, - dispatcher: options.dispatcher, - processResponse(response) { - if (response.type === "error") handler.readyState = states$3.CLOSED; - if (response.type === "error" || response.status !== 101) { - failWebsocketConnection$3(handler, 1002, "Received network error or non-101 status code."); - return; - } - if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { - failWebsocketConnection$3(handler, 1002, "Server did not respond with sent protocols."); - return; - } - if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { - failWebsocketConnection$3(handler, 1002, "Server did not set Upgrade header to \"websocket\"."); - return; - } - if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { - failWebsocketConnection$3(handler, 1002, "Server did not set Connection header to \"upgrade\"."); - return; - } - const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto$1.createHash("sha1").update(keyValue + uid).digest("base64"); - if (secWSAccept !== digest) { - failWebsocketConnection$3(handler, 1002, "Incorrect hash received in Sec-WebSocket-Accept header."); - return; - } - const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); - let extensions; - if (secExtension !== null) { - extensions = parseExtensions(secExtension); - if (!extensions.has("permessage-deflate")) { - failWebsocketConnection$3(handler, 1002, "Sec-WebSocket-Extensions header does not match."); - return; - } - } - const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); - if (secProtocol !== null) { - const requestProtocols = getDecodeSplit("sec-websocket-protocol", request$1.headersList); - if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection$3(handler, 1002, "Protocol was not set in the opening handshake."); - return; - } - } - response.socket.on("data", handler.onSocketData); - response.socket.on("close", handler.onSocketClose); - response.socket.on("error", handler.onSocketError); - if (channels$3.open.hasSubscribers) channels$3.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }); - handler.wasEverConnected = true; - handler.onConnectionEstablished(response, extensions); - } - }); - return controller; - } - /** - * @see https://whatpr.org/websockets/48.html#close-the-websocket - * @param {import('./websocket').Handler} object - * @param {number} [code=null] - * @param {string} [reason=''] - */ - function closeWebSocketConnection$2(object, code, reason, validate = false) { - code ??= null; - reason ??= ""; - if (validate) validateCloseCodeAndReason$1(code, reason); - if (isClosed(object.readyState) || isClosing$1(object.readyState)) {} else if (!isEstablished$2(object.readyState)) { - failWebsocketConnection$3(object); - object.readyState = states$3.CLOSING; - } else if (!object.closeState.has(sentCloseFrameState$3.SENT) && !object.closeState.has(sentCloseFrameState$3.RECEIVED)) { - const frame = new WebsocketFrameSend$3(); - if (reason.length !== 0 && code === null) code = 1e3; - assert$1(code === null || Number.isInteger(code)); - if (code === null && reason.length === 0) frame.frameData = emptyBuffer$1; - else if (code !== null && reason === null) { - frame.frameData = Buffer.allocUnsafe(2); - frame.frameData.writeUInt16BE(code, 0); - } else if (code !== null && reason !== null) { - frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason)); - frame.frameData.writeUInt16BE(code, 0); - frame.frameData.write(reason, 2, "utf-8"); - } else frame.frameData = emptyBuffer$1; - object.socket.write(frame.createFrame(opcodes$4.CLOSE)); - object.closeState.add(sentCloseFrameState$3.SENT); - object.readyState = states$3.CLOSING; - } else object.readyState = states$3.CLOSING; - } - /** - * @param {import('./websocket').Handler} handler - * @param {number} code - * @param {string|undefined} reason - * @returns {void} - */ - function failWebsocketConnection$3(handler, code, reason) { - if (isEstablished$2(handler.readyState)) closeWebSocketConnection$2(handler, code, reason, false); - handler.controller.abort(); - if (handler.socket?.destroyed === false) handler.socket.destroy(); - handler.onFail(code, reason); - } - module.exports = { - establishWebSocketConnection: establishWebSocketConnection$2, - failWebsocketConnection: failWebsocketConnection$3, - closeWebSocketConnection: closeWebSocketConnection$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/permessage-deflate.js -var require_permessage_deflate = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module) { - const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); - const { isValidClientWindowBits } = require_util$1(); - const tail = Buffer.from([ - 0, - 0, - 255, - 255 - ]); - const kBuffer = Symbol("kBuffer"); - const kLength = Symbol("kLength"); - var PerMessageDeflate$1 = class { - /** @type {import('node:zlib').InflateRaw} */ - #inflate; - #options = {}; - constructor(extensions) { - this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); - this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); - } - decompress(chunk, fin, callback) { - if (!this.#inflate) { - let windowBits = Z_DEFAULT_WINDOWBITS; - if (this.#options.serverMaxWindowBits) { - if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error("Invalid server_max_window_bits")); - return; - } - windowBits = Number.parseInt(this.#options.serverMaxWindowBits); - } - this.#inflate = createInflateRaw({ windowBits }); - this.#inflate[kBuffer] = []; - this.#inflate[kLength] = 0; - this.#inflate.on("data", (data) => { - this.#inflate[kBuffer].push(data); - this.#inflate[kLength] += data.length; - }); - this.#inflate.on("error", (err) => { - this.#inflate = null; - callback(err); - }); - } - this.#inflate.write(chunk); - if (fin) this.#inflate.write(tail); - this.#inflate.flush(() => { - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); - this.#inflate[kBuffer].length = 0; - this.#inflate[kLength] = 0; - callback(null, full); - }); - } - }; - module.exports = { PerMessageDeflate: PerMessageDeflate$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/receiver.js -var require_receiver = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/receiver.js"(exports, module) { - const { Writable } = __require("node:stream"); - const assert = __require("node:assert"); - const { parserStates, opcodes: opcodes$3, states: states$2, emptyBuffer, sentCloseFrameState: sentCloseFrameState$2 } = require_constants(); - const { channels: channels$2 } = require_diagnostics(); - const { isValidStatusCode, isValidOpcode, websocketMessageReceived, utf8Decode: utf8Decode$2, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require_util$1(); - const { failWebsocketConnection: failWebsocketConnection$2 } = require_connection(); - const { WebsocketFrameSend: WebsocketFrameSend$2 } = require_frame(); - const { PerMessageDeflate } = require_permessage_deflate(); - var ByteParser$2 = class extends Writable { - #buffers = []; - #fragmentsBytes = 0; - #byteOffset = 0; - #loop = false; - #state = parserStates.INFO; - #info = {}; - #fragments = []; - /** @type {Map} */ - #extensions; - /** @type {import('./websocket').Handler} */ - #handler; - constructor(handler, extensions) { - super(); - this.#handler = handler; - this.#extensions = extensions == null ? new Map() : extensions; - if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions)); - } - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write(chunk, _, callback) { - this.#buffers.push(chunk); - this.#byteOffset += chunk.length; - this.#loop = true; - this.run(callback); - } - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run(callback) { - while (this.#loop) if (this.#state === parserStates.INFO) { - if (this.#byteOffset < 2) return callback(); - const buffer$1 = this.consume(2); - const fin = (buffer$1[0] & 128) !== 0; - const opcode = buffer$1[0] & 15; - const masked = (buffer$1[1] & 128) === 128; - const fragmented = !fin && opcode !== opcodes$3.CONTINUATION; - const payloadLength = buffer$1[1] & 127; - const rsv1 = buffer$1[0] & 64; - const rsv2 = buffer$1[0] & 32; - const rsv3 = buffer$1[0] & 16; - if (!isValidOpcode(opcode)) { - failWebsocketConnection$2(this.#handler, 1002, "Invalid opcode received"); - return callback(); - } - if (masked) { - failWebsocketConnection$2(this.#handler, 1002, "Frame cannot be masked"); - return callback(); - } - if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { - failWebsocketConnection$2(this.#handler, 1002, "Expected RSV1 to be clear."); - return; - } - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection$2(this.#handler, 1002, "RSV1, RSV2, RSV3 must be clear"); - return; - } - if (fragmented && !isTextBinaryFrame(opcode)) { - failWebsocketConnection$2(this.#handler, 1002, "Invalid frame type was fragmented."); - return; - } - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection$2(this.#handler, 1002, "Expected continuation frame"); - return; - } - if (this.#info.fragmented && fragmented) { - failWebsocketConnection$2(this.#handler, 1002, "Fragmented frame exceeded 125 bytes."); - return; - } - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection$2(this.#handler, 1002, "Control frame either too large or fragmented"); - return; - } - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection$2(this.#handler, 1002, "Unexpected continuation frame"); - return; - } - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength; - this.#state = parserStates.READ_DATA; - } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; - else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode; - this.#info.compressed = rsv1 !== 0; - } - this.#info.opcode = opcode; - this.#info.masked = masked; - this.#info.fin = fin; - this.#info.fragmented = fragmented; - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) return callback(); - const buffer$1 = this.consume(2); - this.#info.payloadLength = buffer$1.readUInt16BE(0); - this.#state = parserStates.READ_DATA; - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) return callback(); - const buffer$1 = this.consume(8); - const upper = buffer$1.readUInt32BE(0); - if (upper > 2 ** 31 - 1) { - failWebsocketConnection$2(this.#handler, 1009, "Received payload length > 2^31 bytes."); - return; - } - const lower = buffer$1.readUInt32BE(4); - this.#info.payloadLength = (upper << 8) + lower; - this.#state = parserStates.READ_DATA; - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) return callback(); - const body = this.consume(this.#info.payloadLength); - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body); - this.#state = parserStates.INFO; - } else if (!this.#info.compressed) { - this.writeFragments(body); - if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); - this.#state = parserStates.INFO; - } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { - if (error) { - failWebsocketConnection$2(this.#handler, 1007, error.message); - return; - } - this.writeFragments(data); - if (!this.#info.fin) { - this.#state = parserStates.INFO; - this.#loop = true; - this.run(callback); - return; - } - websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); - this.#loop = true; - this.#state = parserStates.INFO; - this.run(callback); - }); - this.#loop = false; - break; - } - } - } - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer} - */ - consume(n) { - if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); - else if (n === 0) return emptyBuffer; - this.#byteOffset -= n; - const first = this.#buffers[0]; - if (first.length > n) { - this.#buffers[0] = first.subarray(n, first.length); - return first.subarray(0, n); - } else if (first.length === n) return this.#buffers.shift(); - else { - let offset = 0; - const buffer$1 = Buffer.allocUnsafeSlow(n); - while (offset !== n) { - const next = this.#buffers[0]; - const length = next.length; - if (length + offset === n) { - buffer$1.set(this.#buffers.shift(), offset); - break; - } else if (length + offset > n) { - buffer$1.set(next.subarray(0, n - offset), offset); - this.#buffers[0] = next.subarray(n - offset); - break; - } else { - buffer$1.set(this.#buffers.shift(), offset); - offset += length; - } - } - return buffer$1; - } - } - writeFragments(fragment) { - this.#fragmentsBytes += fragment.length; - this.#fragments.push(fragment); - } - consumeFragments() { - const fragments = this.#fragments; - if (fragments.length === 1) { - this.#fragmentsBytes = 0; - return fragments.shift(); - } - let offset = 0; - const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes); - for (let i = 0; i < fragments.length; ++i) { - const buffer$1 = fragments[i]; - output.set(buffer$1, offset); - offset += buffer$1.length; - } - this.#fragments = []; - this.#fragmentsBytes = 0; - return output; - } - parseCloseBody(data) { - assert(data.length !== 1); - /** @type {number|undefined} */ - let code; - if (data.length >= 2) code = data.readUInt16BE(0); - if (code !== void 0 && !isValidStatusCode(code)) return { - code: 1002, - reason: "Invalid status code", - error: true - }; - /** @type {Buffer} */ - let reason = data.subarray(2); - if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); - try { - reason = utf8Decode$2(reason); - } catch { - return { - code: 1007, - reason: "Invalid UTF-8", - error: true - }; - } - return { - code, - reason, - error: false - }; - } - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame(body) { - const { opcode, payloadLength } = this.#info; - if (opcode === opcodes$3.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection$2(this.#handler, 1002, "Received close frame with a 1-byte body."); - return false; - } - this.#info.closeInfo = this.parseCloseBody(body); - if (this.#info.closeInfo.error) { - const { code, reason } = this.#info.closeInfo; - failWebsocketConnection$2(this.#handler, code, reason); - return false; - } - if (!this.#handler.closeState.has(sentCloseFrameState$2.SENT) && !this.#handler.closeState.has(sentCloseFrameState$2.RECEIVED)) { - let body$1 = emptyBuffer; - if (this.#info.closeInfo.code) { - body$1 = Buffer.allocUnsafe(2); - body$1.writeUInt16BE(this.#info.closeInfo.code, 0); - } - const closeFrame = new WebsocketFrameSend$2(body$1); - this.#handler.socket.write(closeFrame.createFrame(opcodes$3.CLOSE)); - this.#handler.closeState.add(sentCloseFrameState$2.SENT); - } - this.#handler.readyState = states$2.CLOSING; - this.#handler.closeState.add(sentCloseFrameState$2.RECEIVED); - return false; - } else if (opcode === opcodes$3.PING) { - if (!this.#handler.closeState.has(sentCloseFrameState$2.RECEIVED)) { - const frame = new WebsocketFrameSend$2(body); - this.#handler.socket.write(frame.createFrame(opcodes$3.PONG)); - if (channels$2.ping.hasSubscribers) channels$2.ping.publish({ payload: body }); - } - } else if (opcode === opcodes$3.PONG) { - if (channels$2.pong.hasSubscribers) channels$2.pong.publish({ payload: body }); - } - return true; - } - get closingInfo() { - return this.#info.closeInfo; - } - }; - module.exports = { ByteParser: ByteParser$2 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/sender.js -var require_sender = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/sender.js"(exports, module) { - const { WebsocketFrameSend: WebsocketFrameSend$1 } = require_frame(); - const { opcodes: opcodes$2, sendHints: sendHints$1 } = require_constants(); - const FixedQueue = require_fixed_queue(); - /** - * @typedef {object} SendQueueNode - * @property {Promise | null} promise - * @property {((...args: any[]) => any)} callback - * @property {Buffer | null} frame - */ - var SendQueue$1 = class { - /** - * @type {FixedQueue} - */ - #queue = new FixedQueue(); - /** - * @type {boolean} - */ - #running = false; - /** @type {import('node:net').Socket} */ - #socket; - constructor(socket) { - this.#socket = socket; - } - add(item, cb, hint) { - if (hint !== sendHints$1.blob) { - if (!this.#running) if (hint === sendHints$1.text) { - const { 0: head, 1: body } = WebsocketFrameSend$1.createFastTextFrame(item); - this.#socket.cork(); - this.#socket.write(head); - this.#socket.write(body, cb); - this.#socket.uncork(); - } else this.#socket.write(createFrame(item, hint), cb); - else { - /** @type {SendQueueNode} */ - const node$1 = { - promise: null, - callback: cb, - frame: createFrame(item, hint) - }; - this.#queue.push(node$1); - } - return; - } - /** @type {SendQueueNode} */ - const node = { - promise: item.arrayBuffer().then((ab) => { - node.promise = null; - node.frame = createFrame(ab, hint); - }), - callback: cb, - frame: null - }; - this.#queue.push(node); - if (!this.#running) this.#run(); - } - async #run() { - this.#running = true; - const queue = this.#queue; - while (!queue.isEmpty()) { - const node = queue.shift(); - if (node.promise !== null) await node.promise; - this.#socket.write(node.frame, node.callback); - node.callback = node.frame = null; - } - this.#running = false; - } - }; - function createFrame(data, hint) { - return new WebsocketFrameSend$1(toBuffer(data, hint)).createFrame(hint === sendHints$1.text ? opcodes$2.TEXT : opcodes$2.BINARY); - } - function toBuffer(data, hint) { - switch (hint) { - case sendHints$1.text: - case sendHints$1.typedArray: return new Uint8Array(data.buffer, data.byteOffset, data.byteLength); - case sendHints$1.arrayBuffer: - case sendHints$1.blob: return new Uint8Array(data); - } - } - module.exports = { SendQueue: SendQueue$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/websocket.js -var require_websocket = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/websocket.js"(exports, module) { - const { webidl: webidl$3 } = require_webidl(); - const { URLSerializer } = require_data_url(); - const { environmentSettingsObject: environmentSettingsObject$2 } = require_util$4(); - const { staticPropertyDescriptors, states: states$1, sentCloseFrameState: sentCloseFrameState$1, sendHints, opcodes: opcodes$1 } = require_constants(); - const { isConnecting, isEstablished: isEstablished$1, isClosing, isValidSubprotocol: isValidSubprotocol$1, fireEvent, utf8Decode: utf8Decode$1, toArrayBuffer, getURLRecord: getURLRecord$1 } = require_util$1(); - const { establishWebSocketConnection: establishWebSocketConnection$1, closeWebSocketConnection: closeWebSocketConnection$1, failWebsocketConnection: failWebsocketConnection$1 } = require_connection(); - const { ByteParser: ByteParser$1 } = require_receiver(); - const { kEnumerableProperty: kEnumerableProperty$3 } = require_util$5(); - const { getGlobalDispatcher: getGlobalDispatcher$1 } = require_global(); - const { types: types$1 } = __require("node:util"); - const { ErrorEvent: ErrorEvent$1, CloseEvent: CloseEvent$1, createFastMessageEvent: createFastMessageEvent$1 } = require_events(); - const { SendQueue } = require_sender(); - const { channels: channels$1 } = require_diagnostics(); - /** - * @typedef {object} Handler - * @property {(response: any, extensions?: string[]) => void} onConnectionEstablished - * @property {(code: number, reason: any) => void} onFail - * @property {(opcode: number, data: Buffer) => void} onMessage - * @property {(error: Error) => void} onParserError - * @property {() => void} onParserDrain - * @property {(chunk: Buffer) => void} onSocketData - * @property {(err: Error) => void} onSocketError - * @property {() => void} onSocketClose - * - * @property {number} readyState - * @property {import('stream').Duplex} socket - * @property {Set} closeState - * @property {import('../fetch/index').Fetch} controller - * @property {boolean} [wasEverConnected=false] - */ - var WebSocket = class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - }; - #bufferedAmount = 0; - #protocol = ""; - #extensions = ""; - /** @type {SendQueue} */ - #sendQueue; - /** @type {Handler} */ - #handler = { - onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), - onFail: (code, reason) => this.#onFail(code, reason), - onMessage: (opcode, data) => this.#onMessage(opcode, data), - onParserError: (err) => failWebsocketConnection$1(this.#handler, null, err.message), - onParserDrain: () => this.#onParserDrain(), - onSocketData: (chunk) => { - if (!this.#parser.write(chunk)) this.#handler.socket.pause(); - }, - onSocketError: (err) => { - this.#handler.readyState = states$1.CLOSING; - if (channels$1.socketError.hasSubscribers) channels$1.socketError.publish(err); - this.#handler.socket.destroy(); - }, - onSocketClose: () => this.#onSocketClose(), - readyState: states$1.CONNECTING, - socket: null, - closeState: new Set(), - controller: null, - wasEverConnected: false - }; - #url; - #binaryType; - /** @type {import('./receiver').ByteParser} */ - #parser; - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor(url, protocols = []) { - super(); - webidl$3.util.markAsUncloneable(this); - const prefix = "WebSocket constructor"; - webidl$3.argumentLengthCheck(arguments, 1, prefix); - const options = webidl$3.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); - url = webidl$3.converters.USVString(url); - protocols = options.protocols; - const baseURL = environmentSettingsObject$2.settingsObject.baseUrl; - const urlRecord = getURLRecord$1(url, baseURL); - if (typeof protocols === "string") protocols = [protocols]; - if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol$1(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - this.#url = new URL(urlRecord.href); - const client = environmentSettingsObject$2.settingsObject; - this.#handler.controller = establishWebSocketConnection$1(urlRecord, protocols, client, this.#handler, options); - this.#handler.readyState = WebSocket.CONNECTING; - this.#binaryType = "blob"; - } - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close(code = void 0, reason = void 0) { - webidl$3.brandCheck(this, WebSocket); - const prefix = "WebSocket.close"; - if (code !== void 0) code = webidl$3.converters["unsigned short"](code, prefix, "code", { clamp: true }); - if (reason !== void 0) reason = webidl$3.converters.USVString(reason); - code ??= null; - reason ??= ""; - closeWebSocketConnection$1(this.#handler, code, reason, true); - } - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send(data) { - webidl$3.brandCheck(this, WebSocket); - const prefix = "WebSocket.send"; - webidl$3.argumentLengthCheck(arguments, 1, prefix); - data = webidl$3.converters.WebSocketSendData(data, prefix, "data"); - if (isConnecting(this.#handler.readyState)) throw new DOMException("Sent before connected.", "InvalidStateError"); - if (!isEstablished$1(this.#handler.readyState) || isClosing(this.#handler.readyState)) return; - if (typeof data === "string") { - const buffer$1 = Buffer.from(data); - this.#bufferedAmount += buffer$1.byteLength; - this.#sendQueue.add(buffer$1, () => { - this.#bufferedAmount -= buffer$1.byteLength; - }, sendHints.text); - } else if (types$1.isArrayBuffer(data)) { - this.#bufferedAmount += data.byteLength; - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength; - }, sendHints.arrayBuffer); - } else if (ArrayBuffer.isView(data)) { - this.#bufferedAmount += data.byteLength; - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength; - }, sendHints.typedArray); - } else if (webidl$3.is.Blob(data)) { - this.#bufferedAmount += data.size; - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.size; - }, sendHints.blob); - } - } - get readyState() { - webidl$3.brandCheck(this, WebSocket); - return this.#handler.readyState; - } - get bufferedAmount() { - webidl$3.brandCheck(this, WebSocket); - return this.#bufferedAmount; - } - get url() { - webidl$3.brandCheck(this, WebSocket); - return URLSerializer(this.#url); - } - get extensions() { - webidl$3.brandCheck(this, WebSocket); - return this.#extensions; - } - get protocol() { - webidl$3.brandCheck(this, WebSocket); - return this.#protocol; - } - get onopen() { - webidl$3.brandCheck(this, WebSocket); - return this.#events.open; - } - set onopen(fn) { - webidl$3.brandCheck(this, WebSocket); - if (this.#events.open) this.removeEventListener("open", this.#events.open); - if (typeof fn === "function") { - this.#events.open = fn; - this.addEventListener("open", fn); - } else this.#events.open = null; - } - get onerror() { - webidl$3.brandCheck(this, WebSocket); - return this.#events.error; - } - set onerror(fn) { - webidl$3.brandCheck(this, WebSocket); - if (this.#events.error) this.removeEventListener("error", this.#events.error); - if (typeof fn === "function") { - this.#events.error = fn; - this.addEventListener("error", fn); - } else this.#events.error = null; - } - get onclose() { - webidl$3.brandCheck(this, WebSocket); - return this.#events.close; - } - set onclose(fn) { - webidl$3.brandCheck(this, WebSocket); - if (this.#events.close) this.removeEventListener("close", this.#events.close); - if (typeof fn === "function") { - this.#events.close = fn; - this.addEventListener("close", fn); - } else this.#events.close = null; - } - get onmessage() { - webidl$3.brandCheck(this, WebSocket); - return this.#events.message; - } - set onmessage(fn) { - webidl$3.brandCheck(this, WebSocket); - if (this.#events.message) this.removeEventListener("message", this.#events.message); - if (typeof fn === "function") { - this.#events.message = fn; - this.addEventListener("message", fn); - } else this.#events.message = null; - } - get binaryType() { - webidl$3.brandCheck(this, WebSocket); - return this.#binaryType; - } - set binaryType(type) { - webidl$3.brandCheck(this, WebSocket); - if (type !== "blob" && type !== "arraybuffer") this.#binaryType = "blob"; - else this.#binaryType = type; - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished(response, parsedExtensions) { - this.#handler.socket = response.socket; - const parser = new ByteParser$1(this.#handler, parsedExtensions); - parser.on("drain", () => this.#handler.onParserDrain()); - parser.on("error", (err) => this.#handler.onParserError(err)); - this.#parser = parser; - this.#sendQueue = new SendQueue(response.socket); - this.#handler.readyState = states$1.OPEN; - const extensions = response.headersList.get("sec-websocket-extensions"); - if (extensions !== null) this.#extensions = extensions; - const protocol = response.headersList.get("sec-websocket-protocol"); - if (protocol !== null) this.#protocol = protocol; - fireEvent("open", this); - } - #onFail(code, reason) { - if (reason) fireEvent("error", this, (type, init) => new ErrorEvent$1(type, init), { - error: new Error(reason), - message: reason - }); - if (!this.#handler.wasEverConnected) { - this.#handler.readyState = states$1.CLOSED; - fireEvent("close", this, (type, init) => new CloseEvent$1(type, init), { - wasClean: false, - code, - reason - }); - } - } - #onMessage(type, data) { - if (this.#handler.readyState !== states$1.OPEN) return; - let dataForEvent; - if (type === opcodes$1.TEXT) try { - dataForEvent = utf8Decode$1(data); - } catch { - failWebsocketConnection$1(this.#handler, 1007, "Received invalid UTF-8 in text frame."); - return; - } - else if (type === opcodes$1.BINARY) if (this.#binaryType === "blob") dataForEvent = new Blob([data]); - else dataForEvent = toArrayBuffer(data); - fireEvent("message", this, createFastMessageEvent$1, { - origin: this.#url.origin, - data: dataForEvent - }); - } - #onParserDrain() { - this.#handler.socket.resume(); - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ - #onSocketClose() { - const wasClean = this.#handler.closeState.has(sentCloseFrameState$1.SENT) && this.#handler.closeState.has(sentCloseFrameState$1.RECEIVED); - let code = 1005; - let reason = ""; - const result = this.#parser.closingInfo; - if (result && !result.error) { - code = result.code ?? 1005; - reason = result.reason; - } else if (!this.#handler.closeState.has(sentCloseFrameState$1.RECEIVED)) code = 1006; - this.#handler.readyState = states$1.CLOSED; - fireEvent("close", this, (type, init) => new CloseEvent$1(type, init), { - wasClean, - code, - reason - }); - if (channels$1.close.hasSubscribers) channels$1.close.publish({ - websocket: this, - code, - reason - }); - } - }; - WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states$1.CONNECTING; - WebSocket.OPEN = WebSocket.prototype.OPEN = states$1.OPEN; - WebSocket.CLOSING = WebSocket.prototype.CLOSING = states$1.CLOSING; - WebSocket.CLOSED = WebSocket.prototype.CLOSED = states$1.CLOSED; - Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty$3, - readyState: kEnumerableProperty$3, - bufferedAmount: kEnumerableProperty$3, - onopen: kEnumerableProperty$3, - onerror: kEnumerableProperty$3, - onclose: kEnumerableProperty$3, - close: kEnumerableProperty$3, - onmessage: kEnumerableProperty$3, - binaryType: kEnumerableProperty$3, - send: kEnumerableProperty$3, - extensions: kEnumerableProperty$3, - protocol: kEnumerableProperty$3, - [Symbol.toStringTag]: { - value: "WebSocket", - writable: false, - enumerable: false, - configurable: true - } - }); - Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors - }); - webidl$3.converters["sequence"] = webidl$3.sequenceConverter(webidl$3.converters.DOMString); - webidl$3.converters["DOMString or sequence"] = function(V, prefix, argument) { - if (webidl$3.util.Type(V) === webidl$3.util.Types.OBJECT && Symbol.iterator in V) return webidl$3.converters["sequence"](V); - return webidl$3.converters.DOMString(V, prefix, argument); - }; - webidl$3.converters.WebSocketInit = webidl$3.dictionaryConverter([ - { - key: "protocols", - converter: webidl$3.converters["DOMString or sequence"], - defaultValue: () => new Array(0) - }, - { - key: "dispatcher", - converter: webidl$3.converters.any, - defaultValue: () => getGlobalDispatcher$1() - }, - { - key: "headers", - converter: webidl$3.nullableConverter(webidl$3.converters.HeadersInit) - } - ]); - webidl$3.converters["DOMString or sequence or WebSocketInit"] = function(V) { - if (webidl$3.util.Type(V) === webidl$3.util.Types.OBJECT && !(Symbol.iterator in V)) return webidl$3.converters.WebSocketInit(V); - return { protocols: webidl$3.converters["DOMString or sequence"](V) }; - }; - webidl$3.converters.WebSocketSendData = function(V) { - if (webidl$3.util.Type(V) === webidl$3.util.Types.OBJECT) { - if (webidl$3.is.Blob(V)) return V; - if (ArrayBuffer.isView(V) || types$1.isArrayBuffer(V)) return V; - } - return webidl$3.converters.USVString(V); - }; - module.exports = { WebSocket }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/stream/websocketerror.js -var require_websocketerror = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/stream/websocketerror.js"(exports, module) { - const { webidl: webidl$2 } = require_webidl(); - const { validateCloseCodeAndReason } = require_util$1(); - const { kConstruct: kConstruct$1 } = require_symbols(); - const { kEnumerableProperty: kEnumerableProperty$2 } = require_util$5(); - var WebSocketError$1 = class WebSocketError$1 extends DOMException { - #closeCode; - #reason; - constructor(message = "", init = void 0) { - message = webidl$2.converters.DOMString(message, "WebSocketError", "message"); - super(message, "WebSocketError"); - if (init === kConstruct$1) return; - else if (init !== null) init = webidl$2.converters.WebSocketCloseInfo(init); - let code = init.closeCode ?? null; - const reason = init.reason ?? ""; - validateCloseCodeAndReason(code, reason); - if (reason.length !== 0 && code === null) code = 1e3; - this.#closeCode = code; - this.#reason = reason; - } - get closeCode() { - return this.#closeCode; - } - get reason() { - return this.#reason; - } - /** - * @param {string} message - * @param {number|null} code - * @param {string} reason - */ - static createUnvalidatedWebSocketError(message, code, reason) { - const error = new WebSocketError$1(message, kConstruct$1); - error.#closeCode = code; - error.#reason = reason; - return error; - } - }; - const { createUnvalidatedWebSocketError: createUnvalidatedWebSocketError$1 } = WebSocketError$1; - delete WebSocketError$1.createUnvalidatedWebSocketError; - Object.defineProperties(WebSocketError$1.prototype, { - closeCode: kEnumerableProperty$2, - reason: kEnumerableProperty$2, - [Symbol.toStringTag]: { - value: "WebSocketError", - writable: false, - enumerable: false, - configurable: true - } - }); - webidl$2.is.WebSocketError = webidl$2.util.MakeTypeAssertion(WebSocketError$1); - module.exports = { - WebSocketError: WebSocketError$1, - createUnvalidatedWebSocketError: createUnvalidatedWebSocketError$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/stream/websocketstream.js -var require_websocketstream = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/websocket/stream/websocketstream.js"(exports, module) { - const { createDeferredPromise, environmentSettingsObject: environmentSettingsObject$1 } = require_util$4(); - const { states, opcodes, sentCloseFrameState } = require_constants(); - const { webidl: webidl$1 } = require_webidl(); - const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require_util$1(); - const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require_connection(); - const { types } = __require("node:util"); - const { channels } = require_diagnostics(); - const { WebsocketFrameSend } = require_frame(); - const { ByteParser } = require_receiver(); - const { WebSocketError, createUnvalidatedWebSocketError } = require_websocketerror(); - const { utf8DecodeBytes } = require_util$4(); - const { kEnumerableProperty: kEnumerableProperty$1 } = require_util$5(); - let emittedExperimentalWarning = false; - var WebSocketStream = class { - /** @type {URL} */ - #url; - /** @type {ReturnType} */ - #openedPromise; - /** @type {ReturnType} */ - #closedPromise; - /** @type {ReadableStream} */ - #readableStream; - /** @type {ReadableStreamDefaultController} */ - #readableStreamController; - /** @type {WritableStream} */ - #writableStream; - #handshakeAborted = false; - /** @type {import('../websocket').Handler} */ - #handler = { - onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), - onFail: (_code, _reason) => {}, - onMessage: (opcode, data) => this.#onMessage(opcode, data), - onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), - onParserDrain: () => this.#handler.socket.resume(), - onSocketData: (chunk) => { - if (!this.#parser.write(chunk)) this.#handler.socket.pause(); - }, - onSocketError: (err) => { - this.#handler.readyState = states.CLOSING; - if (channels.socketError.hasSubscribers) channels.socketError.publish(err); - this.#handler.socket.destroy(); - }, - onSocketClose: () => this.#onSocketClose(), - readyState: states.CONNECTING, - socket: null, - closeState: new Set(), - controller: null, - wasEverConnected: false - }; - /** @type {import('../receiver').ByteParser} */ - #parser; - constructor(url, options = void 0) { - if (!emittedExperimentalWarning) { - process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.", { code: "UNDICI-WSS" }); - emittedExperimentalWarning = true; - } - webidl$1.argumentLengthCheck(arguments, 1, "WebSocket"); - url = webidl$1.converters.USVString(url); - if (options !== null) options = webidl$1.converters.WebSocketStreamOptions(options); - const baseURL = environmentSettingsObject$1.settingsObject.baseUrl; - const urlRecord = getURLRecord(url, baseURL); - const protocols = options.protocols; - if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - this.#url = urlRecord.toString(); - this.#openedPromise = createDeferredPromise(); - this.#closedPromise = createDeferredPromise(); - if (options.signal != null) { - const signal = options.signal; - if (signal.aborted) { - this.#openedPromise.reject(signal.reason); - this.#closedPromise.reject(signal.reason); - return; - } - signal.addEventListener("abort", () => { - if (!isEstablished(this.#handler.readyState)) { - failWebsocketConnection(this.#handler); - this.#handler.readyState = states.CLOSING; - this.#openedPromise.reject(signal.reason); - this.#closedPromise.reject(signal.reason); - this.#handshakeAborted = true; - } - }, { once: true }); - } - const client = environmentSettingsObject$1.settingsObject; - this.#handler.controller = establishWebSocketConnection(urlRecord, protocols, client, this.#handler, options); - } - get url() { - return this.#url.toString(); - } - get opened() { - return this.#openedPromise.promise; - } - get closed() { - return this.#closedPromise.promise; - } - close(closeInfo = void 0) { - if (closeInfo !== null) closeInfo = webidl$1.converters.WebSocketCloseInfo(closeInfo); - const code = closeInfo.closeCode ?? null; - const reason = closeInfo.reason; - closeWebSocketConnection(this.#handler, code, reason, true); - } - #write(chunk) { - const promise = createDeferredPromise(); - let data = null; - let opcode = null; - if (ArrayBuffer.isView(chunk) || types.isArrayBuffer(chunk)) { - data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk); - opcode = opcodes.BINARY; - } else { - let string; - try { - string = webidl$1.converters.DOMString(chunk); - } catch (e) { - promise.reject(e); - return; - } - data = new TextEncoder().encode(string); - opcode = opcodes.TEXT; - } - if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { - const frame = new WebsocketFrameSend(data); - this.#handler.socket.write(frame.createFrame(opcode), () => { - promise.resolve(void 0); - }); - } - return promise; - } - /** @type {import('../websocket').Handler['onConnectionEstablished']} */ - #onConnectionEstablished(response, parsedExtensions) { - this.#handler.socket = response.socket; - const parser = new ByteParser(this.#handler, parsedExtensions); - parser.on("drain", () => this.#handler.onParserDrain()); - parser.on("error", (err) => this.#handler.onParserError(err)); - this.#parser = parser; - this.#handler.readyState = states.OPEN; - const extensions = parsedExtensions ?? ""; - const protocol = response.headersList.get("sec-websocket-protocol") ?? ""; - const readable = new ReadableStream({ - start: (controller) => { - this.#readableStreamController = controller; - }, - pull(controller) { - let chunk; - while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) controller.enqueue(chunk); - }, - cancel: (reason) => this.#cancel(reason) - }); - const writable = new WritableStream({ - write: (chunk) => this.#write(chunk), - close: () => closeWebSocketConnection(this.#handler, null, null), - abort: (reason) => this.#closeUsingReason(reason) - }); - this.#readableStream = readable; - this.#writableStream = writable; - this.#openedPromise.resolve({ - extensions, - protocol, - readable, - writable - }); - } - /** @type {import('../websocket').Handler['onMessage']} */ - #onMessage(type, data) { - if (this.#handler.readyState !== states.OPEN) return; - let chunk; - if (type === opcodes.TEXT) try { - chunk = utf8Decode(data); - } catch { - failWebsocketConnection(this.#handler, "Received invalid UTF-8 in text frame."); - return; - } - else if (type === opcodes.BINARY) chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); - this.#readableStreamController.enqueue(chunk); - } - /** @type {import('../websocket').Handler['onSocketClose']} */ - #onSocketClose() { - const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED); - this.#handler.readyState = states.CLOSED; - if (this.#handshakeAborted) return; - if (!this.#handler.wasEverConnected) this.#openedPromise.reject(new WebSocketError("Socket never opened")); - const result = this.#parser.closingInfo; - let code = result?.code ?? 1005; - if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) code = 1006; - const reason = result?.reason == null ? "" : utf8DecodeBytes(Buffer.from(result.reason)); - if (wasClean) { - this.#readableStream.cancel().catch(() => {}); - if (!this.#writableStream.locked) this.#writableStream.abort(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError")); - this.#closedPromise.resolve({ - closeCode: code, - reason - }); - } else { - const error = createUnvalidatedWebSocketError("unclean close", code, reason); - this.#readableStreamController.error(error); - this.#writableStream.abort(error); - this.#closedPromise.reject(error); - } - } - #closeUsingReason(reason) { - let code = null; - let reasonString = ""; - if (webidl$1.is.WebSocketError(reason)) { - code = reason.closeCode; - reasonString = reason.reason; - } - closeWebSocketConnection(this.#handler, code, reasonString); - } - #cancel(reason) { - this.#closeUsingReason(reason); - } - }; - Object.defineProperties(WebSocketStream.prototype, { - url: kEnumerableProperty$1, - opened: kEnumerableProperty$1, - closed: kEnumerableProperty$1, - close: kEnumerableProperty$1, - [Symbol.toStringTag]: { - value: "WebSocketStream", - writable: false, - enumerable: false, - configurable: true - } - }); - webidl$1.converters.WebSocketStreamOptions = webidl$1.dictionaryConverter([{ - key: "protocols", - converter: webidl$1.sequenceConverter(webidl$1.converters.USVString), - defaultValue: () => [] - }, { - key: "signal", - converter: webidl$1.nullableConverter(webidl$1.converters.AbortSignal), - defaultValue: () => null - }]); - webidl$1.converters.WebSocketCloseInfo = webidl$1.dictionaryConverter([{ - key: "closeCode", - converter: (V) => webidl$1.converters["unsigned short"](V, { enforceRange: true }) - }, { - key: "reason", - converter: webidl$1.converters.USVString, - defaultValue: () => "" - }]); - module.exports = { WebSocketStream }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/eventsource/util.js -var require_util = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/eventsource/util.js"(exports, module) { - /** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ - function isValidLastEventId$1(value) { - return value.indexOf("\0") === -1; - } - /** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ - function isASCIINumber$1(value) { - if (value.length === 0) return false; - for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; - return true; - } - function delay$1(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref(); - }); - } - module.exports = { - isValidLastEventId: isValidLastEventId$1, - isASCIINumber: isASCIINumber$1, - delay: delay$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js -var require_eventsource_stream = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module) { - const { Transform } = __require("node:stream"); - const { isASCIINumber, isValidLastEventId } = require_util(); - /** - * @type {number[]} BOM - */ - const BOM = [ - 239, - 187, - 191 - ]; - /** - * @type {10} LF - */ - const LF = 10; - /** - * @type {13} CR - */ - const CR = 13; - /** - * @type {58} COLON - */ - const COLON = 58; - /** - * @type {32} SPACE - */ - const SPACE = 32; - /** - * @typedef {object} EventSourceStreamEvent - * @type {object} - * @property {string} [event] The event type. - * @property {string} [data] The data of the message. - * @property {string} [id] A unique ID for the event. - * @property {string} [retry] The reconnection time, in milliseconds. - */ - /** - * @typedef eventSourceSettings - * @type {object} - * @property {string} [lastEventId] The last event ID received from the server. - * @property {string} [origin] The origin of the event source. - * @property {number} [reconnectionTime] The reconnection time, in milliseconds. - */ - var EventSourceStream$1 = class extends Transform { - /** - * @type {eventSourceSettings} - */ - state; - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true; - /** - * @type {boolean} - */ - crlfCheck = false; - /** - * @type {boolean} - */ - eventEndCheck = false; - /** - * @type {Buffer|null} - */ - buffer = null; - pos = 0; - event = { - data: void 0, - event: void 0, - id: void 0, - retry: void 0 - }; - /** - * @param {object} options - * @param {boolean} [options.readableObjectMode] - * @param {eventSourceSettings} [options.eventSourceSettings] - * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [options.push] - */ - constructor(options = {}) { - options.readableObjectMode = true; - super(options); - this.state = options.eventSourceSettings || {}; - if (options.push) this.push = options.push; - } - /** - * @param {Buffer} chunk - * @param {string} _encoding - * @param {Function} callback - * @returns {void} - */ - _transform(chunk, _encoding, callback) { - if (chunk.length === 0) { - callback(); - return; - } - if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); - else this.buffer = chunk; - if (this.checkBOM) switch (this.buffer.length) { - case 1: - if (this.buffer[0] === BOM[0]) { - callback(); - return; - } - this.checkBOM = false; - callback(); - return; - case 2: - if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { - callback(); - return; - } - this.checkBOM = false; - break; - case 3: - if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { - this.buffer = Buffer.alloc(0); - this.checkBOM = false; - callback(); - return; - } - this.checkBOM = false; - break; - default: - if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); - this.checkBOM = false; - break; - } - while (this.pos < this.buffer.length) { - if (this.eventEndCheck) { - if (this.crlfCheck) { - if (this.buffer[this.pos] === LF) { - this.buffer = this.buffer.subarray(this.pos + 1); - this.pos = 0; - this.crlfCheck = false; - continue; - } - this.crlfCheck = false; - } - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - if (this.buffer[this.pos] === CR) this.crlfCheck = true; - this.buffer = this.buffer.subarray(this.pos + 1); - this.pos = 0; - if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) this.processEvent(this.event); - this.clearEvent(); - continue; - } - this.eventEndCheck = false; - continue; - } - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - if (this.buffer[this.pos] === CR) this.crlfCheck = true; - this.parseLine(this.buffer.subarray(0, this.pos), this.event); - this.buffer = this.buffer.subarray(this.pos + 1); - this.pos = 0; - this.eventEndCheck = true; - continue; - } - this.pos++; - } - callback(); - } - /** - * @param {Buffer} line - * @param {EventSourceStreamEvent} event - */ - parseLine(line, event) { - if (line.length === 0) return; - const colonPosition = line.indexOf(COLON); - if (colonPosition === 0) return; - let field = ""; - let value = ""; - if (colonPosition !== -1) { - field = line.subarray(0, colonPosition).toString("utf8"); - let valueStart = colonPosition + 1; - if (line[valueStart] === SPACE) ++valueStart; - value = line.subarray(valueStart).toString("utf8"); - } else { - field = line.toString("utf8"); - value = ""; - } - switch (field) { - case "data": - if (event[field] === void 0) event[field] = value; - else event[field] += `\n${value}`; - break; - case "retry": - if (isASCIINumber(value)) event[field] = value; - break; - case "id": - if (isValidLastEventId(value)) event[field] = value; - break; - case "event": - if (value.length > 0) event[field] = value; - break; - } - } - /** - * @param {EventSourceStreamEvent} event - */ - processEvent(event) { - if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); - if (event.id && isValidLastEventId(event.id)) this.state.lastEventId = event.id; - if (event.data !== void 0) this.push({ - type: event.event || "message", - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }); - } - clearEvent() { - this.event = { - data: void 0, - event: void 0, - id: void 0, - retry: void 0 - }; - } - }; - module.exports = { EventSourceStream: EventSourceStream$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/eventsource/eventsource.js -var require_eventsource = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module) { - const { pipeline } = __require("node:stream"); - const { fetching } = require_fetch(); - const { makeRequest } = require_request(); - const { webidl } = require_webidl(); - const { EventSourceStream } = require_eventsource_stream(); - const { parseMIMEType: parseMIMEType$1 } = require_data_url(); - const { createFastMessageEvent } = require_events(); - const { isNetworkError } = require_response(); - const { delay } = require_util(); - const { kEnumerableProperty } = require_util$5(); - const { environmentSettingsObject } = require_util$4(); - let experimentalWarned = false; - /** - * A reconnection time, in milliseconds. This must initially be an implementation-defined value, - * probably in the region of a few seconds. - * - * In Comparison: - * - Chrome uses 3000ms. - * - Deno uses 5000ms. - * - * @type {3000} - */ - const defaultReconnectionTime = 3e3; - /** - * The readyState attribute represents the state of the connection. - * @typedef ReadyState - * @type {0|1|2} - * @readonly - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev - */ - /** - * The connection has not yet been established, or it was closed and the user - * agent is reconnecting. - * @type {0} - */ - const CONNECTING = 0; - /** - * The user agent has an open connection and is dispatching events as it - * receives them. - * @type {1} - */ - const OPEN = 1; - /** - * The connection is not open, and the user agent is not trying to reconnect. - * @type {2} - */ - const CLOSED = 2; - /** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". - * @type {'anonymous'} - */ - const ANONYMOUS = "anonymous"; - /** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". - * @type {'use-credentials'} - */ - const USE_CREDENTIALS = "use-credentials"; - /** - * The EventSource interface is used to receive server-sent events. It - * connects to a server over HTTP and receives events in text/event-stream - * format without closing the connection. - * @extends {EventTarget} - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - * @api public - */ - var EventSource$1 = class EventSource$1 extends EventTarget { - #events = { - open: null, - error: null, - message: null - }; - #url; - #withCredentials = false; - /** - * @type {ReadyState} - */ - #readyState = CONNECTING; - #request = null; - #controller = null; - #dispatcher; - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state; - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict={}] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor(url, eventSourceInitDict = {}) { - super(); - webidl.util.markAsUncloneable(this); - const prefix = "EventSource constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); - if (!experimentalWarned) { - experimentalWarned = true; - process.emitWarning("EventSource is experimental, expect them to change at any time.", { code: "UNDICI-ES" }); - } - url = webidl.converters.USVString(url); - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); - this.#dispatcher = eventSourceInitDict.dispatcher; - this.#state = { - lastEventId: "", - reconnectionTime: defaultReconnectionTime - }; - const settings = environmentSettingsObject; - let urlRecord; - try { - urlRecord = new URL(url, settings.settingsObject.baseUrl); - this.#state.origin = urlRecord.origin; - } catch (e) { - throw new DOMException(e, "SyntaxError"); - } - this.#url = urlRecord.href; - let corsAttributeState = ANONYMOUS; - if (eventSourceInitDict.withCredentials === true) { - corsAttributeState = USE_CREDENTIALS; - this.#withCredentials = true; - } - const initRequest = { - redirect: "follow", - keepalive: true, - mode: "cors", - credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", - referrer: "no-referrer" - }; - initRequest.client = environmentSettingsObject.settingsObject; - initRequest.headersList = [["accept", { - name: "accept", - value: "text/event-stream" - }]]; - initRequest.cache = "no-store"; - initRequest.initiator = "other"; - initRequest.urlList = [new URL(this.#url)]; - this.#request = makeRequest(initRequest); - this.#connect(); - } - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {ReadyState} - * @readonly - */ - get readyState() { - return this.#readyState; - } - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url() { - return this.#url; - } - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials() { - return this.#withCredentials; - } - #connect() { - if (this.#readyState === CLOSED) return; - this.#readyState = CONNECTING; - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - }; - const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event("error")); - this.close(); - } - this.#reconnect(); - }; - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; - fetchParams.processResponse = (response) => { - if (isNetworkError(response)) if (response.aborted) { - this.close(); - this.dispatchEvent(new Event("error")); - return; - } else { - this.#reconnect(); - return; - } - const contentType = response.headersList.get("content-type", true); - const mimeType = contentType !== null ? parseMIMEType$1(contentType) : "failure"; - const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; - if (response.status !== 200 || contentTypeValid === false) { - this.close(); - this.dispatchEvent(new Event("error")); - return; - } - this.#readyState = OPEN; - this.dispatchEvent(new Event("open")); - this.#state.origin = response.urlList[response.urlList.length - 1].origin; - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent(event.type, event.options)); - } - }); - pipeline(response.body.stream, eventSourceStream, (error) => { - if (error?.aborted === false) { - this.close(); - this.dispatchEvent(new Event("error")); - } - }); - }; - this.#controller = fetching(fetchParams); - } - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect() { - if (this.#readyState === CLOSED) return; - this.#readyState = CONNECTING; - this.dispatchEvent(new Event("error")); - await delay(this.#state.reconnectionTime); - if (this.#readyState !== CONNECTING) return; - if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); - this.#connect(); - } - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close() { - webidl.brandCheck(this, EventSource$1); - if (this.#readyState === CLOSED) return; - this.#readyState = CLOSED; - this.#controller.abort(); - this.#request = null; - } - get onopen() { - return this.#events.open; - } - set onopen(fn) { - if (this.#events.open) this.removeEventListener("open", this.#events.open); - if (typeof fn === "function") { - this.#events.open = fn; - this.addEventListener("open", fn); - } else this.#events.open = null; - } - get onmessage() { - return this.#events.message; - } - set onmessage(fn) { - if (this.#events.message) this.removeEventListener("message", this.#events.message); - if (typeof fn === "function") { - this.#events.message = fn; - this.addEventListener("message", fn); - } else this.#events.message = null; - } - get onerror() { - return this.#events.error; - } - set onerror(fn) { - if (this.#events.error) this.removeEventListener("error", this.#events.error); - if (typeof fn === "function") { - this.#events.error = fn; - this.addEventListener("error", fn); - } else this.#events.error = null; - } - }; - const constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false - } - }; - Object.defineProperties(EventSource$1, constantsPropertyDescriptors); - Object.defineProperties(EventSource$1.prototype, constantsPropertyDescriptors); - Object.defineProperties(EventSource$1.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty - }); - webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([{ - key: "withCredentials", - converter: webidl.converters.boolean, - defaultValue: () => false - }, { - key: "dispatcher", - converter: webidl.converters.any - }]); - module.exports = { - EventSource: EventSource$1, - defaultReconnectionTime - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@7.9.0/node_modules/undici/index.js -var require_undici = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/undici/index.js"(exports, module) { - const Client = require_client(); - const Dispatcher = require_dispatcher(); - const Pool = require_pool(); - const BalancedPool = require_balanced_pool(); - const Agent = require_agent(); - const ProxyAgent = require_proxy_agent(); - const EnvHttpProxyAgent = require_env_http_proxy_agent(); - const RetryAgent = require_retry_agent(); - const H2CClient = require_h2c_client(); - const errors = require_errors(); - const util$1 = require_util$5(); - const { InvalidArgumentError } = errors; - const api = require_api(); - const buildConnector = require_connect(); - const MockClient = require_mock_client(); - const { MockCallHistory, MockCallHistoryLog } = require_mock_call_history(); - const MockAgent = require_mock_agent(); - const MockPool = require_mock_pool(); - const mockErrors = require_mock_errors(); - const RetryHandler = require_retry_handler(); - const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); - const DecoratorHandler = require_decorator_handler(); - const RedirectHandler = require_redirect_handler(); - Object.assign(Dispatcher.prototype, api); - module.exports.Dispatcher = Dispatcher; - module.exports.Client = Client; - module.exports.Pool = Pool; - module.exports.BalancedPool = BalancedPool; - module.exports.Agent = Agent; - module.exports.ProxyAgent = ProxyAgent; - module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; - module.exports.RetryAgent = RetryAgent; - module.exports.H2CClient = H2CClient; - module.exports.RetryHandler = RetryHandler; - module.exports.DecoratorHandler = DecoratorHandler; - module.exports.RedirectHandler = RedirectHandler; - module.exports.interceptors = { - redirect: require_redirect(), - responseError: require_response_error(), - retry: require_retry(), - dump: require_dump(), - dns: require_dns(), - cache: require_cache$1() - }; - module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - module.exports.buildConnector = buildConnector; - module.exports.errors = errors; - module.exports.util = { - parseHeaders: util$1.parseHeaders, - headerNameToString: util$1.headerNameToString - }; - function makeDispatcher(fn) { - return (url, opts, handler) => { - if (typeof opts === "function") { - handler = opts; - opts = null; - } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); - if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); - if (opts && opts.path != null) { - if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); - let path$3 = opts.path; - if (!opts.path.startsWith("/")) path$3 = `/${path$3}`; - url = new URL(util$1.parseOrigin(url).origin + path$3); - } else { - if (!opts) opts = typeof url === "object" ? url : {}; - url = util$1.parseURL(url); - } - const { agent, dispatcher = getGlobalDispatcher() } = opts; - if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? "PUT" : "GET") - }, handler); - }; - } - module.exports.setGlobalDispatcher = setGlobalDispatcher; - module.exports.getGlobalDispatcher = getGlobalDispatcher; - const fetchImpl = require_fetch().fetch; - module.exports.fetch = async function fetch$1(init, options = void 0) { - try { - return await fetchImpl(init, options); - } catch (err) { - if (err && typeof err === "object") Error.captureStackTrace(err); - throw err; - } - }; - module.exports.Headers = require_headers().Headers; - module.exports.Response = require_response().Response; - module.exports.Request = require_request().Request; - module.exports.FormData = require_formdata().FormData; - const { setGlobalOrigin, getGlobalOrigin } = require_global$1(); - module.exports.setGlobalOrigin = setGlobalOrigin; - module.exports.getGlobalOrigin = getGlobalOrigin; - const { CacheStorage } = require_cachestorage(); - const { kConstruct } = require_symbols(); - module.exports.caches = new CacheStorage(kConstruct); - const { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = require_cookies(); - module.exports.deleteCookie = deleteCookie; - module.exports.getCookies = getCookies; - module.exports.getSetCookies = getSetCookies; - module.exports.setCookie = setCookie; - module.exports.parseCookie = parseCookie; - const { parseMIMEType, serializeAMimeType } = require_data_url(); - module.exports.parseMIMEType = parseMIMEType; - module.exports.serializeAMimeType = serializeAMimeType; - const { CloseEvent, ErrorEvent, MessageEvent } = require_events(); - module.exports.WebSocket = require_websocket().WebSocket; - module.exports.CloseEvent = CloseEvent; - module.exports.ErrorEvent = ErrorEvent; - module.exports.MessageEvent = MessageEvent; - module.exports.WebSocketStream = require_websocketstream().WebSocketStream; - module.exports.WebSocketError = require_websocketerror().WebSocketError; - module.exports.request = makeDispatcher(api.request); - module.exports.stream = makeDispatcher(api.stream); - module.exports.pipeline = makeDispatcher(api.pipeline); - module.exports.connect = makeDispatcher(api.connect); - module.exports.upgrade = makeDispatcher(api.upgrade); - module.exports.MockClient = MockClient; - module.exports.MockCallHistory = MockCallHistory; - module.exports.MockCallHistoryLog = MockCallHistoryLog; - module.exports.MockPool = MockPool; - module.exports.MockAgent = MockAgent; - module.exports.mockErrors = mockErrors; - const { EventSource } = require_eventsource(); - module.exports.EventSource = EventSource; -} }); -var import_undici = __toESM(require_undici(), 1); - -//#endregion -//#region src/version.ts -const GIT_HASH_RE = /^[0-9a-fA-F]{40}$/; -/** Parses the version from the user into a structure */ -function parseVersionRange(version) { - version = String(version) || "2.x"; - version = version.trim(); - if (version === "canary") return { - range: "latest", - kind: "canary" - }; - if (version === "rc") return { - range: "latest", - kind: "rc" - }; - if (version === "latest") return { - range: "latest", - kind: "stable" - }; - if (version === "lts") return { - range: "latest", - kind: "lts" - }; - if (GIT_HASH_RE.test(version)) return { - range: version, - kind: "canary" - }; - const range = import_semver.default.validRange(version); - if (range !== null) return { - range, - kind: "stable" - }; - return null; -} -/** Parses the version from the version file */ -function getDenoVersionFromFile(versionFilePath) { - if (!fs$3.existsSync(versionFilePath)) throw new Error(`The specified node version file at: ${versionFilePath} does not exist`); - const contents = fs$3.readFileSync(versionFilePath, "utf8"); - const denoVersionInToolVersions = contents.match(/^deno\s+v?(?[^\s]+)$/m); - return denoVersionInToolVersions?.groups?.version || contents.trim(); -} -function resolveVersion({ range, kind }) { - if (kind === "canary") return resolveCanary(range); - else if (kind === "rc") return resolveReleaseCandidate(); - else if (kind === "lts") return resolveLTS(); - else return resolveRelease(range); -} -async function resolveCanary(range) { - if (range === "latest") { - const res = await fetchWithRetries("https://dl.deno.land/canary-latest.txt"); - if (res.status !== 200) throw new Error("Failed to fetch canary version info from dl.deno.land. Please try again later."); - const version = (await res.text()).trim(); - return { - version, - kind: "canary" - }; - } else return { - version: range, - kind: "canary" - }; -} -async function resolveReleaseCandidate() { - const res = await fetchWithRetries("https://dl.deno.land/release-rc-latest.txt"); - if (res.status !== 200) throw new Error("Failed to fetch release candidate version info from dl.deno.land. Please try again later."); - const version = import_semver.default.clean((await res.text()).trim()); - if (version === null) throw new Error("Failed to parse release candidate version."); - return { - version, - kind: "rc" - }; -} -async function resolveLTS() { - const res = await fetchWithRetries("https://dl.deno.land/release-lts-latest.txt"); - if (res.status !== 200) throw new Error("Failed to fetch LTS version info from dl.deno.land. Please try again later."); - const version = import_semver.default.clean((await res.text()).trim()); - if (version === null) throw new Error("Failed to parse LTS version."); - return { - version, - kind: "lts" - }; -} -async function resolveRelease(range) { - if (range === "latest") { - const res = await fetchWithRetries("https://dl.deno.land/release-latest.txt"); - if (res.status !== 200) throw new Error("Failed to fetch release version info from dl.deno.land. Please try again later."); - let version = (await res.text()).trim(); version = import_semver.default.clean(version); if (version === null) throw new Error("Failed to parse release version."); return { @@ -19402,27 +1597,11 @@ async function resolveRelease(range) { }; } } -async function fetchWithRetries(url, maxRetries = 5) { - let sleepMs = 250; - let iterationCount = 0; - while (true) { - iterationCount++; - try { - const res = await (0, import_undici.fetch)(url); - if (res.status === 200 || iterationCount > maxRetries) return res; - } catch (err) { - if (iterationCount > maxRetries) throw err; - } - console$1.warn(`Failed fetching. Retrying in ${sleepMs}ms...`); - await new Promise((resolve) => setTimeout$1(resolve, sleepMs)); - sleepMs = Math.min(sleepMs * 2, 1e4); - } -} //#endregion -//#region node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/manifest.js"(exports, module) { - var __createBinding$2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { +//#region node_modules/.deno/@actions+tool-cache@3.0.1/node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var __createBinding = exports && exports.__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 = { @@ -19432,28 +1611,38 @@ var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0. } }; Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; - }); - var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$2 = exports && exports.__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$2(result, mod, k); - } - __setModuleDefault$2(result, mod); - return result; - }; - var __awaiter$2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -19481,14 +1670,16 @@ var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0. }); }; Object.defineProperty(exports, "__esModule", { value: true }); - exports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0; - const semver$1 = __importStar$2(require_semver()); + exports._findMatch = _findMatch; + exports._getOsVersion = _getOsVersion; + exports._readLinuxVersionFile = _readLinuxVersionFile; + const semver = __importStar(require_semver$2()); const core_1 = require_core(); const os$2 = __require("os"); const cp = __require("child_process"); const fs$2 = __require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter$2(this, void 0, void 0, function* () { + return __awaiter(this, void 0, void 0, function* () { const platFilter = os$2.platform(); let result; let match; @@ -19496,14 +1687,14 @@ var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0. for (const candidate of candidates) { const version = candidate.version; (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver$1.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + if (semver.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { file = candidate.files.find((item) => { (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); let chk = item.arch === archFilter && item.platform === platFilter; if (chk && item.platform_version) { const osVersion = module.exports._getOsVersion(); if (osVersion === item.platform_version) chk = true; - else chk = semver$1.satisfies(osVersion, item.platform_version); + else chk = semver.satisfies(osVersion, item.platform_version); } return chk; }); @@ -19521,7 +1712,6 @@ var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0. return result; }); } - exports._findMatch = _findMatch; function _getOsVersion() { const plat = os$2.platform(); let version = ""; @@ -19541,7 +1731,6 @@ var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0. } return version; } - exports._getOsVersion = _getOsVersion; function _readLinuxVersionFile() { const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; @@ -19550,13 +1739,12 @@ var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0. else if (fs$2.existsSync(osReleaseFile)) contents = fs$2.readFileSync(osReleaseFile).toString(); return contents; } - exports._readLinuxVersionFile = _readLinuxVersionFile; -} }); +})); //#endregion -//#region node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/retry-helper.js"(exports) { - var __createBinding$1 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { +//#region node_modules/.deno/@actions+tool-cache@3.0.1/node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = { @@ -19566,28 +1754,38 @@ var require_retry_helper = __commonJS({ "node_modules/.deno/@actions+tool-cache@ } }; Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; - }); - var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar$1 = exports && exports.__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$1(result, mod, k); - } - __setModuleDefault$1(result, mod); - return result; - }; - var __awaiter$1 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -19616,7 +1814,7 @@ var require_retry_helper = __commonJS({ "node_modules/.deno/@actions+tool-cache@ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.RetryHelper = void 0; - const core$1 = __importStar$1(require_core()); + const core = __importStar(require_core()); /** * Internal class for retries */ @@ -19629,17 +1827,17 @@ var require_retry_helper = __commonJS({ "node_modules/.deno/@actions+tool-cache@ if (this.minSeconds > this.maxSeconds) throw new Error("min seconds should be less than or equal to max seconds"); } execute(action, isRetryable) { - return __awaiter$1(this, void 0, void 0, function* () { + return __awaiter(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { return yield action(); } catch (err) { if (isRetryable && !isRetryable(err)) throw err; - core$1.info(err.message); + core.info(err.message); } const seconds = this.getSleepAmount(); - core$1.info(`Waiting ${seconds} seconds before trying again`); + core.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -19650,18 +1848,18 @@ var require_retry_helper = __commonJS({ "node_modules/.deno/@actions+tool-cache@ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter$1(this, void 0, void 0, function* () { + return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); }); } }; exports.RetryHelper = RetryHelper; -} }); +})); //#endregion -//#region node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/tool-cache.js -var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/tool-cache.js"(exports) { - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { +//#region node_modules/.deno/@actions+tool-cache@3.0.1/node_modules/@actions/tool-cache/lib/tool-cache.js +var require_tool_cache = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = { @@ -19671,27 +1869,37 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. } }; Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { + }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { + }) : function(o, v) { o["default"] = v; }); - var __importStar = exports && exports.__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 __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -19720,7 +1928,11 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. }); }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0; + exports.HTTPError = void 0; + exports.downloadTool = downloadTool; + exports.extractZip = extractZip; + exports.cacheDir = cacheDir; + exports.find = find; const core = __importStar(require_core()); const io = __importStar(require_io()); const crypto = __importStar(__require("crypto")); @@ -19729,7 +1941,7 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. const os$1 = __importStar(__require("os")); const path$2 = __importStar(__require("path")); const httpm = __importStar(require_lib()); - const semver = __importStar(require_semver()); + const semver = __importStar(require_semver$2()); const stream = __importStar(__require("stream")); const util = __importStar(__require("util")); const assert_1 = __require("assert"); @@ -19764,8 +1976,7 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); - const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); - return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () { + return yield new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds).execute(() => __awaiter(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { @@ -19775,28 +1986,26 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. }); }); } - exports.downloadTool = downloadTool; function downloadToolAttempt(url, dest, auth, headers) { return __awaiter(this, void 0, void 0, function* () { if (fs$1.existsSync(dest)) throw new Error(`Destination file path ${dest} already exists`); - const http$1 = new httpm.HttpClient(userAgent, [], { allowRetries: false }); + const http = new httpm.HttpClient(userAgent, [], { allowRetries: false }); if (auth) { core.debug("set auth"); if (headers === void 0) headers = {}; headers.authorization = auth; } - const response = yield http$1.get(url, headers); + const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } - const pipeline$4 = util.promisify(stream.pipeline); - const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); - const readStream = responseMessageFactory(); + const pipeline = util.promisify(stream.pipeline); + const readStream = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message)(); let succeeded = false; try { - yield pipeline$4(readStream, fs$1.createWriteStream(dest)); + yield pipeline(readStream, fs$1.createWriteStream(dest)); core.debug("download complete"); succeeded = true; return dest; @@ -19813,138 +2022,6 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. }); } /** - * Extract a .7z file - * - * @param file path to the .7z file - * @param dest destination directory. Optional. - * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this - * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will - * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is - * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line - * interface, it is smaller than the full command line interface, and it does support long paths. At the - * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. - * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path - * to 7zr.exe can be pass to this function. - * @returns path to the destination directory - */ - function extract7z(file, dest, _7zPath) { - return __awaiter(this, void 0, void 0, function* () { - (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); - (0, assert_1.ok)(file, "parameter \"file\" is required"); - dest = yield _createExtractFolder(dest); - const originalCwd = process.cwd(); - process.chdir(dest); - if (_7zPath) try { - const logLevel = core.isDebug() ? "-bb1" : "-bb0"; - const args = [ - "x", - logLevel, - "-bd", - "-sccUTF-8", - file - ]; - const options = { silent: true }; - yield (0, exec_1.exec)(`"${_7zPath}"`, args, options); - } finally { - process.chdir(originalCwd); - } - else { - const escapedScript = path$2.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); - const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); - const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); - const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; - const args = [ - "-NoLogo", - "-Sta", - "-NoProfile", - "-NonInteractive", - "-ExecutionPolicy", - "Unrestricted", - "-Command", - command - ]; - const options = { silent: true }; - try { - const powershellPath = yield io.which("powershell", true); - yield (0, exec_1.exec)(`"${powershellPath}"`, args, options); - } finally { - process.chdir(originalCwd); - } - } - return dest; - }); - } - exports.extract7z = extract7z; - /** - * Extract a compressed tar archive - * - * @param file path to the tar - * @param dest destination directory. Optional. - * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional. - * @returns path to the destination directory - */ - function extractTar(file, dest, flags = "xz") { - return __awaiter(this, void 0, void 0, function* () { - if (!file) throw new Error("parameter 'file' is required"); - dest = yield _createExtractFolder(dest); - core.debug("Checking tar --version"); - let versionOutput = ""; - yield (0, exec_1.exec)("tar --version", [], { - ignoreReturnCode: true, - silent: true, - listeners: { - stdout: (data) => versionOutput += data.toString(), - stderr: (data) => versionOutput += data.toString() - } - }); - core.debug(versionOutput.trim()); - const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); - let args; - if (flags instanceof Array) args = flags; - else args = [flags]; - if (core.isDebug() && !flags.includes("v")) args.push("-v"); - let destArg = dest; - let fileArg = file; - if (IS_WINDOWS && isGnuTar) { - args.push("--force-local"); - destArg = dest.replace(/\\/g, "/"); - fileArg = file.replace(/\\/g, "/"); - } - if (isGnuTar) { - args.push("--warning=no-unknown-keyword"); - args.push("--overwrite"); - } - args.push("-C", destArg, "-f", fileArg); - yield (0, exec_1.exec)(`tar`, args); - return dest; - }); - } - exports.extractTar = extractTar; - /** - * Extract a xar compatible archive - * - * @param file path to the archive - * @param dest destination directory. Optional. - * @param flags flags for the xar. Optional. - * @returns path to the destination directory - */ - function extractXar(file, dest, flags = []) { - return __awaiter(this, void 0, void 0, function* () { - (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); - (0, assert_1.ok)(file, "parameter \"file\" is required"); - dest = yield _createExtractFolder(dest); - let args; - if (flags instanceof Array) args = flags; - else args = [flags]; - args.push("-x", "-C", dest, "-f", file); - if (core.isDebug()) args.push("-v"); - const xarPath = yield io.which("xar", true); - yield (0, exec_1.exec)(`"${xarPath}"`, _unique(args)); - return dest; - }); - } - exports.extractXar = extractXar; - /** * Extract a zip * * @param file path to the zip @@ -19960,19 +2037,12 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. return dest; }); } - exports.extractZip = extractZip; function extractZipWin(file, dest) { return __awaiter(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io.which("pwsh", false); if (pwshPath) { - const pwshCommand = [ - `$ErrorActionPreference = 'Stop' ;`, - `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, - `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, - `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` - ].join(" "); const args = [ "-NoLogo", "-NoProfile", @@ -19980,17 +2050,16 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. "-ExecutionPolicy", "Unrestricted", "-Command", - pwshCommand + [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, + `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, + `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` + ].join(" ") ]; core.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { - const powershellCommand = [ - `$ErrorActionPreference = 'Stop' ;`, - `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`, - `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, - `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` - ].join(" "); const args = [ "-NoLogo", "-Sta", @@ -19999,7 +2068,12 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. "-ExecutionPolicy", "Unrestricted", "-Command", - powershellCommand + [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`, + `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, + `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` + ].join(" ") ]; const powershellPath = yield io.which("powershell", true); core.debug(`Using powershell at path: ${powershellPath}`); @@ -20040,33 +2114,6 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. return destPath; }); } - exports.cacheDir = cacheDir; - /** - * Caches a downloaded file (GUID) and installs it - * into the tool cache with a given targetName - * - * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. - * @param targetFile the name of the file name in the tools directory - * @param tool tool name - * @param version version of the tool. semver format - * @param arch architecture of the tool. Optional. Defaults to machine architecture - */ - function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter(this, void 0, void 0, function* () { - version = semver.clean(version) || version; - arch = arch || os$1.arch(); - core.debug(`Caching tool ${tool} ${version} ${arch}`); - core.debug(`source file: ${sourceFile}`); - if (!fs$1.statSync(sourceFile).isFile()) throw new Error("sourceFile is not a file"); - const destFolder = yield _createToolPath(tool, version, arch); - const destPath = path$2.join(destFolder, targetFile); - core.debug(`destination file ${destPath}`); - yield io.cp(sourceFile, destPath); - _completeToolPath(tool, version, arch); - return destFolder; - }); - } - exports.cacheFile = cacheFile; /** * Finds the path to a tool version in the local installed tool cache * @@ -20078,11 +2125,7 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. if (!toolName) throw new Error("toolName parameter is required"); if (!versionSpec) throw new Error("versionSpec parameter is required"); arch = arch || os$1.arch(); - if (!isExplicitVersion(versionSpec)) { - const localVersions = findAllVersions(toolName, arch); - const match = evaluateVersions(localVersions, versionSpec); - versionSpec = match; - } + if (!isExplicitVersion(versionSpec)) versionSpec = evaluateVersions(findAllVersions(toolName, arch), versionSpec); let toolPath = ""; if (versionSpec) { versionSpec = semver.clean(versionSpec) || ""; @@ -20095,7 +2138,6 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. } return toolPath; } - exports.find = find; /** * Finds the paths to all versions of a tool that are installed in the local tool cache * @@ -20115,45 +2157,6 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. } return versions; } - exports.findAllVersions = findAllVersions; - function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter(this, void 0, void 0, function* () { - let releases = []; - const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; - const http$1 = new httpm.HttpClient("tool-cache"); - const headers = {}; - if (auth) { - core.debug("set auth"); - headers.authorization = auth; - } - const response = yield http$1.getJson(treeUrl, headers); - if (!response.result) return releases; - let manifestUrl = ""; - for (const item of response.result.tree) if (item.path === "versions-manifest.json") { - manifestUrl = item.url; - break; - } - headers["accept"] = "application/vnd.github.VERSION.raw"; - let versionsRaw = yield (yield http$1.get(manifestUrl, headers)).readBody(); - if (versionsRaw) { - versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); - try { - releases = JSON.parse(versionsRaw); - } catch (_a) { - core.debug("Invalid json"); - } - } - return releases; - }); - } - exports.getManifestFromRepo = getManifestFromRepo; - function findFromManifest(versionSpec, stable, manifest, archFilter = os$1.arch()) { - return __awaiter(this, void 0, void 0, function* () { - const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); - return match; - }); - } - exports.findFromManifest = findFromManifest; function _createExtractFolder(dest) { return __awaiter(this, void 0, void 0, function* () { if (!dest) dest = path$2.join(_getTempDirectory(), crypto.randomUUID()); @@ -20173,8 +2176,7 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. }); } function _completeToolPath(tool, version, arch) { - const folderPath = path$2.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || ""); - const markerPath = `${folderPath}.complete`; + const markerPath = `${path$2.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || "")}.complete`; fs$1.writeFileSync(markerPath, ""); core.debug("finished caching tool"); } @@ -20186,11 +2188,10 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. function isExplicitVersion(versionSpec) { const c = semver.clean(versionSpec) || ""; core.debug(`isExplicit: ${c}`); - const valid$2 = semver.valid(c) != null; - core.debug(`explicit? ${valid$2}`); - return valid$2; + const valid = semver.valid(c) != null; + core.debug(`explicit? ${valid}`); + return valid; } - exports.isExplicitVersion = isExplicitVersion; /** * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec` * @@ -20206,8 +2207,7 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. }); for (let i = versions.length - 1; i >= 0; i--) { const potential = versions[i]; - const satisfied = semver.satisfies(potential, versionSpec); - if (satisfied) { + if (semver.satisfies(potential, versionSpec)) { version = potential; break; } @@ -20216,7 +2216,6 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. else core.debug("match not found"); return version; } - exports.evaluateVersions = evaluateVersions; /** * Gets RUNNER_TOOL_CACHE */ @@ -20240,18 +2239,11 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. const value = global[key]; return value !== void 0 ? value : defaultValue; } - /** - * Returns an array of unique values. - * @param values Values to make unique. - */ - function _unique(values) { - return Array.from(new Set(values)); - } -} }); -var import_tool_cache = __toESM(require_tool_cache(), 1); +})); //#endregion //#region src/install.ts +var import_tool_cache = /* @__PURE__ */ __toESM(require_tool_cache(), 1); async function install(version) { const cachedPath = import_tool_cache.find("deno", version.kind === "canary" ? `0.0.0-${version.version}` : version.version); if (cachedPath) { @@ -20334,7 +2326,7 @@ async function main() { import_core.setOutput("release-channel", version.kind); import_core.info("Installation complete."); if (isCachingEnabled()) { - const { restoreCache } = await import("./cache-CSb2jW5L.mjs"); + const { restoreCache } = await import("./cache-DpsdXZtI.mjs").then((n) => n.t); await restoreCache(import_core.getInput("cache-hash")); } } catch (err) { @@ -20344,4 +2336,5 @@ async function main() { } main(); -//#endregion \ No newline at end of file +//#endregion +export { }; \ No newline at end of file diff --git a/dist/post.mjs b/dist/post.mjs index a43377b..aff5e49 100644 --- a/dist/post.mjs +++ b/dist/post.mjs @@ -1,8 +1,9 @@ -import { import_core } from "./semver-C43QPvfi.mjs"; -import { saveCache } from "./cache-BG71A93Z.mjs"; +import { f as __toESM, n as require_core } from "./semver-O4tt7wRT.mjs"; +import { n as saveCache } from "./cache-DpsdXZtI.mjs"; import process from "node:process"; //#region src/post.ts +var import_core = /* @__PURE__ */ __toESM(require_core(), 1); async function main() { try { await saveCache(); @@ -13,4 +14,5 @@ async function main() { } main(); -//#endregion \ No newline at end of file +//#endregion +export { }; \ No newline at end of file diff --git a/dist/semver-C43QPvfi.mjs b/dist/semver-C43QPvfi.mjs deleted file mode 100644 index 1fd5d46..0000000 --- a/dist/semver-C43QPvfi.mjs +++ /dev/null @@ -1,17978 +0,0 @@ -import { createRequire } from "module"; - -//#region rolldown:runtime -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n = keys.length, key; i$1 < n; i$1++) { - key = keys[i$1]; - if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); -var __require = /* @__PURE__ */ createRequire(import.meta.url); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js -var require_utils$1 = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toCommandProperties = exports.toCommandValue = void 0; - /** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ - function toCommandValue(input) { - if (input === null || input === void 0) return ""; - else if (typeof input === "string" || input instanceof String) return input; - return JSON.stringify(input); - } - exports.toCommandValue = toCommandValue; - /** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ - function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) return {}; - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; - } - exports.toCommandProperties = toCommandProperties; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js -var require_command = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js"(exports) { - var __createBinding$9 = exports && exports.__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$9 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$9 = exports && exports.__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$9(result, mod, k); - } - __setModuleDefault$9(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.issue = exports.issueCommand = void 0; - const os$3 = __importStar$9(__require("os")); - const utils_1$3 = require_utils$1(); - /** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ - function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os$3.EOL); - } - exports.issueCommand = issueCommand; - function issue(name, message = "") { - issueCommand(name, {}, message); - } - exports.issue = issue; - const CMD_STRING = "::"; - var Command = class { - constructor(command, properties, message) { - if (!command) command = "missing.command"; - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) first = false; - else cmdStr += ","; - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } - }; - function escapeData(s) { - return (0, utils_1$3.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); - } - function escapeProperty(s) { - return (0, utils_1$3.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); - } -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js -var require_file_command = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js"(exports) { - var __createBinding$8 = exports && exports.__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$8 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$8 = exports && exports.__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$8(result, mod, k); - } - __setModuleDefault$8(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; - const crypto$3 = __importStar$8(__require("crypto")); - const fs$1 = __importStar$8(__require("fs")); - const os$2 = __importStar$8(__require("os")); - const utils_1$2 = require_utils$1(); - function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); - if (!fs$1.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); - fs$1.appendFileSync(filePath, `${(0, utils_1$2.toCommandValue)(message)}${os$2.EOL}`, { encoding: "utf8" }); - } - exports.issueFileCommand = issueFileCommand; - function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto$3.randomUUID()}`; - const convertedValue = (0, utils_1$2.toCommandValue)(value); - if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - return `${key}<<${delimiter}${os$2.EOL}${convertedValue}${os$2.EOL}${delimiter}`; - } - exports.prepareKeyValueMessage = prepareKeyValueMessage; -} }); - -//#endregion -//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js -var require_proxy = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.checkBypass = exports.getProxyUrl = void 0; - function getProxyUrl$1(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) return void 0; - const proxyVar = (() => { - if (usingSsl) return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - else return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - })(); - if (proxyVar) try { - return new DecodedURL(proxyVar); - } catch (_a$1) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); - } - else return void 0; - } - exports.getProxyUrl = getProxyUrl$1; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) return false; - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) return true; - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) return false; - let reqPort; - if (reqUrl.port) reqPort = Number(reqUrl.port); - else if (reqUrl.protocol === "http:") reqPort = 80; - else if (reqUrl.protocol === "https:") reqPort = 443; - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) return true; - return false; - } - exports.checkBypass = checkBypass; - function isLoopbackAddress(host) { - 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; - } - }; -} }); - -//#endregion -//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js -var require_tunnel$1 = __commonJS({ "node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js"(exports) { - var net$3 = __require("net"); - var tls$1 = __require("tls"); - var http$2 = __require("http"); - var https$1 = __require("https"); - var events$1 = __require("events"); - var assert$20 = __require("assert"); - var util$17 = __require("util"); - exports.httpOverHttp = httpOverHttp; - exports.httpsOverHttp = httpsOverHttp; - exports.httpOverHttps = httpOverHttps; - exports.httpsOverHttps = httpsOverHttps; - function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http$2.request; - return agent; - } - function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http$2.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; - } - function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https$1.request; - return agent; - } - function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https$1.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; - } - function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http$2.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - self.on("free", function onFree(socket, host, port, localAddress) { - var options$1 = toOptions(host, port, localAddress); - for (var i$1 = 0, len = self.requests.length; i$1 < len; ++i$1) { - var pending = self.requests[i$1]; - if (pending.host === options$1.host && pending.port === options$1.port) { - self.requests.splice(i$1, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); - } - util$17.inherits(TunnelingAgent, events$1.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); - return; - } - self.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); - } - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener("free", onFree); - socket.removeListener("close", onCloseOrRemove); - socket.removeListener("agentRemove", onCloseOrRemove); - } - }); - }; - TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: "CONNECT", - path: options.host + ":" + options.port, - agent: false, - headers: { host: options.host + ":" + options.port } - }); - if (options.localAddress) connectOptions.localAddress = options.localAddress; - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); - } - debug$2("making CONNECT request"); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; - connectReq.once("response", onResponse); - connectReq.once("upgrade", onUpgrade); - connectReq.once("connect", onConnect); - connectReq.once("error", onError$1); - connectReq.end(); - function onResponse(res) { - res.upgrade = true; - } - function onUpgrade(res, socket, head) { - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - if (res.statusCode !== 200) { - debug$2("tunneling socket could not be established, statusCode=%d", res.statusCode); - socket.destroy(); - var error$1 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error$1.code = "ECONNRESET"; - options.request.emit("error", error$1); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug$2("got illegal response body from proxy"); - socket.destroy(); - var error$1 = new Error("got illegal response body from proxy"); - error$1.code = "ECONNRESET"; - options.request.emit("error", error$1); - self.removeSocket(placeholder); - return; - } - debug$2("tunneling connection has established"); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - function onError$1(cause) { - connectReq.removeAllListeners(); - debug$2("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); - var error$1 = new Error("tunneling socket could not be established, cause=" + cause.message); - error$1.code = "ECONNRESET"; - options.request.emit("error", error$1); - self.removeSocket(placeholder); - } - }; - TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket); - if (pos === -1) return; - this.sockets.splice(pos, 1); - var pending = this.requests.shift(); - if (pending) this.createSocket(pending, function(socket$1) { - pending.request.onSocket(socket$1); - }); - }; - function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader("host"); - var tlsOptions = mergeOptions({}, self.options, { - socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host - }); - var secureSocket = tls$1.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); - } - function toOptions(host, port, localAddress) { - if (typeof host === "string") return { - host, - port, - localAddress - }; - return host; - } - function mergeOptions(target) { - for (var i$1 = 1, len = arguments.length; i$1 < len; ++i$1) { - var overrides = arguments[i$1]; - if (typeof overrides === "object") { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== void 0) target[k] = overrides[k]; - } - } - } - return target; - } - var debug$2; - if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug$2 = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; - else args.unshift("TUNNEL:"); - console.error.apply(console, args); - }; - else debug$2 = function() {}; - exports.debug = debug$2; -} }); - -//#endregion -//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/index.js -var require_tunnel = __commonJS({ "node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/index.js"(exports, module) { - module.exports = require_tunnel$1(); -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/symbols.js -var require_symbols$4 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/symbols.js"(exports, module) { - module.exports = { - kClose: Symbol("close"), - kDestroy: Symbol("destroy"), - kDispatch: Symbol("dispatch"), - kUrl: Symbol("url"), - kWriting: Symbol("writing"), - kResuming: Symbol("resuming"), - kQueue: Symbol("queue"), - kConnect: Symbol("connect"), - kConnecting: Symbol("connecting"), - kHeadersList: Symbol("headers list"), - kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), - kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), - kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), - kKeepAliveTimeoutValue: Symbol("keep alive timeout"), - kKeepAlive: Symbol("keep alive"), - kHeadersTimeout: Symbol("headers timeout"), - kBodyTimeout: Symbol("body timeout"), - kServerName: Symbol("server name"), - kLocalAddress: Symbol("local address"), - kHost: Symbol("host"), - kNoRef: Symbol("no ref"), - kBodyUsed: Symbol("used"), - kRunning: Symbol("running"), - kBlocking: Symbol("blocking"), - kPending: Symbol("pending"), - kSize: Symbol("size"), - kBusy: Symbol("busy"), - kQueued: Symbol("queued"), - kFree: Symbol("free"), - kConnected: Symbol("connected"), - kClosed: Symbol("closed"), - kNeedDrain: Symbol("need drain"), - kReset: Symbol("reset"), - kDestroyed: Symbol.for("nodejs.stream.destroyed"), - kMaxHeadersSize: Symbol("max headers size"), - kRunningIdx: Symbol("running index"), - kPendingIdx: Symbol("pending index"), - kError: Symbol("error"), - kClients: Symbol("clients"), - kClient: Symbol("client"), - kParser: Symbol("parser"), - kOnDestroyed: Symbol("destroy callbacks"), - kPipelining: Symbol("pipelining"), - kSocket: Symbol("socket"), - kHostHeader: Symbol("host header"), - kConnector: Symbol("connector"), - kStrictContentLength: Symbol("strict content length"), - kMaxRedirections: Symbol("maxRedirections"), - kMaxRequests: Symbol("maxRequestsPerClient"), - kProxy: Symbol("proxy agent options"), - kCounter: Symbol("socket request counter"), - kInterceptors: Symbol("dispatch interceptors"), - kMaxResponseSize: Symbol("max response size"), - kHTTP2Session: Symbol("http2Session"), - kHTTP2SessionState: Symbol("http2Session state"), - kHTTP2BuildRequest: Symbol("http2 build request"), - kHTTP1BuildRequest: Symbol("http1 build request"), - kHTTP2CopyHeaders: Symbol("http2 copy headers"), - kHTTPConnVersion: Symbol("http connection version"), - kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), - kConstruct: Symbol("constructable") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/errors.js -var require_errors = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/errors.js"(exports, module) { - var UndiciError$2 = class extends Error { - constructor(message) { - super(message); - this.name = "UndiciError"; - this.code = "UND_ERR"; - } - }; - var ConnectTimeoutError$1 = class ConnectTimeoutError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ConnectTimeoutError$1); - this.name = "ConnectTimeoutError"; - this.message = message || "Connect Timeout Error"; - this.code = "UND_ERR_CONNECT_TIMEOUT"; - } - }; - var HeadersTimeoutError$1 = class HeadersTimeoutError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, HeadersTimeoutError$1); - this.name = "HeadersTimeoutError"; - this.message = message || "Headers Timeout Error"; - this.code = "UND_ERR_HEADERS_TIMEOUT"; - } - }; - var HeadersOverflowError$1 = class HeadersOverflowError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, HeadersOverflowError$1); - this.name = "HeadersOverflowError"; - this.message = message || "Headers Overflow Error"; - this.code = "UND_ERR_HEADERS_OVERFLOW"; - } - }; - var BodyTimeoutError$1 = class BodyTimeoutError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, BodyTimeoutError$1); - this.name = "BodyTimeoutError"; - this.message = message || "Body Timeout Error"; - this.code = "UND_ERR_BODY_TIMEOUT"; - } - }; - var ResponseStatusCodeError$1 = class ResponseStatusCodeError$1 extends UndiciError$2 { - constructor(message, statusCode, headers, body) { - super(message); - Error.captureStackTrace(this, ResponseStatusCodeError$1); - this.name = "ResponseStatusCodeError"; - this.message = message || "Response Status Code Error"; - this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body; - this.status = statusCode; - this.statusCode = statusCode; - this.headers = headers; - } - }; - var InvalidArgumentError$22 = class InvalidArgumentError$22 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, InvalidArgumentError$22); - this.name = "InvalidArgumentError"; - this.message = message || "Invalid Argument Error"; - this.code = "UND_ERR_INVALID_ARG"; - } - }; - var InvalidReturnValueError$2 = class InvalidReturnValueError$2 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, InvalidReturnValueError$2); - this.name = "InvalidReturnValueError"; - this.message = message || "Invalid Return Value Error"; - this.code = "UND_ERR_INVALID_RETURN_VALUE"; - } - }; - var RequestAbortedError$9 = class RequestAbortedError$9 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, RequestAbortedError$9); - this.name = "AbortError"; - this.message = message || "Request aborted"; - this.code = "UND_ERR_ABORTED"; - } - }; - var InformationalError$1 = class InformationalError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, InformationalError$1); - this.name = "InformationalError"; - this.message = message || "Request information"; - this.code = "UND_ERR_INFO"; - } - }; - var RequestContentLengthMismatchError$1 = class RequestContentLengthMismatchError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, RequestContentLengthMismatchError$1); - this.name = "RequestContentLengthMismatchError"; - this.message = message || "Request body length does not match content-length header"; - this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; - } - }; - var ResponseContentLengthMismatchError$1 = class ResponseContentLengthMismatchError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ResponseContentLengthMismatchError$1); - this.name = "ResponseContentLengthMismatchError"; - this.message = message || "Response body length does not match content-length header"; - this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; - } - }; - var ClientDestroyedError$2 = class ClientDestroyedError$2 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ClientDestroyedError$2); - this.name = "ClientDestroyedError"; - this.message = message || "The client is destroyed"; - this.code = "UND_ERR_DESTROYED"; - } - }; - var ClientClosedError$1 = class ClientClosedError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ClientClosedError$1); - this.name = "ClientClosedError"; - this.message = message || "The client is closed"; - this.code = "UND_ERR_CLOSED"; - } - }; - var SocketError$3 = class SocketError$3 extends UndiciError$2 { - constructor(message, socket) { - super(message); - Error.captureStackTrace(this, SocketError$3); - this.name = "SocketError"; - this.message = message || "Socket error"; - this.code = "UND_ERR_SOCKET"; - this.socket = socket; - } - }; - var NotSupportedError$2 = class NotSupportedError$2 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, NotSupportedError$2); - this.name = "NotSupportedError"; - this.message = message || "Not supported error"; - this.code = "UND_ERR_NOT_SUPPORTED"; - } - }; - var BalancedPoolMissingUpstreamError$1 = class extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, NotSupportedError$2); - this.name = "MissingUpstreamError"; - this.message = message || "No upstream has been added to the BalancedPool"; - this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; - } - }; - var HTTPParserError$1 = class HTTPParserError$1 extends Error { - constructor(message, code, data) { - super(message); - Error.captureStackTrace(this, HTTPParserError$1); - this.name = "HTTPParserError"; - this.code = code ? `HPE_${code}` : void 0; - this.data = data ? data.toString() : void 0; - } - }; - var ResponseExceededMaxSizeError$1 = class ResponseExceededMaxSizeError$1 extends UndiciError$2 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ResponseExceededMaxSizeError$1); - this.name = "ResponseExceededMaxSizeError"; - this.message = message || "Response content exceeded max size"; - this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; - } - }; - var RequestRetryError$1 = class RequestRetryError$1 extends UndiciError$2 { - constructor(message, code, { headers, data }) { - super(message); - Error.captureStackTrace(this, RequestRetryError$1); - this.name = "RequestRetryError"; - this.message = message || "Request retry error"; - this.code = "UND_ERR_REQ_RETRY"; - this.statusCode = code; - this.data = data; - this.headers = headers; - } - }; - module.exports = { - HTTPParserError: HTTPParserError$1, - UndiciError: UndiciError$2, - HeadersTimeoutError: HeadersTimeoutError$1, - HeadersOverflowError: HeadersOverflowError$1, - BodyTimeoutError: BodyTimeoutError$1, - RequestContentLengthMismatchError: RequestContentLengthMismatchError$1, - ConnectTimeoutError: ConnectTimeoutError$1, - ResponseStatusCodeError: ResponseStatusCodeError$1, - InvalidArgumentError: InvalidArgumentError$22, - InvalidReturnValueError: InvalidReturnValueError$2, - RequestAbortedError: RequestAbortedError$9, - ClientDestroyedError: ClientDestroyedError$2, - ClientClosedError: ClientClosedError$1, - InformationalError: InformationalError$1, - SocketError: SocketError$3, - NotSupportedError: NotSupportedError$2, - ResponseContentLengthMismatchError: ResponseContentLengthMismatchError$1, - BalancedPoolMissingUpstreamError: BalancedPoolMissingUpstreamError$1, - ResponseExceededMaxSizeError: ResponseExceededMaxSizeError$1, - RequestRetryError: RequestRetryError$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/constants.js -var require_constants$4 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/constants.js"(exports, module) { - /** @type {Record} */ - const headerNameLowerCasedRecord$1 = {}; - const wellknownHeaderNames = [ - "Accept", - "Accept-Encoding", - "Accept-Language", - "Accept-Ranges", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Age", - "Allow", - "Alt-Svc", - "Alt-Used", - "Authorization", - "Cache-Control", - "Clear-Site-Data", - "Connection", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-Length", - "Content-Location", - "Content-Range", - "Content-Security-Policy", - "Content-Security-Policy-Report-Only", - "Content-Type", - "Cookie", - "Cross-Origin-Embedder-Policy", - "Cross-Origin-Opener-Policy", - "Cross-Origin-Resource-Policy", - "Date", - "Device-Memory", - "Downlink", - "ECT", - "ETag", - "Expect", - "Expect-CT", - "Expires", - "Forwarded", - "From", - "Host", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Range", - "If-Unmodified-Since", - "Keep-Alive", - "Last-Modified", - "Link", - "Location", - "Max-Forwards", - "Origin", - "Permissions-Policy", - "Pragma", - "Proxy-Authenticate", - "Proxy-Authorization", - "RTT", - "Range", - "Referer", - "Referrer-Policy", - "Refresh", - "Retry-After", - "Sec-WebSocket-Accept", - "Sec-WebSocket-Extensions", - "Sec-WebSocket-Key", - "Sec-WebSocket-Protocol", - "Sec-WebSocket-Version", - "Server", - "Server-Timing", - "Service-Worker-Allowed", - "Service-Worker-Navigation-Preload", - "Set-Cookie", - "SourceMap", - "Strict-Transport-Security", - "Supports-Loading-Mode", - "TE", - "Timing-Allow-Origin", - "Trailer", - "Transfer-Encoding", - "Upgrade", - "Upgrade-Insecure-Requests", - "User-Agent", - "Vary", - "Via", - "WWW-Authenticate", - "X-Content-Type-Options", - "X-DNS-Prefetch-Control", - "X-Frame-Options", - "X-Permitted-Cross-Domain-Policies", - "X-Powered-By", - "X-Requested-With", - "X-XSS-Protection" - ]; - for (let i$1 = 0; i$1 < wellknownHeaderNames.length; ++i$1) { - const key = wellknownHeaderNames[i$1]; - const lowerCasedKey = key.toLowerCase(); - headerNameLowerCasedRecord$1[key] = headerNameLowerCasedRecord$1[lowerCasedKey] = lowerCasedKey; - } - Object.setPrototypeOf(headerNameLowerCasedRecord$1, null); - module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord: headerNameLowerCasedRecord$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/util.js -var require_util$6 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/util.js"(exports, module) { - const assert$19 = __require("assert"); - const { kDestroyed: kDestroyed$1, kBodyUsed: kBodyUsed$2 } = require_symbols$4(); - const { IncomingMessage } = __require("http"); - const stream$1 = __require("stream"); - const net$2 = __require("net"); - const { InvalidArgumentError: InvalidArgumentError$21 } = require_errors(); - const { Blob: Blob$5 } = __require("buffer"); - const nodeUtil = __require("util"); - const { stringify: stringify$2 } = __require("querystring"); - const { headerNameLowerCasedRecord } = require_constants$4(); - const [nodeMajor$1, nodeMinor$1] = process.versions.node.split(".").map((v) => Number(v)); - function nop$1() {} - function isStream(obj) { - return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; - } - function isBlobLike$7(object) { - return Blob$5 && object instanceof Blob$5 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); - } - function buildURL$2(url, queryParams) { - if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); - const stringified = stringify$2(queryParams); - if (stringified) url += "?" + stringified; - return url; - } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) throw new InvalidArgumentError$21("Invalid URL protocol: the URL must start with `http:` or `https:`."); - return url; - } - if (!url || typeof url !== "object") throw new InvalidArgumentError$21("Invalid URL: The URL argument must be a non-null object."); - if (!/^https?:/.test(url.origin || url.protocol)) throw new InvalidArgumentError$21("Invalid URL protocol: the URL must start with `http:` or `https:`."); - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) throw new InvalidArgumentError$21("Invalid URL: port must be a valid integer or a string representation of an integer."); - if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError$21("Invalid URL path: the path must be a string or null/undefined."); - if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError$21("Invalid URL pathname: the pathname must be a string or null/undefined."); - if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError$21("Invalid URL hostname: the hostname must be a string or null/undefined."); - if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError$21("Invalid URL origin: the origin must be a string or null/undefined."); - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path$5 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin.endsWith("/")) origin = origin.substring(0, origin.length - 1); - if (path$5 && !path$5.startsWith("/")) path$5 = `/${path$5}`; - url = new URL(origin + path$5); - } - return url; - } - function parseOrigin$1(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError$21("invalid url"); - return url; - } - function getHostname(host) { - if (host[0] === "[") { - const idx$1 = host.indexOf("]"); - assert$19(idx$1 !== -1); - return host.substring(1, idx$1); - } - const idx = host.indexOf(":"); - if (idx === -1) return host; - return host.substring(0, idx); - } - function getServerName(host) { - if (!host) return null; - assert$19.strictEqual(typeof host, "string"); - const servername = getHostname(host); - if (net$2.isIP(servername)) return ""; - return servername; - } - function deepClone(obj) { - return JSON.parse(JSON.stringify(obj)); - } - function isAsyncIterable(obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); - } - function isIterable(obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); - } - function bodyLength(body) { - if (body == null) return 0; - else if (isStream(body)) { - const state = body._readableState; - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if (isBlobLike$7(body)) return body.size != null ? body.size : null; - else if (isBuffer(body)) return body.byteLength; - return null; - } - function isDestroyed(stream$2) { - return !stream$2 || !!(stream$2.destroyed || stream$2[kDestroyed$1]); - } - function isReadableAborted(stream$2) { - const state = stream$2 && stream$2._readableState; - return isDestroyed(stream$2) && state && !state.endEmitted; - } - function destroy(stream$2, err) { - if (stream$2 == null || !isStream(stream$2) || isDestroyed(stream$2)) return; - if (typeof stream$2.destroy === "function") { - if (Object.getPrototypeOf(stream$2).constructor === IncomingMessage) stream$2.socket = null; - stream$2.destroy(err); - } else if (err) process.nextTick((stream$3, err$1) => { - stream$3.emit("error", err$1); - }, stream$2, err); - if (stream$2.destroyed !== true) stream$2[kDestroyed$1] = true; - } - const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); - return m ? parseInt(m[1], 10) * 1e3 : null; - } - /** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ - function headerNameToString(value) { - return headerNameLowerCasedRecord[value] || value.toLowerCase(); - } - function parseHeaders$1(headers, obj = {}) { - if (!Array.isArray(headers)) return headers; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) { - const key = headers[i$1].toString().toLowerCase(); - let val = obj[key]; - if (!val) if (Array.isArray(headers[i$1 + 1])) obj[key] = headers[i$1 + 1].map((x) => x.toString("utf8")); - else obj[key] = headers[i$1 + 1].toString("utf8"); - else { - if (!Array.isArray(val)) { - val = [val]; - obj[key] = val; - } - val.push(headers[i$1 + 1].toString("utf8")); - } - } - if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); - return obj; - } - function parseRawHeaders(headers) { - const ret = []; - let hasContentLength = false; - let contentDispositionIdx = -1; - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0].toString(); - const val = headers[n + 1].toString("utf8"); - if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val); - hasContentLength = true; - } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = ret.push(key, val) - 1; - else ret.push(key, val); - } - if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); - return ret; - } - function isBuffer(buffer) { - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); - } - function validateHandler(handler, method, upgrade$1) { - if (!handler || typeof handler !== "object") throw new InvalidArgumentError$21("handler must be an object"); - if (typeof handler.onConnect !== "function") throw new InvalidArgumentError$21("invalid onConnect method"); - if (typeof handler.onError !== "function") throw new InvalidArgumentError$21("invalid onError method"); - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError$21("invalid onBodySent method"); - if (upgrade$1 || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError$21("invalid onUpgrade method"); - } else { - if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError$21("invalid onHeaders method"); - if (typeof handler.onData !== "function") throw new InvalidArgumentError$21("invalid onData method"); - if (typeof handler.onComplete !== "function") throw new InvalidArgumentError$21("invalid onComplete method"); - } - } - function isDisturbed$2(body) { - return !!(body && (stream$1.isDisturbed ? stream$1.isDisturbed(body) || body[kBodyUsed$2] : body[kBodyUsed$2] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); - } - function isErrored$2(body) { - return !!(body && (stream$1.isErrored ? stream$1.isErrored(body) : /state: 'errored'/.test(nodeUtil.inspect(body)))); - } - function isReadable$1(body) { - return !!(body && (stream$1.isReadable ? stream$1.isReadable(body) : /state: 'readable'/.test(nodeUtil.inspect(body)))); - } - function getSocketInfo(socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - }; - } - async function* convertIterableToBuffer(iterable) { - for await (const chunk of iterable) yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); - } - let ReadableStream$5; - function ReadableStreamFrom$3(iterable) { - if (!ReadableStream$5) ReadableStream$5 = __require("stream/web").ReadableStream; - if (ReadableStream$5.from) return ReadableStream$5.from(convertIterableToBuffer(iterable)); - let iterator; - return new ReadableStream$5({ - async start() { - iterator = iterable[Symbol.asyncIterator](); - }, - async pull(controller) { - const { done, value } = await iterator.next(); - if (done) queueMicrotask(() => { - controller.close(); - }); - else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - controller.enqueue(new Uint8Array(buf)); - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - } - }, 0); - } - function isFormDataLike(object) { - return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; - } - function throwIfAborted$1(signal) { - if (!signal) return; - if (typeof signal.throwIfAborted === "function") signal.throwIfAborted(); - else if (signal.aborted) { - const err = new Error("The operation was aborted"); - err.name = "AbortError"; - throw err; - } - } - function addAbortListener$2(signal, listener) { - if ("addEventListener" in signal) { - signal.addEventListener("abort", listener, { once: true }); - return () => signal.removeEventListener("abort", listener); - } - signal.addListener("abort", listener); - return () => signal.removeListener("abort", listener); - } - const hasToWellFormed = !!String.prototype.toWellFormed; - /** - * @param {string} val - */ - function toUSVString$5(val) { - if (hasToWellFormed) return `${val}`.toWellFormed(); - else if (nodeUtil.toUSVString) return nodeUtil.toUSVString(val); - return `${val}`; - } - function parseRangeHeader$1(range) { - if (range == null || range === "") return { - start: 0, - end: null, - size: null - }; - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; - return m ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } : null; - } - const kEnumerableProperty$9 = Object.create(null); - kEnumerableProperty$9.enumerable = true; - module.exports = { - kEnumerableProperty: kEnumerableProperty$9, - nop: nop$1, - isDisturbed: isDisturbed$2, - isErrored: isErrored$2, - isReadable: isReadable$1, - toUSVString: toUSVString$5, - isReadableAborted, - isBlobLike: isBlobLike$7, - parseOrigin: parseOrigin$1, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - parseRawHeaders, - parseHeaders: parseHeaders$1, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom: ReadableStreamFrom$3, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL: buildURL$2, - throwIfAborted: throwIfAborted$1, - addAbortListener: addAbortListener$2, - parseRangeHeader: parseRangeHeader$1, - nodeMajor: nodeMajor$1, - nodeMinor: nodeMinor$1, - nodeHasAutoSelectFamily: nodeMajor$1 > 18 || nodeMajor$1 === 18 && nodeMinor$1 >= 13, - safeHTTPMethods: [ - "GET", - "HEAD", - "OPTIONS", - "TRACE" - ] - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/timers.js -var require_timers = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/timers.js"(exports, module) { - let fastNow = Date.now(); - let fastNowTimeout; - const fastTimers = []; - function onTimeout() { - fastNow = Date.now(); - let len = fastTimers.length; - let idx = 0; - while (idx < len) { - const timer = fastTimers[idx]; - if (timer.state === 0) timer.state = fastNow + timer.delay; - else if (timer.state > 0 && fastNow >= timer.state) { - timer.state = -1; - timer.callback(timer.opaque); - } - if (timer.state === -1) { - timer.state = -2; - if (idx !== len - 1) fastTimers[idx] = fastTimers.pop(); - else fastTimers.pop(); - len -= 1; - } else idx += 1; - } - if (fastTimers.length > 0) refreshTimeout(); - } - function refreshTimeout() { - if (fastNowTimeout && fastNowTimeout.refresh) fastNowTimeout.refresh(); - else { - clearTimeout(fastNowTimeout); - fastNowTimeout = setTimeout(onTimeout, 1e3); - if (fastNowTimeout.unref) fastNowTimeout.unref(); - } - } - var Timeout = class { - constructor(callback, delay, opaque) { - this.callback = callback; - this.delay = delay; - this.opaque = opaque; - this.state = -2; - this.refresh(); - } - refresh() { - if (this.state === -2) { - fastTimers.push(this); - if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); - } - this.state = 0; - } - clear() { - this.state = -1; - } - }; - module.exports = { - setTimeout(callback, delay, opaque) { - return delay < 1e3 ? setTimeout(callback, delay, opaque) : new Timeout(callback, delay, opaque); - }, - clearTimeout(timeout) { - if (timeout instanceof Timeout) timeout.clear(); - else clearTimeout(timeout); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js -var require_sbmh = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports, module) { - /** - * Copyright Brian White. All rights reserved. - * - * @see https://github.com/mscdex/streamsearch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool - */ - const EventEmitter$2 = __require("node:events").EventEmitter; - const inherits$5 = __require("node:util").inherits; - function SBMH(needle) { - if (typeof needle === "string") needle = Buffer.from(needle); - if (!Buffer.isBuffer(needle)) throw new TypeError("The needle has to be a String or a Buffer."); - const needleLength = needle.length; - if (needleLength === 0) throw new Error("The needle cannot be an empty String/Buffer."); - if (needleLength > 256) throw new Error("The needle cannot have a length bigger than 256."); - this.maxMatches = Infinity; - this.matches = 0; - this._occ = new Array(256).fill(needleLength); - this._lookbehind_size = 0; - this._needle = needle; - this._bufpos = 0; - this._lookbehind = Buffer.alloc(needleLength); - for (var i$1 = 0; i$1 < needleLength - 1; ++i$1) this._occ[needle[i$1]] = needleLength - 1 - i$1; - } - inherits$5(SBMH, EventEmitter$2); - SBMH.prototype.reset = function() { - this._lookbehind_size = 0; - this.matches = 0; - this._bufpos = 0; - }; - SBMH.prototype.push = function(chunk, pos) { - if (!Buffer.isBuffer(chunk)) chunk = Buffer.from(chunk, "binary"); - const chlen = chunk.length; - this._bufpos = pos || 0; - let r; - while (r !== chlen && this.matches < this.maxMatches) r = this._sbmh_feed(chunk); - return r; - }; - SBMH.prototype._sbmh_feed = function(data) { - const len = data.length; - const needle = this._needle; - const needleLength = needle.length; - const lastNeedleChar = needle[needleLength - 1]; - let pos = -this._lookbehind_size; - let ch; - if (pos < 0) { - while (pos < 0 && pos <= len - needleLength) { - ch = this._sbmh_lookup_char(data, pos + needleLength - 1); - if (ch === lastNeedleChar && this._sbmh_memcmp(data, pos, needleLength - 1)) { - this._lookbehind_size = 0; - ++this.matches; - this.emit("info", true); - return this._bufpos = pos + needleLength; - } - pos += this._occ[ch]; - } - if (pos < 0) while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) ++pos; - if (pos >= 0) { - this.emit("info", false, this._lookbehind, 0, this._lookbehind_size); - this._lookbehind_size = 0; - } else { - const bytesToCutOff = this._lookbehind_size + pos; - if (bytesToCutOff > 0) this.emit("info", false, this._lookbehind, 0, bytesToCutOff); - this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, this._lookbehind_size - bytesToCutOff); - this._lookbehind_size -= bytesToCutOff; - data.copy(this._lookbehind, this._lookbehind_size); - this._lookbehind_size += len; - this._bufpos = len; - return len; - } - } - pos += (pos >= 0) * this._bufpos; - if (data.indexOf(needle, pos) !== -1) { - pos = data.indexOf(needle, pos); - ++this.matches; - if (pos > 0) this.emit("info", true, data, this._bufpos, pos); - else this.emit("info", true); - return this._bufpos = pos + needleLength; - } else pos = len - needleLength; - while (pos < len && (data[pos] !== needle[0] || Buffer.compare(data.subarray(pos, pos + len - pos), needle.subarray(0, len - pos)) !== 0)) ++pos; - if (pos < len) { - data.copy(this._lookbehind, 0, pos, pos + (len - pos)); - this._lookbehind_size = len - pos; - } - if (pos > 0) this.emit("info", false, data, this._bufpos, pos < len ? pos : len); - this._bufpos = len; - return len; - }; - SBMH.prototype._sbmh_lookup_char = function(data, pos) { - return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; - }; - SBMH.prototype._sbmh_memcmp = function(data, pos, len) { - for (var i$1 = 0; i$1 < len; ++i$1) if (this._sbmh_lookup_char(data, pos + i$1) !== this._needle[i$1]) return false; - return true; - }; - module.exports = SBMH; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js -var require_PartStream = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports, module) { - const inherits$4 = __require("node:util").inherits; - const ReadableStream$4 = __require("node:stream").Readable; - function PartStream$1(opts) { - ReadableStream$4.call(this, opts); - } - inherits$4(PartStream$1, ReadableStream$4); - PartStream$1.prototype._read = function(n) {}; - module.exports = PartStream$1; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js -var require_getLimit = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports, module) { - module.exports = function getLimit$3(limits, name, defaultLimit) { - if (!limits || limits[name] === void 0 || limits[name] === null) return defaultLimit; - if (typeof limits[name] !== "number" || isNaN(limits[name])) throw new TypeError("Limit " + name + " is not a valid number"); - return limits[name]; - }; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js -var require_HeaderParser = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports, module) { - const EventEmitter$1 = __require("node:events").EventEmitter; - const inherits$3 = __require("node:util").inherits; - const getLimit$2 = require_getLimit(); - const StreamSearch$1 = require_sbmh(); - const B_DCRLF = Buffer.from("\r\n\r\n"); - const RE_CRLF = /\r\n/g; - const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/; - function HeaderParser$1(cfg) { - EventEmitter$1.call(this); - cfg = cfg || {}; - const self = this; - this.nread = 0; - this.maxed = false; - this.npairs = 0; - this.maxHeaderPairs = getLimit$2(cfg, "maxHeaderPairs", 2e3); - this.maxHeaderSize = getLimit$2(cfg, "maxHeaderSize", 80 * 1024); - this.buffer = ""; - this.header = {}; - this.finished = false; - this.ss = new StreamSearch$1(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; - } else self.nread += end - start; - self.buffer += data.toString("binary", start, end); - } - if (isMatch) self._finish(); - }); - } - inherits$3(HeaderParser$1, EventEmitter$1); - HeaderParser$1.prototype.push = function(data) { - const r = this.ss.push(data); - if (this.finished) return r; - }; - HeaderParser$1.prototype.reset = function() { - this.finished = false; - this.buffer = ""; - this.header = {}; - this.ss.reset(); - }; - HeaderParser$1.prototype._finish = function() { - if (this.buffer) this._parseHeader(); - this.ss.matches = this.ss.maxMatches; - const header = this.header; - this.header = {}; - this.buffer = ""; - this.finished = true; - this.nread = this.npairs = 0; - this.maxed = false; - this.emit("header", header); - }; - HeaderParser$1.prototype._parseHeader = function() { - if (this.npairs === this.maxHeaderPairs) return; - const lines = this.buffer.split(RE_CRLF); - const len = lines.length; - let m, h; - for (var i$1 = 0; i$1 < len; ++i$1) { - if (lines[i$1].length === 0) continue; - if (lines[i$1][0] === " " || lines[i$1][0] === " ") { - if (h) { - this.header[h][this.header[h].length - 1] += lines[i$1]; - continue; - } - } - const posColon = lines[i$1].indexOf(":"); - if (posColon === -1 || posColon === 0) return; - m = RE_HDR.exec(lines[i$1]); - h = m[1].toLowerCase(); - this.header[h] = this.header[h] || []; - this.header[h].push(m[2] || ""); - if (++this.npairs === this.maxHeaderPairs) break; - } - }; - module.exports = HeaderParser$1; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js -var require_Dicer = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports, module) { - const WritableStream$1 = __require("node:stream").Writable; - const inherits$2 = __require("node:util").inherits; - const StreamSearch = require_sbmh(); - const PartStream = require_PartStream(); - const HeaderParser = require_HeaderParser(); - const DASH = 45; - const B_ONEDASH = Buffer.from("-"); - const B_CRLF = Buffer.from("\r\n"); - const EMPTY_FN = function() {}; - function Dicer$2(cfg) { - if (!(this instanceof Dicer$2)) return new Dicer$2(cfg); - WritableStream$1.call(this, cfg); - if (!cfg || !cfg.headerFirst && typeof cfg.boundary !== "string") throw new TypeError("Boundary required"); - if (typeof cfg.boundary === "string") this.setBoundary(cfg.boundary); - else this._bparser = void 0; - this._headerFirst = cfg.headerFirst; - this._dashes = 0; - this._parts = 0; - this._finished = false; - this._realFinish = false; - this._isPreamble = true; - this._justMatched = false; - this._firstWrite = true; - this._inHeader = true; - this._part = void 0; - this._cb = void 0; - this._ignoreData = false; - this._partOpts = { highWaterMark: cfg.partHwm }; - this._pause = false; - const self = this; - this._hparser = new HeaderParser(cfg); - this._hparser.on("header", function(header) { - self._inHeader = false; - self._part.emit("header", header); - }); - } - inherits$2(Dicer$2, WritableStream$1); - Dicer$2.prototype.emit = function(ev) { - if (ev === "finish" && !this._realFinish) { - if (!this._finished) { - const self = 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); - process.nextTick(function() { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - }); - return; - } - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - }); - } - } else WritableStream$1.prototype.emit.apply(this, arguments); - }; - Dicer$2.prototype._write = function(data, encoding, cb) { - if (!this._hparser && !this._bparser) return cb(); - if (this._headerFirst && this._isPreamble) { - if (!this._part) { - this._part = new PartStream(this._partOpts); - if (this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); - else this._ignore(); - } - const r = this._hparser.push(data); - if (!this._inHeader && r !== void 0 && r < data.length) data = data.slice(r); - else return cb(); - } - if (this._firstWrite) { - this._bparser.push(B_CRLF); - this._firstWrite = false; - } - this._bparser.push(data); - if (this._pause) this._cb = cb; - else cb(); - }; - Dicer$2.prototype.reset = function() { - this._part = void 0; - this._bparser = void 0; - this._hparser = void 0; - }; - Dicer$2.prototype.setBoundary = function(boundary) { - const self = this; - this._bparser = new StreamSearch("\r\n--" + boundary); - this._bparser.on("info", function(isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end); - }); - }; - Dicer$2.prototype._ignore = function() { - if (this._part && !this._ignoreData) { - this._ignoreData = true; - this._part.on("error", EMPTY_FN); - this._part.resume(); - } - }; - Dicer$2.prototype._oninfo = function(isMatch, data, start, end) { - let buf; - const self = this; - let i$1 = 0; - let r; - let shouldWriteMore = true; - if (!this._part && this._justMatched && data) { - while (this._dashes < 2 && start + i$1 < end) if (data[start + i$1] === DASH) { - ++i$1; - ++this._dashes; - } else { - if (this._dashes) buf = B_ONEDASH; - this._dashes = 0; - break; - } - if (this._dashes === 2) { - if (start + i$1 < end && this.listenerCount("trailer") !== 0) this.emit("trailer", data.slice(start + i$1, end)); - this.reset(); - this._finished = true; - if (self._parts === 0) { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - } - } - if (this._dashes) return; - } - if (this._justMatched) this._justMatched = false; - if (!this._part) { - this._part = new PartStream(this._partOpts); - this._part._read = function(n) { - self._unpause(); - }; - if (this._isPreamble && this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); - else if (this._isPreamble !== true && this.listenerCount("part") !== 0) this.emit("part", this._part); - else this._ignore(); - if (!this._isPreamble) this._inHeader = true; - } - if (data && start < end && !this._ignoreData) { - if (this._isPreamble || !this._inHeader) { - if (buf) shouldWriteMore = this._part.push(buf); - shouldWriteMore = this._part.push(data.slice(start, end)); - if (!shouldWriteMore) this._pause = true; - } else if (!this._isPreamble && this._inHeader) { - if (buf) this._hparser.push(buf); - r = this._hparser.push(data.slice(start, end)); - if (!this._inHeader && r !== void 0 && r < end) this._oninfo(false, data, start + r, end); - } - } - if (isMatch) { - this._hparser.reset(); - if (this._isPreamble) this._isPreamble = false; - else 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; - } else self._unpause(); - }); - } - this._part.push(null); - this._part = void 0; - this._ignoreData = false; - this._justMatched = true; - this._dashes = 0; - } - }; - Dicer$2.prototype._unpause = function() { - if (!this._pause) return; - this._pause = false; - if (this._cb) { - const cb = this._cb; - this._cb = void 0; - cb(); - } - }; - module.exports = Dicer$2; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js -var require_decodeText = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports, module) { - const utf8Decoder = new TextDecoder("utf-8"); - const textDecoders = new Map([["utf-8", utf8Decoder], ["utf8", utf8Decoder]]); - function getDecoder(charset) { - let lc; - while (true) switch (charset) { - case "utf-8": - case "utf8": return decoders.utf8; - case "latin1": - case "ascii": - case "us-ascii": - case "iso-8859-1": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "windows-1252": - case "iso_8859-1:1987": - case "cp1252": - case "x-cp1252": return decoders.latin1; - case "utf16le": - case "utf-16le": - case "ucs2": - case "ucs-2": return decoders.utf16le; - case "base64": return decoders.base64; - default: - if (lc === void 0) { - lc = true; - charset = charset.toLowerCase(); - continue; - } - return decoders.other.bind(charset); - } - } - const decoders = { - utf8: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.utf8Slice(0, data.length); - }, - latin1: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") return data; - return data.latin1Slice(0, data.length); - }, - utf16le: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.ucs2Slice(0, data.length); - }, - base64: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.base64Slice(0, data.length); - }, - other: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - if (textDecoders.has(exports.toString())) try { - return textDecoders.get(exports).decode(data); - } catch {} - return typeof data === "string" ? data : data.toString(); - } - }; - function decodeText$3(text, sourceEncoding, destEncoding) { - if (text) return getDecoder(destEncoding)(text, sourceEncoding); - return text; - } - module.exports = decodeText$3; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js -var require_parseParams = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports, module) { - const decodeText$2 = require_decodeText(); - const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; - const EncodedLookup = { - "%00": "\0", - "%01": "", - "%02": "", - "%03": "", - "%04": "", - "%05": "", - "%06": "", - "%07": "\x07", - "%08": "\b", - "%09": " ", - "%0a": "\n", - "%0A": "\n", - "%0b": "\v", - "%0B": "\v", - "%0c": "\f", - "%0C": "\f", - "%0d": "\r", - "%0D": "\r", - "%0e": "", - "%0E": "", - "%0f": "", - "%0F": "", - "%10": "", - "%11": "", - "%12": "", - "%13": "", - "%14": "", - "%15": "", - "%16": "", - "%17": "", - "%18": "", - "%19": "", - "%1a": "", - "%1A": "", - "%1b": "\x1B", - "%1B": "\x1B", - "%1c": "", - "%1C": "", - "%1d": "", - "%1D": "", - "%1e": "", - "%1E": "", - "%1f": "", - "%1F": "", - "%20": " ", - "%21": "!", - "%22": "\"", - "%23": "#", - "%24": "$", - "%25": "%", - "%26": "&", - "%27": "'", - "%28": "(", - "%29": ")", - "%2a": "*", - "%2A": "*", - "%2b": "+", - "%2B": "+", - "%2c": ",", - "%2C": ",", - "%2d": "-", - "%2D": "-", - "%2e": ".", - "%2E": ".", - "%2f": "/", - "%2F": "/", - "%30": "0", - "%31": "1", - "%32": "2", - "%33": "3", - "%34": "4", - "%35": "5", - "%36": "6", - "%37": "7", - "%38": "8", - "%39": "9", - "%3a": ":", - "%3A": ":", - "%3b": ";", - "%3B": ";", - "%3c": "<", - "%3C": "<", - "%3d": "=", - "%3D": "=", - "%3e": ">", - "%3E": ">", - "%3f": "?", - "%3F": "?", - "%40": "@", - "%41": "A", - "%42": "B", - "%43": "C", - "%44": "D", - "%45": "E", - "%46": "F", - "%47": "G", - "%48": "H", - "%49": "I", - "%4a": "J", - "%4A": "J", - "%4b": "K", - "%4B": "K", - "%4c": "L", - "%4C": "L", - "%4d": "M", - "%4D": "M", - "%4e": "N", - "%4E": "N", - "%4f": "O", - "%4F": "O", - "%50": "P", - "%51": "Q", - "%52": "R", - "%53": "S", - "%54": "T", - "%55": "U", - "%56": "V", - "%57": "W", - "%58": "X", - "%59": "Y", - "%5a": "Z", - "%5A": "Z", - "%5b": "[", - "%5B": "[", - "%5c": "\\", - "%5C": "\\", - "%5d": "]", - "%5D": "]", - "%5e": "^", - "%5E": "^", - "%5f": "_", - "%5F": "_", - "%60": "`", - "%61": "a", - "%62": "b", - "%63": "c", - "%64": "d", - "%65": "e", - "%66": "f", - "%67": "g", - "%68": "h", - "%69": "i", - "%6a": "j", - "%6A": "j", - "%6b": "k", - "%6B": "k", - "%6c": "l", - "%6C": "l", - "%6d": "m", - "%6D": "m", - "%6e": "n", - "%6E": "n", - "%6f": "o", - "%6F": "o", - "%70": "p", - "%71": "q", - "%72": "r", - "%73": "s", - "%74": "t", - "%75": "u", - "%76": "v", - "%77": "w", - "%78": "x", - "%79": "y", - "%7a": "z", - "%7A": "z", - "%7b": "{", - "%7B": "{", - "%7c": "|", - "%7C": "|", - "%7d": "}", - "%7D": "}", - "%7e": "~", - "%7E": "~", - "%7f": "", - "%7F": "", - "%80": "€", - "%81": "", - "%82": "‚", - "%83": "ƒ", - "%84": "„", - "%85": "…", - "%86": "†", - "%87": "‡", - "%88": "ˆ", - "%89": "‰", - "%8a": "Š", - "%8A": "Š", - "%8b": "‹", - "%8B": "‹", - "%8c": "Œ", - "%8C": "Œ", - "%8d": "", - "%8D": "", - "%8e": "Ž", - "%8E": "Ž", - "%8f": "", - "%8F": "", - "%90": "", - "%91": "‘", - "%92": "’", - "%93": "“", - "%94": "”", - "%95": "•", - "%96": "–", - "%97": "—", - "%98": "˜", - "%99": "™", - "%9a": "š", - "%9A": "š", - "%9b": "›", - "%9B": "›", - "%9c": "œ", - "%9C": "œ", - "%9d": "", - "%9D": "", - "%9e": "ž", - "%9E": "ž", - "%9f": "Ÿ", - "%9F": "Ÿ", - "%a0": "\xA0", - "%A0": "\xA0", - "%a1": "¡", - "%A1": "¡", - "%a2": "¢", - "%A2": "¢", - "%a3": "£", - "%A3": "£", - "%a4": "¤", - "%A4": "¤", - "%a5": "¥", - "%A5": "¥", - "%a6": "¦", - "%A6": "¦", - "%a7": "§", - "%A7": "§", - "%a8": "¨", - "%A8": "¨", - "%a9": "©", - "%A9": "©", - "%aa": "ª", - "%Aa": "ª", - "%aA": "ª", - "%AA": "ª", - "%ab": "«", - "%Ab": "«", - "%aB": "«", - "%AB": "«", - "%ac": "¬", - "%Ac": "¬", - "%aC": "¬", - "%AC": "¬", - "%ad": "­", - "%Ad": "­", - "%aD": "­", - "%AD": "­", - "%ae": "®", - "%Ae": "®", - "%aE": "®", - "%AE": "®", - "%af": "¯", - "%Af": "¯", - "%aF": "¯", - "%AF": "¯", - "%b0": "°", - "%B0": "°", - "%b1": "±", - "%B1": "±", - "%b2": "²", - "%B2": "²", - "%b3": "³", - "%B3": "³", - "%b4": "´", - "%B4": "´", - "%b5": "µ", - "%B5": "µ", - "%b6": "¶", - "%B6": "¶", - "%b7": "·", - "%B7": "·", - "%b8": "¸", - "%B8": "¸", - "%b9": "¹", - "%B9": "¹", - "%ba": "º", - "%Ba": "º", - "%bA": "º", - "%BA": "º", - "%bb": "»", - "%Bb": "»", - "%bB": "»", - "%BB": "»", - "%bc": "¼", - "%Bc": "¼", - "%bC": "¼", - "%BC": "¼", - "%bd": "½", - "%Bd": "½", - "%bD": "½", - "%BD": "½", - "%be": "¾", - "%Be": "¾", - "%bE": "¾", - "%BE": "¾", - "%bf": "¿", - "%Bf": "¿", - "%bF": "¿", - "%BF": "¿", - "%c0": "À", - "%C0": "À", - "%c1": "Á", - "%C1": "Á", - "%c2": "Â", - "%C2": "Â", - "%c3": "Ã", - "%C3": "Ã", - "%c4": "Ä", - "%C4": "Ä", - "%c5": "Å", - "%C5": "Å", - "%c6": "Æ", - "%C6": "Æ", - "%c7": "Ç", - "%C7": "Ç", - "%c8": "È", - "%C8": "È", - "%c9": "É", - "%C9": "É", - "%ca": "Ê", - "%Ca": "Ê", - "%cA": "Ê", - "%CA": "Ê", - "%cb": "Ë", - "%Cb": "Ë", - "%cB": "Ë", - "%CB": "Ë", - "%cc": "Ì", - "%Cc": "Ì", - "%cC": "Ì", - "%CC": "Ì", - "%cd": "Í", - "%Cd": "Í", - "%cD": "Í", - "%CD": "Í", - "%ce": "Î", - "%Ce": "Î", - "%cE": "Î", - "%CE": "Î", - "%cf": "Ï", - "%Cf": "Ï", - "%cF": "Ï", - "%CF": "Ï", - "%d0": "Ð", - "%D0": "Ð", - "%d1": "Ñ", - "%D1": "Ñ", - "%d2": "Ò", - "%D2": "Ò", - "%d3": "Ó", - "%D3": "Ó", - "%d4": "Ô", - "%D4": "Ô", - "%d5": "Õ", - "%D5": "Õ", - "%d6": "Ö", - "%D6": "Ö", - "%d7": "×", - "%D7": "×", - "%d8": "Ø", - "%D8": "Ø", - "%d9": "Ù", - "%D9": "Ù", - "%da": "Ú", - "%Da": "Ú", - "%dA": "Ú", - "%DA": "Ú", - "%db": "Û", - "%Db": "Û", - "%dB": "Û", - "%DB": "Û", - "%dc": "Ü", - "%Dc": "Ü", - "%dC": "Ü", - "%DC": "Ü", - "%dd": "Ý", - "%Dd": "Ý", - "%dD": "Ý", - "%DD": "Ý", - "%de": "Þ", - "%De": "Þ", - "%dE": "Þ", - "%DE": "Þ", - "%df": "ß", - "%Df": "ß", - "%dF": "ß", - "%DF": "ß", - "%e0": "à", - "%E0": "à", - "%e1": "á", - "%E1": "á", - "%e2": "â", - "%E2": "â", - "%e3": "ã", - "%E3": "ã", - "%e4": "ä", - "%E4": "ä", - "%e5": "å", - "%E5": "å", - "%e6": "æ", - "%E6": "æ", - "%e7": "ç", - "%E7": "ç", - "%e8": "è", - "%E8": "è", - "%e9": "é", - "%E9": "é", - "%ea": "ê", - "%Ea": "ê", - "%eA": "ê", - "%EA": "ê", - "%eb": "ë", - "%Eb": "ë", - "%eB": "ë", - "%EB": "ë", - "%ec": "ì", - "%Ec": "ì", - "%eC": "ì", - "%EC": "ì", - "%ed": "í", - "%Ed": "í", - "%eD": "í", - "%ED": "í", - "%ee": "î", - "%Ee": "î", - "%eE": "î", - "%EE": "î", - "%ef": "ï", - "%Ef": "ï", - "%eF": "ï", - "%EF": "ï", - "%f0": "ð", - "%F0": "ð", - "%f1": "ñ", - "%F1": "ñ", - "%f2": "ò", - "%F2": "ò", - "%f3": "ó", - "%F3": "ó", - "%f4": "ô", - "%F4": "ô", - "%f5": "õ", - "%F5": "õ", - "%f6": "ö", - "%F6": "ö", - "%f7": "÷", - "%F7": "÷", - "%f8": "ø", - "%F8": "ø", - "%f9": "ù", - "%F9": "ù", - "%fa": "ú", - "%Fa": "ú", - "%fA": "ú", - "%FA": "ú", - "%fb": "û", - "%Fb": "û", - "%fB": "û", - "%FB": "û", - "%fc": "ü", - "%Fc": "ü", - "%fC": "ü", - "%FC": "ü", - "%fd": "ý", - "%Fd": "ý", - "%fD": "ý", - "%FD": "ý", - "%fe": "þ", - "%Fe": "þ", - "%fE": "þ", - "%FE": "þ", - "%ff": "ÿ", - "%Ff": "ÿ", - "%fF": "ÿ", - "%FF": "ÿ" - }; - function encodedReplacer(match) { - return EncodedLookup[match]; - } - const STATE_KEY = 0; - const STATE_VALUE = 1; - const STATE_CHARSET = 2; - const STATE_LANG = 3; - function parseParams$2(str) { - const res = []; - let state = STATE_KEY; - let charset = ""; - let inquote = false; - let escaping = false; - let p = 0; - let tmp = ""; - const len = str.length; - for (var i$1 = 0; i$1 < len; ++i$1) { - const char = str[i$1]; - if (char === "\\" && inquote) if (escaping) escaping = false; - else { - escaping = true; - continue; - } - else if (char === "\"") if (!escaping) { - if (inquote) { - inquote = false; - state = STATE_KEY; - } else inquote = true; - continue; - } else escaping = false; - else { - if (escaping && inquote) tmp += "\\"; - escaping = false; - if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { - if (state === STATE_CHARSET) { - state = STATE_LANG; - charset = tmp.substring(1); - } else state = STATE_VALUE; - tmp = ""; - continue; - } else if (state === STATE_KEY && (char === "*" || char === "=") && res.length) { - state = char === "*" ? STATE_CHARSET : STATE_VALUE; - res[p] = [tmp, void 0]; - tmp = ""; - continue; - } else if (!inquote && char === ";") { - state = STATE_KEY; - if (charset) { - if (tmp.length) tmp = decodeText$2(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); - charset = ""; - } else if (tmp.length) tmp = decodeText$2(tmp, "binary", "utf8"); - if (res[p] === void 0) res[p] = tmp; - else res[p][1] = tmp; - tmp = ""; - ++p; - continue; - } else if (!inquote && (char === " " || char === " ")) continue; - } - tmp += char; - } - if (charset && tmp.length) tmp = decodeText$2(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); - else if (tmp) tmp = decodeText$2(tmp, "binary", "utf8"); - if (res[p] === void 0) { - if (tmp) res[p] = tmp; - } else res[p][1] = tmp; - return res; - } - module.exports = parseParams$2; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js -var require_basename = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js"(exports, module) { - module.exports = function basename$1(path$5) { - if (typeof path$5 !== "string") return ""; - for (var i$1 = path$5.length - 1; i$1 >= 0; --i$1) switch (path$5.charCodeAt(i$1)) { - case 47: - case 92: - path$5 = path$5.slice(i$1 + 1); - return path$5 === ".." || path$5 === "." ? "" : path$5; - } - return path$5 === ".." || path$5 === "." ? "" : path$5; - }; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js -var require_multipart = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js"(exports, module) { - const { Readable: Readable$4 } = __require("node:stream"); - const { inherits: inherits$1 } = __require("node:util"); - const Dicer$1 = require_Dicer(); - const parseParams$1 = require_parseParams(); - const decodeText$1 = require_decodeText(); - const basename = require_basename(); - const getLimit$1 = require_getLimit(); - const RE_BOUNDARY = /^boundary$/i; - const RE_FIELD = /^form-data$/i; - const RE_CHARSET$1 = /^charset$/i; - const RE_FILENAME = /^filename$/i; - const RE_NAME = /^name$/i; - Multipart.detect = /^multipart\/form-data/i; - function Multipart(boy, cfg) { - let i$1; - let len; - const self = this; - let boundary; - const limits = cfg.limits; - const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); - const parsedConType = cfg.parsedConType || []; - const defCharset = cfg.defCharset || "utf8"; - const preservePath = cfg.preservePath; - const fileOpts = { highWaterMark: cfg.fileHwm }; - for (i$1 = 0, len = parsedConType.length; i$1 < len; ++i$1) if (Array.isArray(parsedConType[i$1]) && RE_BOUNDARY.test(parsedConType[i$1][0])) { - boundary = parsedConType[i$1][1]; - break; - } - function checkFinished() { - if (nends === 0 && finished$1 && !boy._done) { - finished$1 = false; - self.end(); - } - } - if (typeof boundary !== "string") throw new Error("Multipart: Boundary not found"); - const fieldSizeLimit = getLimit$1(limits, "fieldSize", 1 * 1024 * 1024); - const fileSizeLimit = getLimit$1(limits, "fileSize", Infinity); - const filesLimit = getLimit$1(limits, "files", Infinity); - const fieldsLimit = getLimit$1(limits, "fields", Infinity); - const partsLimit = getLimit$1(limits, "parts", Infinity); - const headerPairsLimit = getLimit$1(limits, "headerPairs", 2e3); - const headerSizeLimit = getLimit$1(limits, "headerSize", 80 * 1024); - let nfiles = 0; - let nfields = 0; - let nends = 0; - let curFile; - let curField; - let finished$1 = false; - this._needDrain = false; - this._pause = false; - this._cb = void 0; - this._nparts = 0; - this._boy = boy; - const parserCfg = { - boundary, - maxHeaderPairs: headerPairsLimit, - maxHeaderSize: headerSizeLimit, - partHwm: fileOpts.highWaterMark, - highWaterMark: cfg.highWaterMark - }; - this.parser = new Dicer$1(parserCfg); - this.parser.on("drain", function() { - self._needDrain = false; - if (self._cb && !self._pause) { - const cb = self._cb; - self._cb = void 0; - cb(); - } - }).on("part", function onPart(part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener("part", onPart); - self.parser.on("part", skipPart); - boy.hitPartsLimit = true; - boy.emit("partsLimit"); - return skipPart(part); - } - if (curField) { - const field = curField; - field.emit("end"); - field.removeAllListeners("end"); - } - part.on("header", function(header) { - let contype; - let fieldname; - let parsed; - let charset; - let encoding; - let filename; - let nsize = 0; - if (header["content-type"]) { - parsed = parseParams$1(header["content-type"][0]); - if (parsed[0]) { - contype = parsed[0].toLowerCase(); - for (i$1 = 0, len = parsed.length; i$1 < len; ++i$1) if (RE_CHARSET$1.test(parsed[i$1][0])) { - charset = parsed[i$1][1].toLowerCase(); - break; - } - } - } - if (contype === void 0) contype = "text/plain"; - if (charset === void 0) charset = defCharset; - if (header["content-disposition"]) { - parsed = parseParams$1(header["content-disposition"][0]); - if (!RE_FIELD.test(parsed[0])) return skipPart(part); - for (i$1 = 0, len = parsed.length; i$1 < len; ++i$1) if (RE_NAME.test(parsed[i$1][0])) fieldname = parsed[i$1][1]; - else if (RE_FILENAME.test(parsed[i$1][0])) { - filename = parsed[i$1][1]; - if (!preservePath) filename = basename(filename); - } - } else return skipPart(part); - if (header["content-transfer-encoding"]) encoding = header["content-transfer-encoding"][0].toLowerCase(); - else encoding = "7bit"; - let onData, onEnd; - if (isPartAFile(fieldname, contype, filename)) { - if (nfiles === filesLimit) { - if (!boy.hitFilesLimit) { - boy.hitFilesLimit = true; - boy.emit("filesLimit"); - } - return skipPart(part); - } - ++nfiles; - if (boy.listenerCount("file") === 0) { - self.parser._ignore(); - return; - } - ++nends; - const file = new FileStream(fileOpts); - curFile = file; - file.on("end", function() { - --nends; - self._pause = false; - checkFinished(); - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = void 0; - cb(); - } - }); - file._read = function(n) { - if (!self._pause) return; - self._pause = false; - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = void 0; - cb(); - } - }; - boy.emit("file", fieldname, file, filename, encoding, contype); - onData = function(data) { - if ((nsize += data.length) > fileSizeLimit) { - const extralen = fileSizeLimit - nsize + data.length; - if (extralen > 0) file.push(data.slice(0, extralen)); - file.truncated = true; - file.bytesRead = fileSizeLimit; - part.removeAllListeners("data"); - file.emit("limit"); - return; - } else if (!file.push(data)) self._pause = true; - file.bytesRead = nsize; - }; - onEnd = function() { - curFile = void 0; - file.push(null); - }; - } else { - if (nfields === fieldsLimit) { - if (!boy.hitFieldsLimit) { - boy.hitFieldsLimit = true; - boy.emit("fieldsLimit"); - } - return skipPart(part); - } - ++nfields; - ++nends; - let buffer = ""; - let truncated = false; - curField = part; - onData = function(data) { - if ((nsize += data.length) > fieldSizeLimit) { - const extralen = fieldSizeLimit - (nsize - data.length); - buffer += data.toString("binary", 0, extralen); - truncated = true; - part.removeAllListeners("data"); - } else buffer += data.toString("binary"); - }; - onEnd = function() { - curField = void 0; - if (buffer.length) buffer = decodeText$1(buffer, "binary", charset); - boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); - --nends; - checkFinished(); - }; - } - part._readableState.sync = false; - part.on("data", onData); - part.on("end", onEnd); - }).on("error", function(err) { - if (curFile) curFile.emit("error", err); - }); - }).on("error", function(err) { - boy.emit("error", err); - }).on("finish", function() { - finished$1 = true; - checkFinished(); - }); - } - Multipart.prototype.write = function(chunk, cb) { - const r = this.parser.write(chunk); - if (r && !this._pause) cb(); - else { - this._needDrain = !r; - this._cb = cb; - } - }; - Multipart.prototype.end = function() { - const self = this; - if (self.parser.writable) self.parser.end(); - else if (!self._boy._done) process.nextTick(function() { - self._boy._done = true; - self._boy.emit("finish"); - }); - }; - function skipPart(part) { - part.resume(); - } - function FileStream(opts) { - Readable$4.call(this, opts); - this.bytesRead = 0; - this.truncated = false; - } - inherits$1(FileStream, Readable$4); - FileStream.prototype._read = function(n) {}; - module.exports = Multipart; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js -var require_Decoder = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports, module) { - const RE_PLUS = /\+/g; - const HEX = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - function Decoder$1() { - this.buffer = void 0; - } - Decoder$1.prototype.write = function(str) { - str = str.replace(RE_PLUS, " "); - let res = ""; - let i$1 = 0; - let p = 0; - const len = str.length; - for (; i$1 < len; ++i$1) if (this.buffer !== void 0) if (!HEX[str.charCodeAt(i$1)]) { - res += "%" + this.buffer; - this.buffer = void 0; - --i$1; - } else { - this.buffer += str[i$1]; - ++p; - if (this.buffer.length === 2) { - res += String.fromCharCode(parseInt(this.buffer, 16)); - this.buffer = void 0; - } - } - else if (str[i$1] === "%") { - if (i$1 > p) { - res += str.substring(p, i$1); - p = i$1; - } - this.buffer = ""; - ++p; - } - if (p < len && this.buffer === void 0) res += str.substring(p); - return res; - }; - Decoder$1.prototype.reset = function() { - this.buffer = void 0; - }; - module.exports = Decoder$1; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js -var require_urlencoded = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports, module) { - const Decoder = require_Decoder(); - const decodeText = require_decodeText(); - const getLimit = require_getLimit(); - const RE_CHARSET = /^charset$/i; - UrlEncoded.detect = /^application\/x-www-form-urlencoded/i; - function UrlEncoded(boy, cfg) { - const limits = cfg.limits; - const parsedConType = cfg.parsedConType; - this.boy = boy; - this.fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); - this.fieldNameSizeLimit = getLimit(limits, "fieldNameSize", 100); - this.fieldsLimit = getLimit(limits, "fields", Infinity); - let charset; - for (var i$1 = 0, len = parsedConType.length; i$1 < len; ++i$1) if (Array.isArray(parsedConType[i$1]) && RE_CHARSET.test(parsedConType[i$1][0])) { - charset = parsedConType[i$1][1].toLowerCase(); - break; - } - if (charset === void 0) charset = cfg.defCharset || "utf8"; - this.decoder = new Decoder(); - this.charset = charset; - this._fields = 0; - this._state = "key"; - this._checkingBytes = true; - this._bytesKey = 0; - this._bytesVal = 0; - this._key = ""; - this._val = ""; - this._keyTrunc = false; - this._valTrunc = false; - this._hitLimit = false; - } - UrlEncoded.prototype.write = function(data, cb) { - if (this._fields === this.fieldsLimit) { - if (!this.boy.hitFieldsLimit) { - this.boy.hitFieldsLimit = true; - this.boy.emit("fieldsLimit"); - } - return cb(); - } - let idxeq; - let idxamp; - let i$1; - let p = 0; - const len = data.length; - while (p < len) if (this._state === "key") { - idxeq = idxamp = void 0; - for (i$1 = p; i$1 < len; ++i$1) { - if (!this._checkingBytes) ++p; - if (data[i$1] === 61) { - idxeq = i$1; - break; - } else if (data[i$1] === 38) { - idxamp = i$1; - break; - } - if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { - this._hitLimit = true; - break; - } else if (this._checkingBytes) ++this._bytesKey; - } - if (idxeq !== void 0) { - if (idxeq > p) this._key += this.decoder.write(data.toString("binary", p, idxeq)); - this._state = "val"; - this._hitLimit = false; - this._checkingBytes = true; - this._val = ""; - this._bytesVal = 0; - this._valTrunc = false; - this.decoder.reset(); - p = idxeq + 1; - } else if (idxamp !== void 0) { - ++this._fields; - let key; - const keyTrunc = this._keyTrunc; - if (idxamp > p) key = this._key += this.decoder.write(data.toString("binary", p, idxamp)); - else key = this._key; - this._hitLimit = false; - this._checkingBytes = true; - this._key = ""; - this._bytesKey = 0; - this._keyTrunc = false; - this.decoder.reset(); - if (key.length) this.boy.emit("field", decodeText(key, "binary", this.charset), "", keyTrunc, false); - p = idxamp + 1; - if (this._fields === this.fieldsLimit) return cb(); - } else if (this._hitLimit) { - if (i$1 > p) this._key += this.decoder.write(data.toString("binary", p, i$1)); - p = i$1; - if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { - this._checkingBytes = false; - this._keyTrunc = true; - } - } else { - if (p < len) this._key += this.decoder.write(data.toString("binary", p)); - p = len; - } - } else { - idxamp = void 0; - for (i$1 = p; i$1 < len; ++i$1) { - if (!this._checkingBytes) ++p; - if (data[i$1] === 38) { - idxamp = i$1; - break; - } - if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { - this._hitLimit = true; - break; - } else if (this._checkingBytes) ++this._bytesVal; - } - if (idxamp !== void 0) { - ++this._fields; - if (idxamp > p) this._val += this.decoder.write(data.toString("binary", p, idxamp)); - this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); - this._state = "key"; - this._hitLimit = false; - this._checkingBytes = true; - this._key = ""; - this._bytesKey = 0; - this._keyTrunc = false; - this.decoder.reset(); - p = idxamp + 1; - if (this._fields === this.fieldsLimit) return cb(); - } else if (this._hitLimit) { - if (i$1 > p) this._val += this.decoder.write(data.toString("binary", p, i$1)); - p = i$1; - if (this._val === "" && this.fieldSizeLimit === 0 || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { - this._checkingBytes = false; - this._valTrunc = true; - } - } else { - if (p < len) this._val += this.decoder.write(data.toString("binary", p)); - p = len; - } - } - cb(); - }; - UrlEncoded.prototype.end = function() { - if (this.boy._done) return; - if (this._state === "key" && this._key.length > 0) this.boy.emit("field", decodeText(this._key, "binary", this.charset), "", this._keyTrunc, false); - else if (this._state === "val") this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); - this.boy._done = true; - this.boy.emit("finish"); - }; - module.exports = UrlEncoded; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js -var require_main = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js"(exports, module) { - const WritableStream = __require("node:stream").Writable; - const { inherits } = __require("node:util"); - const Dicer = require_Dicer(); - const MultipartParser = require_multipart(); - const UrlencodedParser = require_urlencoded(); - const parseParams = require_parseParams(); - function Busboy$1(opts) { - if (!(this instanceof Busboy$1)) return new Busboy$1(opts); - if (typeof opts !== "object") throw new TypeError("Busboy expected an options-Object."); - if (typeof opts.headers !== "object") throw new TypeError("Busboy expected an options-Object with headers-attribute."); - if (typeof opts.headers["content-type"] !== "string") throw new TypeError("Missing Content-Type-header."); - const { headers,...streamOptions } = opts; - this.opts = { - autoDestroy: false, - ...streamOptions - }; - WritableStream.call(this, this.opts); - this._done = false; - this._parser = this.getParserByHeaders(headers); - this._finished = false; - } - inherits(Busboy$1, WritableStream); - Busboy$1.prototype.emit = function(ev) { - if (ev === "finish") { - if (!this._done) { - this._parser?.end(); - return; - } else if (this._finished) return; - this._finished = true; - } - WritableStream.prototype.emit.apply(this, arguments); - }; - Busboy$1.prototype.getParserByHeaders = function(headers) { - const parsed = parseParams(headers["content-type"]); - const cfg = { - defCharset: this.opts.defCharset, - fileHwm: this.opts.fileHwm, - headers, - highWaterMark: this.opts.highWaterMark, - isPartAFile: this.opts.isPartAFile, - limits: this.opts.limits, - parsedConType: parsed, - preservePath: this.opts.preservePath - }; - if (MultipartParser.detect.test(parsed[0])) return new MultipartParser(this, cfg); - if (UrlencodedParser.detect.test(parsed[0])) return new UrlencodedParser(this, cfg); - throw new Error("Unsupported Content-Type."); - }; - Busboy$1.prototype._write = function(chunk, encoding, cb) { - this._parser.write(chunk, cb); - }; - module.exports = Busboy$1; - module.exports.default = Busboy$1; - module.exports.Busboy = Busboy$1; - module.exports.Dicer = Dicer; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/constants.js -var require_constants$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/constants.js"(exports, module) { - const { MessageChannel, receiveMessageOnPort } = __require("worker_threads"); - const corsSafeListedMethods = [ - "GET", - "HEAD", - "POST" - ]; - const corsSafeListedMethodsSet$1 = new Set(corsSafeListedMethods); - const nullBodyStatus$2 = [ - 101, - 204, - 205, - 304 - ]; - const redirectStatus = [ - 301, - 302, - 303, - 307, - 308 - ]; - const redirectStatusSet$3 = new Set(redirectStatus); - const badPorts = [ - "1", - "7", - "9", - "11", - "13", - "15", - "17", - "19", - "20", - "21", - "22", - "23", - "25", - "37", - "42", - "43", - "53", - "69", - "77", - "79", - "87", - "95", - "101", - "102", - "103", - "104", - "109", - "110", - "111", - "113", - "115", - "117", - "119", - "123", - "135", - "137", - "139", - "143", - "161", - "179", - "389", - "427", - "465", - "512", - "513", - "514", - "515", - "526", - "530", - "531", - "532", - "540", - "548", - "554", - "556", - "563", - "587", - "601", - "636", - "989", - "990", - "993", - "995", - "1719", - "1720", - "1723", - "2049", - "3659", - "4045", - "5060", - "5061", - "6000", - "6566", - "6665", - "6666", - "6667", - "6668", - "6669", - "6697", - "10080" - ]; - const badPortsSet$1 = new Set(badPorts); - const referrerPolicy$1 = [ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ]; - const referrerPolicySet = new Set(referrerPolicy$1); - const requestRedirect$1 = [ - "follow", - "manual", - "error" - ]; - const safeMethods = [ - "GET", - "HEAD", - "OPTIONS", - "TRACE" - ]; - const safeMethodsSet$1 = new Set(safeMethods); - const requestMode$1 = [ - "navigate", - "same-origin", - "no-cors", - "cors" - ]; - const requestCredentials$1 = [ - "omit", - "same-origin", - "include" - ]; - const requestCache$1 = [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" - ]; - const requestBodyHeader$1 = [ - "content-encoding", - "content-language", - "content-location", - "content-type", - "content-length" - ]; - const requestDuplex$1 = ["half"]; - const forbiddenMethods = [ - "CONNECT", - "TRACE", - "TRACK" - ]; - const forbiddenMethodsSet$1 = new Set(forbiddenMethods); - const subresource = [ - "audio", - "audioworklet", - "font", - "image", - "manifest", - "paintworklet", - "script", - "style", - "track", - "video", - "xslt", - "" - ]; - const subresourceSet$1 = new Set(subresource); - /** @type {globalThis['DOMException']} */ - const DOMException$6 = globalThis.DOMException ?? (() => { - try { - atob("~"); - } catch (err) { - return Object.getPrototypeOf(err).constructor; - } - })(); - let channel; - /** @type {globalThis['structuredClone']} */ - const structuredClone$1 = globalThis.structuredClone ?? function structuredClone$2(value, options = void 0) { - if (arguments.length === 0) throw new TypeError("missing argument"); - if (!channel) channel = new MessageChannel(); - channel.port1.unref(); - channel.port2.unref(); - channel.port1.postMessage(value, options?.transfer); - return receiveMessageOnPort(channel.port2).message; - }; - module.exports = { - DOMException: DOMException$6, - structuredClone: structuredClone$1, - subresource, - forbiddenMethods, - requestBodyHeader: requestBodyHeader$1, - referrerPolicy: referrerPolicy$1, - requestRedirect: requestRedirect$1, - requestMode: requestMode$1, - requestCredentials: requestCredentials$1, - requestCache: requestCache$1, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus: nullBodyStatus$2, - safeMethods, - badPorts, - requestDuplex: requestDuplex$1, - subresourceSet: subresourceSet$1, - badPortsSet: badPortsSet$1, - redirectStatusSet: redirectStatusSet$3, - corsSafeListedMethodsSet: corsSafeListedMethodsSet$1, - safeMethodsSet: safeMethodsSet$1, - forbiddenMethodsSet: forbiddenMethodsSet$1, - referrerPolicySet - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/global.js -var require_global$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/global.js"(exports, module) { - const globalOrigin = Symbol.for("undici.globalOrigin.1"); - function getGlobalOrigin$4() { - return globalThis[globalOrigin]; - } - function setGlobalOrigin(newOrigin) { - if (newOrigin === void 0) { - Object.defineProperty(globalThis, globalOrigin, { - value: void 0, - writable: true, - enumerable: false, - configurable: false - }); - return; - } - const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }); - } - module.exports = { - getGlobalOrigin: getGlobalOrigin$4, - setGlobalOrigin - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/util.js -var require_util$5 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/util.js"(exports, module) { - const { redirectStatusSet: redirectStatusSet$2, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$3(); - const { getGlobalOrigin: getGlobalOrigin$3 } = require_global$1(); - const { performance: performance$1 } = __require("perf_hooks"); - const { isBlobLike: isBlobLike$6, toUSVString: toUSVString$4, ReadableStreamFrom: ReadableStreamFrom$2 } = require_util$6(); - const assert$18 = __require("assert"); - const { isUint8Array: isUint8Array$1 } = __require("util/types"); - let supportedHashes = []; - /** @type {import('crypto')|undefined} */ - let crypto$2; - try { - crypto$2 = __require("crypto"); - const possibleRelevantHashes = [ - "sha256", - "sha384", - "sha512" - ]; - supportedHashes = crypto$2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); - } catch {} - function responseURL(response) { - const urlList = response.urlList; - const length = urlList.length; - return length === 0 ? null : urlList[length - 1].toString(); - } - function responseLocationURL$1(response, requestFragment) { - if (!redirectStatusSet$2.has(response.status)) return null; - let location = response.headersList.get("location"); - if (location !== null && isValidHeaderValue$1(location)) location = new URL(location, responseURL(response)); - if (location && !location.hash) location.hash = requestFragment; - return location; - } - /** @returns {URL} */ - function requestCurrentURL$1(request$1) { - return request$1.urlList[request$1.urlList.length - 1]; - } - function requestBadPort$1(request$1) { - const url = requestCurrentURL$1(request$1); - if (urlIsHttpHttpsScheme$2(url) && badPortsSet.has(url.port)) return "blocked"; - return "allowed"; - } - function isErrorLike$2(object) { - return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; - } - function isValidReasonPhrase$1(statusText) { - for (let i$1 = 0; i$1 < statusText.length; ++i$1) { - const c = statusText.charCodeAt(i$1); - if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; - } - return true; - } - /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ - function isTokenCharCode(c) { - switch (c) { - case 34: - case 40: - case 41: - case 44: - case 47: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 91: - case 92: - case 93: - case 123: - case 125: return false; - default: return c >= 33 && c <= 126; - } - } - /** - * @param {string} characters - */ - function isValidHTTPToken$1(characters) { - if (characters.length === 0) return false; - for (let i$1 = 0; i$1 < characters.length; ++i$1) if (!isTokenCharCode(characters.charCodeAt(i$1))) return false; - return true; - } - /** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ - function isValidHeaderName$2(potentialValue) { - return isValidHTTPToken$1(potentialValue); - } - /** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ - function isValidHeaderValue$1(potentialValue) { - if (potentialValue.startsWith(" ") || potentialValue.startsWith(" ") || potentialValue.endsWith(" ") || potentialValue.endsWith(" ")) return false; - if (potentialValue.includes("\0") || potentialValue.includes("\r") || potentialValue.includes("\n")) return false; - return true; - } - function setRequestReferrerPolicyOnRedirect$1(request$1, actualResponse) { - const { headersList } = actualResponse; - const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); - let policy = ""; - if (policyHeader.length > 0) for (let i$1 = policyHeader.length; i$1 !== 0; i$1--) { - const token = policyHeader[i$1 - 1].trim(); - if (referrerPolicyTokens.has(token)) { - policy = token; - break; - } - } - if (policy !== "") request$1.referrerPolicy = policy; - } - function crossOriginResourcePolicyCheck$1() { - return "allowed"; - } - function corsCheck$1() { - return "success"; - } - function TAOCheck$1() { - return "success"; - } - function appendFetchMetadata$1(httpRequest) { - let header = null; - header = httpRequest.mode; - httpRequest.headersList.set("sec-fetch-mode", header); - } - function appendRequestOriginHeader$1(request$1) { - let serializedOrigin = request$1.origin; - if (request$1.responseTainting === "cors" || request$1.mode === "websocket") { - if (serializedOrigin) request$1.headersList.append("origin", serializedOrigin); - } else if (request$1.method !== "GET" && request$1.method !== "HEAD") { - switch (request$1.referrerPolicy) { - case "no-referrer": - serializedOrigin = null; - break; - case "no-referrer-when-downgrade": - case "strict-origin": - case "strict-origin-when-cross-origin": - if (request$1.origin && urlHasHttpsScheme$1(request$1.origin) && !urlHasHttpsScheme$1(requestCurrentURL$1(request$1))) serializedOrigin = null; - break; - case "same-origin": - if (!sameOrigin$2(request$1, requestCurrentURL$1(request$1))) serializedOrigin = null; - break; - default: - } - if (serializedOrigin) request$1.headersList.append("origin", serializedOrigin); - } - } - function coarsenedSharedCurrentTime$1(crossOriginIsolatedCapability) { - return performance$1.now(); - } - function createOpaqueTimingInfo$1(timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - }; - } - function makePolicyContainer$2() { - return { referrerPolicy: "strict-origin-when-cross-origin" }; - } - function clonePolicyContainer$1(policyContainer) { - return { referrerPolicy: policyContainer.referrerPolicy }; - } - function determineRequestsReferrer$1(request$1) { - const policy = request$1.referrerPolicy; - assert$18(policy); - let referrerSource = null; - if (request$1.referrer === "client") { - const globalOrigin$1 = getGlobalOrigin$3(); - if (!globalOrigin$1 || globalOrigin$1.origin === "null") return "no-referrer"; - referrerSource = new URL(globalOrigin$1); - } else if (request$1.referrer instanceof URL) referrerSource = request$1.referrer; - let referrerURL = stripURLForReferrer(referrerSource); - const referrerOrigin = stripURLForReferrer(referrerSource, true); - if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; - const areSameOrigin = sameOrigin$2(request$1, referrerURL); - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request$1.url); - switch (policy) { - case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); - case "unsafe-url": return referrerURL; - case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; - case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; - case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL$1(request$1); - if (sameOrigin$2(referrerURL, currentURL)) return referrerURL; - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; - return referrerOrigin; - } - case "strict-origin": - case "no-referrer-when-downgrade": - default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; - } - } - /** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ - function stripURLForReferrer(url, originOnly) { - assert$18(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; - url.username = ""; - url.password = ""; - url.hash = ""; - if (originOnly) { - url.pathname = ""; - url.search = ""; - } - return url; - } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) return false; - if (url.href === "about:blank" || url.href === "about:srcdoc") return true; - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); - function isOriginPotentiallyTrustworthy(origin) { - if (origin == null || origin === "null") return false; - const originAsURL = new URL(origin); - if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; - return false; - } - } - /** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ - function bytesMatch$1(bytes, metadataList) { - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto$2 === void 0) return true; - const parsedMetadata = parseMetadata(metadataList); - if (parsedMetadata === "no metadata") return true; - if (parsedMetadata.length === 0) return true; - const strongest = getStrongestMetadata(parsedMetadata); - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); - for (const item of metadata) { - const algorithm = item.algo; - const expectedValue = item.hash; - let actualValue = crypto$2.createHash(algorithm).update(bytes).digest("base64"); - if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); - else actualValue = actualValue.slice(0, -1); - if (compareBase64Mixed(actualValue, expectedValue)) return true; - } - return false; - } - const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - /** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ - function parseMetadata(metadata) { - /** @type {{ algo: string, hash: string }[]} */ - const result = []; - let empty = true; - for (const token of metadata.split(" ")) { - empty = false; - const parsedToken = parseHashWithOptions.exec(token); - if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; - const algorithm = parsedToken.groups.algo.toLowerCase(); - if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); - } - if (empty === true) return "no metadata"; - return result; - } - /** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ - function getStrongestMetadata(metadataList) { - let algorithm = metadataList[0].algo; - if (algorithm[3] === "5") return algorithm; - for (let i$1 = 1; i$1 < metadataList.length; ++i$1) { - const metadata = metadataList[i$1]; - if (metadata.algo[3] === "5") { - algorithm = "sha512"; - break; - } else if (algorithm[3] === "3") continue; - else if (metadata.algo[3] === "3") algorithm = "sha384"; - } - return algorithm; - } - function filterMetadataListByAlgorithm(metadataList, algorithm) { - if (metadataList.length === 1) return metadataList; - let pos = 0; - for (let i$1 = 0; i$1 < metadataList.length; ++i$1) if (metadataList[i$1].algo === algorithm) metadataList[pos++] = metadataList[i$1]; - metadataList.length = pos; - return metadataList; - } - /** - * Compares two base64 strings, allowing for base64url - * in the second string. - * - * @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ - function compareBase64Mixed(actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) return false; - for (let i$1 = 0; i$1 < actualValue.length; ++i$1) if (actualValue[i$1] !== expectedValue[i$1]) { - if (actualValue[i$1] === "+" && expectedValue[i$1] === "-" || actualValue[i$1] === "/" && expectedValue[i$1] === "_") continue; - return false; - } - return true; - } - function tryUpgradeRequestToAPotentiallyTrustworthyURL$1(request$1) {} - /** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ - function sameOrigin$2(A, B) { - if (A.origin === B.origin && A.origin === "null") return true; - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; - return false; - } - function createDeferredPromise$3() { - let res; - let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); - return { - promise, - resolve: res, - reject: rej - }; - } - function isAborted$2(fetchParams) { - return fetchParams.controller.state === "aborted"; - } - function isCancelled$2(fetchParams) { - return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; - } - const normalizeMethodRecord$1 = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" - }; - Object.setPrototypeOf(normalizeMethodRecord$1, null); - /** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ - function normalizeMethod$1(method) { - return normalizeMethodRecord$1[method.toLowerCase()] ?? method; - } - function serializeJavascriptValueToJSONString$1(value) { - const result = JSON.stringify(value); - if (result === void 0) throw new TypeError("Value is not JSON serializable"); - assert$18(typeof result === "string"); - return result; - } - const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); - /** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {() => unknown[]} iterator - * @param {string} name name of the instance - * @param {'key'|'value'|'key+value'} kind - */ - function makeIterator$2(iterator, name, kind) { - const object = { - index: 0, - kind, - target: iterator - }; - const i$1 = { - next() { - if (Object.getPrototypeOf(this) !== i$1) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); - const { index, kind: kind$1, target } = object; - const values = target(); - const len = values.length; - if (index >= len) return { - value: void 0, - done: true - }; - const pair = values[index]; - object.index = index + 1; - return iteratorResult(pair, kind$1); - }, - [Symbol.toStringTag]: `${name} Iterator` - }; - Object.setPrototypeOf(i$1, esIteratorPrototype); - return Object.setPrototypeOf({}, i$1); - } - function iteratorResult(pair, kind) { - let result; - switch (kind) { - case "key": { - result = pair[0]; - break; - } - case "value": { - result = pair[1]; - break; - } - case "key+value": { - result = pair; - break; - } - } - return { - value: result, - done: false - }; - } - /** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ - async function fullyReadBody$2(body, processBody, processBodyError) { - const successSteps = processBody; - const errorSteps = processBodyError; - let reader; - try { - reader = body.stream.getReader(); - } catch (e) { - errorSteps(e); - return; - } - try { - const result = await readAllBytes$1(reader); - successSteps(result); - } catch (e) { - errorSteps(e); - } - } - /** @type {ReadableStream} */ - let ReadableStream$3 = globalThis.ReadableStream; - function isReadableStreamLike$1(stream$2) { - if (!ReadableStream$3) ReadableStream$3 = __require("stream/web").ReadableStream; - return stream$2 instanceof ReadableStream$3 || stream$2[Symbol.toStringTag] === "ReadableStream" && typeof stream$2.tee === "function"; - } - const MAXIMUM_ARGUMENT_LENGTH = 65535; - /** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {number[]|Uint8Array} input - */ - function isomorphicDecode$1(input) { - if (input.length < MAXIMUM_ARGUMENT_LENGTH) return String.fromCharCode(...input); - return input.reduce((previous, current) => previous + String.fromCharCode(current), ""); - } - /** - * @param {ReadableStreamController} controller - */ - function readableStreamClose$2(controller) { - try { - controller.close(); - } catch (err) { - if (!err.message.includes("Controller is already closed")) throw err; - } - } - /** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ - function isomorphicEncode$2(input) { - for (let i$1 = 0; i$1 < input.length; i$1++) assert$18(input.charCodeAt(i$1) <= 255); - return input; - } - /** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ - async function readAllBytes$1(reader) { - const bytes = []; - let byteLength = 0; - while (true) { - const { done, value: chunk } = await reader.read(); - if (done) return Buffer.concat(bytes, byteLength); - if (!isUint8Array$1(chunk)) throw new TypeError("Received non-Uint8Array chunk"); - bytes.push(chunk); - byteLength += chunk.length; - } - } - /** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ - function urlIsLocal$1(url) { - assert$18("protocol" in url); - const protocol = url.protocol; - return protocol === "about:" || protocol === "blob:" || protocol === "data:"; - } - /** - * @param {string|URL} url - */ - function urlHasHttpsScheme$1(url) { - if (typeof url === "string") return url.startsWith("https:"); - return url.protocol === "https:"; - } - /** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ - function urlIsHttpHttpsScheme$2(url) { - assert$18("protocol" in url); - const protocol = url.protocol; - return protocol === "http:" || protocol === "https:"; - } - /** - * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. - */ - const hasOwn$1 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); - module.exports = { - isAborted: isAborted$2, - isCancelled: isCancelled$2, - createDeferredPromise: createDeferredPromise$3, - ReadableStreamFrom: ReadableStreamFrom$2, - toUSVString: toUSVString$4, - tryUpgradeRequestToAPotentiallyTrustworthyURL: tryUpgradeRequestToAPotentiallyTrustworthyURL$1, - coarsenedSharedCurrentTime: coarsenedSharedCurrentTime$1, - determineRequestsReferrer: determineRequestsReferrer$1, - makePolicyContainer: makePolicyContainer$2, - clonePolicyContainer: clonePolicyContainer$1, - appendFetchMetadata: appendFetchMetadata$1, - appendRequestOriginHeader: appendRequestOriginHeader$1, - TAOCheck: TAOCheck$1, - corsCheck: corsCheck$1, - crossOriginResourcePolicyCheck: crossOriginResourcePolicyCheck$1, - createOpaqueTimingInfo: createOpaqueTimingInfo$1, - setRequestReferrerPolicyOnRedirect: setRequestReferrerPolicyOnRedirect$1, - isValidHTTPToken: isValidHTTPToken$1, - requestBadPort: requestBadPort$1, - requestCurrentURL: requestCurrentURL$1, - responseURL, - responseLocationURL: responseLocationURL$1, - isBlobLike: isBlobLike$6, - isURLPotentiallyTrustworthy, - isValidReasonPhrase: isValidReasonPhrase$1, - sameOrigin: sameOrigin$2, - normalizeMethod: normalizeMethod$1, - serializeJavascriptValueToJSONString: serializeJavascriptValueToJSONString$1, - makeIterator: makeIterator$2, - isValidHeaderName: isValidHeaderName$2, - isValidHeaderValue: isValidHeaderValue$1, - hasOwn: hasOwn$1, - isErrorLike: isErrorLike$2, - fullyReadBody: fullyReadBody$2, - bytesMatch: bytesMatch$1, - isReadableStreamLike: isReadableStreamLike$1, - readableStreamClose: readableStreamClose$2, - isomorphicEncode: isomorphicEncode$2, - isomorphicDecode: isomorphicDecode$1, - urlIsLocal: urlIsLocal$1, - urlHasHttpsScheme: urlHasHttpsScheme$1, - urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$2, - readAllBytes: readAllBytes$1, - normalizeMethodRecord: normalizeMethodRecord$1, - parseMetadata - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js -var require_symbols$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js"(exports, module) { - module.exports = { - kUrl: Symbol("url"), - kHeaders: Symbol("headers"), - kSignal: Symbol("signal"), - kState: Symbol("state"), - kGuard: Symbol("guard"), - kRealm: Symbol("realm") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js -var require_webidl = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js"(exports, module) { - const { types: types$4 } = __require("util"); - const { hasOwn, toUSVString: toUSVString$3 } = require_util$5(); - /** @type {import('../../types/webidl').Webidl} */ - const webidl$14 = {}; - webidl$14.converters = {}; - webidl$14.util = {}; - webidl$14.errors = {}; - webidl$14.errors.exception = function(message) { - return new TypeError(`${message.header}: ${message.message}`); - }; - webidl$14.errors.conversionFailed = function(context) { - const plural = context.types.length === 1 ? "" : " one of"; - const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; - return webidl$14.errors.exception({ - header: context.prefix, - message - }); - }; - webidl$14.errors.invalidArgument = function(context) { - return webidl$14.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }); - }; - webidl$14.brandCheck = function(V, I, opts = void 0) { - if (opts?.strict !== false && !(V instanceof I)) throw new TypeError("Illegal invocation"); - else return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]; - }; - webidl$14.argumentLengthCheck = function({ length }, min, ctx) { - if (length < min) throw webidl$14.errors.exception({ - message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, - ...ctx - }); - }; - webidl$14.illegalConstructor = function() { - throw webidl$14.errors.exception({ - header: "TypeError", - message: "Illegal constructor" - }); - }; - webidl$14.util.Type = function(V) { - switch (typeof V) { - case "undefined": return "Undefined"; - case "boolean": return "Boolean"; - case "string": return "String"; - case "symbol": return "Symbol"; - case "number": return "Number"; - case "bigint": return "BigInt"; - case "function": - case "object": { - if (V === null) return "Null"; - return "Object"; - } - } - }; - webidl$14.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) { - let upperBound; - let lowerBound; - if (bitLength === 64) { - upperBound = Math.pow(2, 53) - 1; - if (signedness === "unsigned") lowerBound = 0; - else lowerBound = Math.pow(-2, 53) + 1; - } else if (signedness === "unsigned") { - lowerBound = 0; - upperBound = Math.pow(2, bitLength) - 1; - } else { - lowerBound = Math.pow(-2, bitLength) - 1; - upperBound = Math.pow(2, bitLength - 1) - 1; - } - let x = Number(V); - if (x === 0) x = 0; - if (opts.enforceRange === true) { - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl$14.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${V} to an integer.` - }); - x = webidl$14.util.IntegerPart(x); - if (x < lowerBound || x > upperBound) throw webidl$14.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }); - return x; - } - if (!Number.isNaN(x) && opts.clamp === true) { - x = Math.min(Math.max(x, lowerBound), upperBound); - if (Math.floor(x) % 2 === 0) x = Math.floor(x); - else x = Math.ceil(x); - return x; - } - if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; - x = webidl$14.util.IntegerPart(x); - x = x % Math.pow(2, bitLength); - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); - return x; - }; - webidl$14.util.IntegerPart = function(n) { - const r = Math.floor(Math.abs(n)); - if (n < 0) return -1 * r; - return r; - }; - webidl$14.sequenceConverter = function(converter) { - return (V) => { - if (webidl$14.util.Type(V) !== "Object") throw webidl$14.errors.exception({ - header: "Sequence", - message: `Value of type ${webidl$14.util.Type(V)} is not an Object.` - }); - /** @type {Generator} */ - const method = V?.[Symbol.iterator]?.(); - const seq = []; - if (method === void 0 || typeof method.next !== "function") throw webidl$14.errors.exception({ - header: "Sequence", - message: "Object is not an iterator." - }); - while (true) { - const { done, value } = method.next(); - if (done) break; - seq.push(converter(value)); - } - return seq; - }; - }; - webidl$14.recordConverter = function(keyConverter, valueConverter) { - return (O) => { - if (webidl$14.util.Type(O) !== "Object") throw webidl$14.errors.exception({ - header: "Record", - message: `Value of type ${webidl$14.util.Type(O)} is not an Object.` - }); - const result = {}; - if (!types$4.isProxy(O)) { - const keys$1 = Object.keys(O); - for (const key of keys$1) { - const typedKey = keyConverter(key); - const typedValue = valueConverter(O[key]); - result[typedKey] = typedValue; - } - return result; - } - const keys = Reflect.ownKeys(O); - for (const key of keys) { - const desc = Reflect.getOwnPropertyDescriptor(O, key); - if (desc?.enumerable) { - const typedKey = keyConverter(key); - const typedValue = valueConverter(O[key]); - result[typedKey] = typedValue; - } - } - return result; - }; - }; - webidl$14.interfaceConverter = function(i$1) { - return (V, opts = {}) => { - if (opts.strict !== false && !(V instanceof i$1)) throw webidl$14.errors.exception({ - header: i$1.name, - message: `Expected ${V} to be an instance of ${i$1.name}.` - }); - return V; - }; - }; - webidl$14.dictionaryConverter = function(converters) { - return (dictionary) => { - const type = webidl$14.util.Type(dictionary); - const dict = {}; - if (type === "Null" || type === "Undefined") return dict; - else if (type !== "Object") throw webidl$14.errors.exception({ - header: "Dictionary", - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); - for (const options of converters) { - const { key, defaultValue, required, converter } = options; - if (required === true) { - if (!hasOwn(dictionary, key)) throw webidl$14.errors.exception({ - header: "Dictionary", - message: `Missing required key "${key}".` - }); - } - let value = dictionary[key]; - const hasDefault = hasOwn(options, "defaultValue"); - if (hasDefault && value !== null) value = value ?? defaultValue; - if (required || hasDefault || value !== void 0) { - value = converter(value); - if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl$14.errors.exception({ - header: "Dictionary", - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); - dict[key] = value; - } - } - return dict; - }; - }; - webidl$14.nullableConverter = function(converter) { - return (V) => { - if (V === null) return V; - return converter(V); - }; - }; - webidl$14.converters.DOMString = function(V, opts = {}) { - if (V === null && opts.legacyNullToEmptyString) return ""; - if (typeof V === "symbol") throw new TypeError("Could not convert argument of type symbol to string."); - return String(V); - }; - webidl$14.converters.ByteString = function(V) { - const x = webidl$14.converters.DOMString(V); - for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); - return x; - }; - webidl$14.converters.USVString = toUSVString$3; - webidl$14.converters.boolean = function(V) { - const x = Boolean(V); - return x; - }; - webidl$14.converters.any = function(V) { - return V; - }; - webidl$14.converters["long long"] = function(V) { - const x = webidl$14.util.ConvertToInt(V, 64, "signed"); - return x; - }; - webidl$14.converters["unsigned long long"] = function(V) { - const x = webidl$14.util.ConvertToInt(V, 64, "unsigned"); - return x; - }; - webidl$14.converters["unsigned long"] = function(V) { - const x = webidl$14.util.ConvertToInt(V, 32, "unsigned"); - return x; - }; - webidl$14.converters["unsigned short"] = function(V, opts) { - const x = webidl$14.util.ConvertToInt(V, 16, "unsigned", opts); - return x; - }; - webidl$14.converters.ArrayBuffer = function(V, opts = {}) { - if (webidl$14.util.Type(V) !== "Object" || !types$4.isAnyArrayBuffer(V)) throw webidl$14.errors.conversionFailed({ - prefix: `${V}`, - argument: `${V}`, - types: ["ArrayBuffer"] - }); - if (opts.allowShared === false && types$4.isSharedArrayBuffer(V)) throw webidl$14.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - return V; - }; - webidl$14.converters.TypedArray = function(V, T, opts = {}) { - if (webidl$14.util.Type(V) !== "Object" || !types$4.isTypedArray(V) || V.constructor.name !== T.name) throw webidl$14.errors.conversionFailed({ - prefix: `${T.name}`, - argument: `${V}`, - types: [T.name] - }); - if (opts.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl$14.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - return V; - }; - webidl$14.converters.DataView = function(V, opts = {}) { - if (webidl$14.util.Type(V) !== "Object" || !types$4.isDataView(V)) throw webidl$14.errors.exception({ - header: "DataView", - message: "Object is not a DataView." - }); - if (opts.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl$14.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - return V; - }; - webidl$14.converters.BufferSource = function(V, opts = {}) { - if (types$4.isAnyArrayBuffer(V)) return webidl$14.converters.ArrayBuffer(V, opts); - if (types$4.isTypedArray(V)) return webidl$14.converters.TypedArray(V, V.constructor); - if (types$4.isDataView(V)) return webidl$14.converters.DataView(V, opts); - throw new TypeError(`Could not convert ${V} to a BufferSource.`); - }; - webidl$14.converters["sequence"] = webidl$14.sequenceConverter(webidl$14.converters.ByteString); - webidl$14.converters["sequence>"] = webidl$14.sequenceConverter(webidl$14.converters["sequence"]); - webidl$14.converters["record"] = webidl$14.recordConverter(webidl$14.converters.ByteString, webidl$14.converters.ByteString); - module.exports = { webidl: webidl$14 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js -var require_dataURL = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js"(exports, module) { - const assert$17 = __require("assert"); - const { atob: atob$1 } = __require("buffer"); - const { isomorphicDecode } = require_util$5(); - const encoder$1 = new TextEncoder(); - /** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ - const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/; - const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/; - /** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ - const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/; - /** @param {URL} dataURL */ - function dataURLProcessor$1(dataURL) { - assert$17(dataURL.protocol === "data:"); - let input = URLSerializer$4(dataURL, true); - input = input.slice(5); - const position = { position: 0 }; - let mimeType = collectASequenceOfCodePointsFast$1(",", input, position); - const mimeTypeLength = mimeType.length; - mimeType = removeASCIIWhitespace(mimeType, true, true); - if (position.position >= input.length) return "failure"; - position.position++; - const encodedBody = input.slice(mimeTypeLength + 1); - let body = stringPercentDecode(encodedBody); - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - const stringBody = isomorphicDecode(body); - body = forgivingBase64(stringBody); - if (body === "failure") return "failure"; - mimeType = mimeType.slice(0, -6); - mimeType = mimeType.replace(/(\u0020)+$/, ""); - mimeType = mimeType.slice(0, -1); - } - if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; - let mimeTypeRecord = parseMIMEType$3(mimeType); - if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType$3("text/plain;charset=US-ASCII"); - return { - mimeType: mimeTypeRecord, - body - }; - } - /** - * @param {URL} url - * @param {boolean} excludeFragment - */ - function URLSerializer$4(url, excludeFragment = false) { - if (!excludeFragment) return url.href; - const href = url.href; - const hashLength = url.hash.length; - return hashLength === 0 ? href : href.substring(0, href.length - hashLength); - } - /** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ - function collectASequenceOfCodePoints(condition, input, position) { - let result = ""; - while (position.position < input.length && condition(input[position.position])) { - result += input[position.position]; - position.position++; - } - return result; - } - /** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ - function collectASequenceOfCodePointsFast$1(char, input, position) { - const idx = input.indexOf(char, position.position); - const start = position.position; - if (idx === -1) { - position.position = input.length; - return input.slice(start); - } - position.position = idx; - return input.slice(start, position.position); - } - /** @param {string} input */ - function stringPercentDecode(input) { - const bytes = encoder$1.encode(input); - return percentDecode(bytes); - } - /** @param {Uint8Array} input */ - function percentDecode(input) { - /** @type {number[]} */ - const output = []; - for (let i$1 = 0; i$1 < input.length; i$1++) { - const byte = input[i$1]; - if (byte !== 37) output.push(byte); - else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i$1 + 1], input[i$1 + 2]))) output.push(37); - else { - const nextTwoBytes = String.fromCharCode(input[i$1 + 1], input[i$1 + 2]); - const bytePoint = Number.parseInt(nextTwoBytes, 16); - output.push(bytePoint); - i$1 += 2; - } - } - return Uint8Array.from(output); - } - /** @param {string} input */ - function parseMIMEType$3(input) { - input = removeHTTPWhitespace(input, true, true); - const position = { position: 0 }; - const type = collectASequenceOfCodePointsFast$1("/", input, position); - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; - if (position.position > input.length) return "failure"; - position.position++; - let subtype = collectASequenceOfCodePointsFast$1(";", input, position); - subtype = removeHTTPWhitespace(subtype, false, true); - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; - const typeLowercase = type.toLowerCase(); - const subtypeLowercase = subtype.toLowerCase(); - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - parameters: new Map(), - essence: `${typeLowercase}/${subtypeLowercase}` - }; - while (position.position < input.length) { - position.position++; - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - (char) => HTTP_WHITESPACE_REGEX.test(char), - input, - position -); - let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); - parameterName = parameterName.toLowerCase(); - if (position.position < input.length) { - if (input[position.position] === ";") continue; - position.position++; - } - if (position.position > input.length) break; - let parameterValue = null; - if (input[position.position] === "\"") { - parameterValue = collectAnHTTPQuotedString(input, position, true); - collectASequenceOfCodePointsFast$1(";", input, position); - } else { - parameterValue = collectASequenceOfCodePointsFast$1(";", input, position); - parameterValue = removeHTTPWhitespace(parameterValue, false, true); - if (parameterValue.length === 0) continue; - } - if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); - } - return mimeType; - } - /** @param {string} data */ - function forgivingBase64(data) { - data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, ""); - if (data.length % 4 === 0) data = data.replace(/=?=$/, ""); - if (data.length % 4 === 1) return "failure"; - if (/[^+/0-9A-Za-z]/.test(data)) return "failure"; - const binary = atob$1(data); - const bytes = new Uint8Array(binary.length); - for (let byte = 0; byte < binary.length; byte++) bytes[byte] = binary.charCodeAt(byte); - return bytes; - } - /** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ - function collectAnHTTPQuotedString(input, position, extractValue) { - const positionStart = position.position; - let value = ""; - assert$17(input[position.position] === "\""); - position.position++; - while (true) { - value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); - if (position.position >= input.length) break; - const quoteOrBackslash = input[position.position]; - position.position++; - if (quoteOrBackslash === "\\") { - if (position.position >= input.length) { - value += "\\"; - break; - } - value += input[position.position]; - position.position++; - } else { - assert$17(quoteOrBackslash === "\""); - break; - } - } - if (extractValue) return value; - return input.slice(positionStart, position.position); - } - /** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ - function serializeAMimeType$4(mimeType) { - assert$17(mimeType !== "failure"); - const { parameters, essence } = mimeType; - let serialization = essence; - for (let [name, value] of parameters.entries()) { - serialization += ";"; - serialization += name; - serialization += "="; - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - value = value.replace(/(\\|")/g, "\\$1"); - value = "\"" + value; - value += "\""; - } - serialization += value; - } - return serialization; - } - /** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} char - */ - function isHTTPWhiteSpace(char) { - return char === "\r" || char === "\n" || char === " " || char === " "; - } - /** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - */ - function removeHTTPWhitespace(str, leading = true, trailing = true) { - let lead = 0; - let trail = str.length - 1; - if (leading) for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); - if (trailing) for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); - return str.slice(lead, trail + 1); - } - /** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {string} char - */ - function isASCIIWhitespace(char) { - return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; - } - /** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - */ - function removeASCIIWhitespace(str, leading = true, trailing = true) { - let lead = 0; - let trail = str.length - 1; - if (leading) for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); - if (trailing) for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); - return str.slice(lead, trail + 1); - } - module.exports = { - dataURLProcessor: dataURLProcessor$1, - URLSerializer: URLSerializer$4, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast: collectASequenceOfCodePointsFast$1, - stringPercentDecode, - parseMIMEType: parseMIMEType$3, - collectAnHTTPQuotedString, - serializeAMimeType: serializeAMimeType$4 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/file.js -var require_file = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/file.js"(exports, module) { - const { Blob: Blob$4, File: NativeFile$2 } = __require("buffer"); - const { types: types$3 } = __require("util"); - const { kState: kState$9 } = require_symbols$3(); - const { isBlobLike: isBlobLike$5 } = require_util$5(); - const { webidl: webidl$13 } = require_webidl(); - const { parseMIMEType: parseMIMEType$2, serializeAMimeType: serializeAMimeType$3 } = require_dataURL(); - const { kEnumerableProperty: kEnumerableProperty$8 } = require_util$6(); - const encoder = new TextEncoder(); - var File$2 = class File$2 extends Blob$4 { - constructor(fileBits, fileName, options = {}) { - webidl$13.argumentLengthCheck(arguments, 2, { header: "File constructor" }); - fileBits = webidl$13.converters["sequence"](fileBits); - fileName = webidl$13.converters.USVString(fileName); - options = webidl$13.converters.FilePropertyBag(options); - const n = fileName; - let t$1 = options.type; - let d; - substep: { - if (t$1) { - t$1 = parseMIMEType$2(t$1); - if (t$1 === "failure") { - t$1 = ""; - break substep; - } - t$1 = serializeAMimeType$3(t$1).toLowerCase(); - } - d = options.lastModified; - } - super(processBlobParts(fileBits, options), { type: t$1 }); - this[kState$9] = { - name: n, - lastModified: d, - type: t$1 - }; - } - get name() { - webidl$13.brandCheck(this, File$2); - return this[kState$9].name; - } - get lastModified() { - webidl$13.brandCheck(this, File$2); - return this[kState$9].lastModified; - } - get type() { - webidl$13.brandCheck(this, File$2); - return this[kState$9].type; - } - }; - var FileLike$1 = class FileLike$1 { - constructor(blobLike, fileName, options = {}) { - const n = fileName; - const t$1 = options.type; - const d = options.lastModified ?? Date.now(); - this[kState$9] = { - blobLike, - name: n, - type: t$1, - lastModified: d - }; - } - stream(...args) { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.stream(...args); - } - arrayBuffer(...args) { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.arrayBuffer(...args); - } - slice(...args) { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.slice(...args); - } - text(...args) { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.text(...args); - } - get size() { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.size; - } - get type() { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.type; - } - get name() { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].name; - } - get lastModified() { - webidl$13.brandCheck(this, FileLike$1); - return this[kState$9].lastModified; - } - get [Symbol.toStringTag]() { - return "File"; - } - }; - Object.defineProperties(File$2.prototype, { - [Symbol.toStringTag]: { - value: "File", - configurable: true - }, - name: kEnumerableProperty$8, - lastModified: kEnumerableProperty$8 - }); - webidl$13.converters.Blob = webidl$13.interfaceConverter(Blob$4); - webidl$13.converters.BlobPart = function(V, opts) { - if (webidl$13.util.Type(V) === "Object") { - if (isBlobLike$5(V)) return webidl$13.converters.Blob(V, { strict: false }); - if (ArrayBuffer.isView(V) || types$3.isAnyArrayBuffer(V)) return webidl$13.converters.BufferSource(V, opts); - } - return webidl$13.converters.USVString(V, opts); - }; - webidl$13.converters["sequence"] = webidl$13.sequenceConverter(webidl$13.converters.BlobPart); - webidl$13.converters.FilePropertyBag = webidl$13.dictionaryConverter([ - { - key: "lastModified", - converter: webidl$13.converters["long long"], - get defaultValue() { - return Date.now(); - } - }, - { - key: "type", - converter: webidl$13.converters.DOMString, - defaultValue: "" - }, - { - key: "endings", - converter: (value) => { - value = webidl$13.converters.DOMString(value); - value = value.toLowerCase(); - if (value !== "native") value = "transparent"; - return value; - }, - defaultValue: "transparent" - } - ]); - /** - * @see https://www.w3.org/TR/FileAPI/#process-blob-parts - * @param {(NodeJS.TypedArray|Blob|string)[]} parts - * @param {{ type: string, endings: string }} options - */ - function processBlobParts(parts, options) { - /** @type {NodeJS.TypedArray[]} */ - const bytes = []; - for (const element of parts) if (typeof element === "string") { - let s = element; - if (options.endings === "native") s = convertLineEndingsNative(s); - bytes.push(encoder.encode(s)); - } else if (types$3.isAnyArrayBuffer(element) || types$3.isTypedArray(element)) if (!element.buffer) bytes.push(new Uint8Array(element)); - else bytes.push(new Uint8Array(element.buffer, element.byteOffset, element.byteLength)); - else if (isBlobLike$5(element)) bytes.push(element); - return bytes; - } - /** - * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native - * @param {string} s - */ - function convertLineEndingsNative(s) { - let nativeLineEnding = "\n"; - if (process.platform === "win32") nativeLineEnding = "\r\n"; - return s.replace(/\r?\n/g, nativeLineEnding); - } - function isFileLike$1(object) { - return NativeFile$2 && object instanceof NativeFile$2 || object instanceof File$2 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; - } - module.exports = { - File: File$2, - FileLike: FileLike$1, - isFileLike: isFileLike$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js -var require_formdata = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js"(exports, module) { - const { isBlobLike: isBlobLike$4, toUSVString: toUSVString$2, makeIterator: makeIterator$1 } = require_util$5(); - const { kState: kState$8 } = require_symbols$3(); - const { File: UndiciFile$1, FileLike, isFileLike } = require_file(); - const { webidl: webidl$12 } = require_webidl(); - const { Blob: Blob$3, File: NativeFile$1 } = __require("buffer"); - /** @type {globalThis['File']} */ - const File$1 = NativeFile$1 ?? UndiciFile$1; - var FormData$2 = class FormData$2 { - constructor(form) { - if (form !== void 0) throw webidl$12.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: ["undefined"] - }); - this[kState$8] = []; - } - append(name, value, filename = void 0) { - webidl$12.brandCheck(this, FormData$2); - webidl$12.argumentLengthCheck(arguments, 2, { header: "FormData.append" }); - if (arguments.length === 3 && !isBlobLike$4(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); - name = webidl$12.converters.USVString(name); - value = isBlobLike$4(value) ? webidl$12.converters.Blob(value, { strict: false }) : webidl$12.converters.USVString(value); - filename = arguments.length === 3 ? webidl$12.converters.USVString(filename) : void 0; - const entry = makeEntry(name, value, filename); - this[kState$8].push(entry); - } - delete(name) { - webidl$12.brandCheck(this, FormData$2); - webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.delete" }); - name = webidl$12.converters.USVString(name); - this[kState$8] = this[kState$8].filter((entry) => entry.name !== name); - } - get(name) { - webidl$12.brandCheck(this, FormData$2); - webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.get" }); - name = webidl$12.converters.USVString(name); - const idx = this[kState$8].findIndex((entry) => entry.name === name); - if (idx === -1) return null; - return this[kState$8][idx].value; - } - getAll(name) { - webidl$12.brandCheck(this, FormData$2); - webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.getAll" }); - name = webidl$12.converters.USVString(name); - return this[kState$8].filter((entry) => entry.name === name).map((entry) => entry.value); - } - has(name) { - webidl$12.brandCheck(this, FormData$2); - webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.has" }); - name = webidl$12.converters.USVString(name); - return this[kState$8].findIndex((entry) => entry.name === name) !== -1; - } - set(name, value, filename = void 0) { - webidl$12.brandCheck(this, FormData$2); - webidl$12.argumentLengthCheck(arguments, 2, { header: "FormData.set" }); - if (arguments.length === 3 && !isBlobLike$4(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); - name = webidl$12.converters.USVString(name); - value = isBlobLike$4(value) ? webidl$12.converters.Blob(value, { strict: false }) : webidl$12.converters.USVString(value); - filename = arguments.length === 3 ? toUSVString$2(filename) : void 0; - const entry = makeEntry(name, value, filename); - const idx = this[kState$8].findIndex((entry$1) => entry$1.name === name); - if (idx !== -1) this[kState$8] = [ - ...this[kState$8].slice(0, idx), - entry, - ...this[kState$8].slice(idx + 1).filter((entry$1) => entry$1.name !== name) - ]; - else this[kState$8].push(entry); - } - entries() { - webidl$12.brandCheck(this, FormData$2); - return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "key+value"); - } - keys() { - webidl$12.brandCheck(this, FormData$2); - return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "key"); - } - values() { - webidl$12.brandCheck(this, FormData$2); - return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "value"); - } - /** - * @param {(value: string, key: string, self: FormData) => void} callbackFn - * @param {unknown} thisArg - */ - forEach(callbackFn, thisArg = globalThis) { - webidl$12.brandCheck(this, FormData$2); - webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.forEach" }); - if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'."); - for (const [key, value] of this) callbackFn.apply(thisArg, [ - value, - key, - this - ]); - } - }; - FormData$2.prototype[Symbol.iterator] = FormData$2.prototype.entries; - Object.defineProperties(FormData$2.prototype, { [Symbol.toStringTag]: { - value: "FormData", - configurable: true - } }); - /** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ - function makeEntry(name, value, filename) { - name = Buffer.from(name).toString("utf8"); - if (typeof value === "string") value = Buffer.from(value).toString("utf8"); - else { - if (!isFileLike(value)) value = value instanceof Blob$3 ? new File$1([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); - if (filename !== void 0) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - }; - value = NativeFile$1 && value instanceof NativeFile$1 || value instanceof UndiciFile$1 ? new File$1([value], filename, options) : new FileLike(value, filename, options); - } - } - return { - name, - value - }; - } - module.exports = { FormData: FormData$2 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/body.js -var require_body = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/body.js"(exports, module) { - const Busboy = require_main(); - const util$16 = require_util$6(); - const { ReadableStreamFrom: ReadableStreamFrom$1, isBlobLike: isBlobLike$3, isReadableStreamLike, readableStreamClose: readableStreamClose$1, createDeferredPromise: createDeferredPromise$2, fullyReadBody: fullyReadBody$1 } = require_util$5(); - const { FormData: FormData$1 } = require_formdata(); - const { kState: kState$7 } = require_symbols$3(); - const { webidl: webidl$11 } = require_webidl(); - const { DOMException: DOMException$5, structuredClone } = require_constants$3(); - const { Blob: Blob$2, File: NativeFile } = __require("buffer"); - const { kBodyUsed: kBodyUsed$1 } = require_symbols$4(); - const assert$16 = __require("assert"); - const { isErrored: isErrored$1 } = require_util$6(); - const { isUint8Array, isArrayBuffer } = __require("util/types"); - const { File: UndiciFile } = require_file(); - const { parseMIMEType: parseMIMEType$1, serializeAMimeType: serializeAMimeType$2 } = require_dataURL(); - let random; - try { - const crypto$4 = __require("node:crypto"); - random = (max) => crypto$4.randomInt(0, max); - } catch { - random = (max) => Math.floor(Math.random(max)); - } - let ReadableStream$2 = globalThis.ReadableStream; - /** @type {globalThis['File']} */ - const File = NativeFile ?? UndiciFile; - const textEncoder$1 = new TextEncoder(); - const textDecoder = new TextDecoder(); - function extractBody$3(object, keepalive = false) { - if (!ReadableStream$2) ReadableStream$2 = __require("stream/web").ReadableStream; - let stream$2 = null; - if (object instanceof ReadableStream$2) stream$2 = object; - else if (isBlobLike$3(object)) stream$2 = object.stream(); - else stream$2 = new ReadableStream$2({ - async pull(controller) { - controller.enqueue(typeof source === "string" ? textEncoder$1.encode(source) : source); - queueMicrotask(() => readableStreamClose$1(controller)); - }, - start() {}, - type: void 0 - }); - assert$16(isReadableStreamLike(stream$2)); - let action = null; - let source = null; - let length = null; - let type = null; - if (typeof object === "string") { - source = object; - type = "text/plain;charset=UTF-8"; - } else if (object instanceof URLSearchParams) { - source = object.toString(); - type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); - else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - else if (util$16.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; - const prefix = `--${boundary}\r\nContent-Disposition: form-data`; - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => str.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]); - length = 0; - let hasUnknownSizeValue = false; - for (const [name, value] of object) if (typeof value === "string") { - const chunk$1 = textEncoder$1.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); - blobParts.push(chunk$1); - length += chunk$1.byteLength; - } else { - const chunk$1 = textEncoder$1.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r -Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); - blobParts.push(chunk$1, value, rn); - if (typeof value.size === "number") length += chunk$1.byteLength + value.size + rn.byteLength; - else hasUnknownSizeValue = true; - } - const chunk = textEncoder$1.encode(`--${boundary}--`); - blobParts.push(chunk); - length += chunk.byteLength; - if (hasUnknownSizeValue) length = null; - source = object; - action = async function* () { - for (const part of blobParts) if (part.stream) yield* part.stream(); - else yield part; - }; - type = "multipart/form-data; boundary=" + boundary; - } else if (isBlobLike$3(object)) { - source = object; - length = object.size; - if (object.type) type = object.type; - } else if (typeof object[Symbol.asyncIterator] === "function") { - if (keepalive) throw new TypeError("keepalive"); - if (util$16.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); - stream$2 = object instanceof ReadableStream$2 ? object : ReadableStreamFrom$1(object); - } - if (typeof source === "string" || util$16.isBuffer(source)) length = Buffer.byteLength(source); - if (action != null) { - let iterator; - stream$2 = new ReadableStream$2({ - async start() { - iterator = action(object)[Symbol.asyncIterator](); - }, - async pull(controller) { - const { value, done } = await iterator.next(); - if (done) queueMicrotask(() => { - controller.close(); - }); - else if (!isErrored$1(stream$2)) controller.enqueue(new Uint8Array(value)); - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - }, - type: void 0 - }); - } - const body = { - stream: stream$2, - source, - length - }; - return [body, type]; - } - function safelyExtractBody$1(object, keepalive = false) { - if (!ReadableStream$2) - // istanbul ignore next - ReadableStream$2 = __require("stream/web").ReadableStream; - if (object instanceof ReadableStream$2) { - // istanbul ignore next - assert$16(!util$16.isDisturbed(object), "The body has already been consumed."); - // istanbul ignore next - assert$16(!object.locked, "The stream is locked."); - } - return extractBody$3(object, keepalive); - } - function cloneBody$2(body) { - const [out1, out2] = body.stream.tee(); - const out2Clone = structuredClone(out2, { transfer: [out2] }); - const [, finalClone] = out2Clone.tee(); - body.stream = out1; - return { - stream: finalClone, - length: body.length, - source: body.source - }; - } - async function* consumeBody(body) { - if (body) if (isUint8Array(body)) yield body; - else { - const stream$2 = body.stream; - if (util$16.isDisturbed(stream$2)) throw new TypeError("The body has already been consumed."); - if (stream$2.locked) throw new TypeError("The stream is locked."); - stream$2[kBodyUsed$1] = true; - yield* stream$2; - } - } - function throwIfAborted(state) { - if (state.aborted) throw new DOMException$5("The operation was aborted.", "AbortError"); - } - function bodyMixinMethods(instance) { - const methods = { - blob() { - return specConsumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this); - if (mimeType === "failure") mimeType = ""; - else if (mimeType) mimeType = serializeAMimeType$2(mimeType); - return new Blob$2([bytes], { type: mimeType }); - }, instance); - }, - arrayBuffer() { - return specConsumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer; - }, instance); - }, - text() { - return specConsumeBody(this, utf8DecodeBytes, instance); - }, - json() { - return specConsumeBody(this, parseJSONFromBytes, instance); - }, - async formData() { - webidl$11.brandCheck(this, instance); - throwIfAborted(this[kState$7]); - const contentType = this.headers.get("Content-Type"); - if (/multipart\/form-data/.test(contentType)) { - const headers = {}; - for (const [key, value] of this.headers) headers[key.toLowerCase()] = value; - const responseFormData = new FormData$1(); - let busboy; - try { - busboy = new Busboy({ - headers, - preservePath: true - }); - } catch (err) { - throw new DOMException$5(`${err}`, "AbortError"); - } - busboy.on("field", (name, value) => { - responseFormData.append(name, value); - }); - busboy.on("file", (name, value, filename, encoding, mimeType) => { - const chunks = []; - if (encoding === "base64" || encoding.toLowerCase() === "base64") { - let base64chunk = ""; - value.on("data", (chunk) => { - base64chunk += chunk.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); - }); - value.on("end", () => { - chunks.push(Buffer.from(base64chunk, "base64")); - responseFormData.append(name, new File(chunks, filename, { type: mimeType })); - }); - } else { - value.on("data", (chunk) => { - chunks.push(chunk); - }); - value.on("end", () => { - responseFormData.append(name, new File(chunks, filename, { type: mimeType })); - }); - } - }); - const busboyResolve = new Promise((resolve, reject) => { - busboy.on("finish", resolve); - busboy.on("error", (err) => reject(new TypeError(err))); - }); - if (this.body !== null) for await (const chunk of consumeBody(this[kState$7].body)) busboy.write(chunk); - busboy.end(); - await busboyResolve; - return responseFormData; - } else if (/application\/x-www-form-urlencoded/.test(contentType)) { - let entries; - try { - let text = ""; - const streamingDecoder = new TextDecoder("utf-8", { ignoreBOM: true }); - for await (const chunk of consumeBody(this[kState$7].body)) { - if (!isUint8Array(chunk)) throw new TypeError("Expected Uint8Array chunk"); - text += streamingDecoder.decode(chunk, { stream: true }); - } - text += streamingDecoder.decode(); - entries = new URLSearchParams(text); - } catch (err) { - // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. - throw Object.assign(new TypeError(), { cause: err }); - } - const formData = new FormData$1(); - for (const [name, value] of entries) formData.append(name, value); - return formData; - } else { - await Promise.resolve(); - throwIfAborted(this[kState$7]); - throw webidl$11.errors.exception({ - header: `${instance.name}.formData`, - message: "Could not parse content as FormData." - }); - } - } - }; - return methods; - } - function mixinBody$2(prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ - async function specConsumeBody(object, convertBytesToJSValue, instance) { - webidl$11.brandCheck(object, instance); - throwIfAborted(object[kState$7]); - if (bodyUnusable(object[kState$7].body)) throw new TypeError("Body is unusable"); - const promise = createDeferredPromise$2(); - const errorSteps = (error$1) => promise.reject(error$1); - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)); - } catch (e) { - errorSteps(e); - } - }; - if (object[kState$7].body == null) { - successSteps(new Uint8Array()); - return promise.promise; - } - await fullyReadBody$1(object[kState$7].body, successSteps, errorSteps); - return promise.promise; - } - function bodyUnusable(body) { - return body != null && (body.stream.locked || util$16.isDisturbed(body.stream)); - } - /** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ - function utf8DecodeBytes(buffer) { - if (buffer.length === 0) return ""; - if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); - const output = textDecoder.decode(buffer); - return output; - } - /** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ - function parseJSONFromBytes(bytes) { - return JSON.parse(utf8DecodeBytes(bytes)); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} object - */ - function bodyMimeType(object) { - const { headersList } = object[kState$7]; - const contentType = headersList.get("content-type"); - if (contentType === null) return "failure"; - return parseMIMEType$1(contentType); - } - module.exports = { - extractBody: extractBody$3, - safelyExtractBody: safelyExtractBody$1, - cloneBody: cloneBody$2, - mixinBody: mixinBody$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/request.js -var require_request$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/request.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$20, NotSupportedError: NotSupportedError$1 } = require_errors(); - const assert$15 = __require("assert"); - const { kHTTP2BuildRequest: kHTTP2BuildRequest$1, kHTTP2CopyHeaders: kHTTP2CopyHeaders$1, kHTTP1BuildRequest: kHTTP1BuildRequest$1 } = require_symbols$4(); - const util$15 = require_util$6(); - /** - * Verifies that the given val is a valid HTTP token - * per the rules defined in RFC 7230 - * See https://tools.ietf.org/html/rfc7230#section-3.2.6 - */ - const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; - /** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ - const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - const invalidPathRegex = /[^\u0021-\u00ff]/; - const kHandler = Symbol("handler"); - const channels$3 = {}; - let extractBody$2; - try { - const diagnosticsChannel$2 = __require("diagnostics_channel"); - channels$3.create = diagnosticsChannel$2.channel("undici:request:create"); - channels$3.bodySent = diagnosticsChannel$2.channel("undici:request:bodySent"); - channels$3.headers = diagnosticsChannel$2.channel("undici:request:headers"); - channels$3.trailers = diagnosticsChannel$2.channel("undici:request:trailers"); - channels$3.error = diagnosticsChannel$2.channel("undici:request:error"); - } catch { - channels$3.create = { hasSubscribers: false }; - channels$3.bodySent = { hasSubscribers: false }; - channels$3.headers = { hasSubscribers: false }; - channels$3.trailers = { hasSubscribers: false }; - channels$3.error = { hasSubscribers: false }; - } - var Request$4 = class Request$4 { - constructor(origin, { path: path$5, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue }, handler) { - if (typeof path$5 !== "string") throw new InvalidArgumentError$20("path must be a string"); - else if (path$5[0] !== "/" && !(path$5.startsWith("http://") || path$5.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$20("path must be an absolute URL or start with a slash"); - else if (invalidPathRegex.exec(path$5) !== null) throw new InvalidArgumentError$20("invalid request path"); - if (typeof method !== "string") throw new InvalidArgumentError$20("method must be a string"); - else if (tokenRegExp.exec(method) === null) throw new InvalidArgumentError$20("invalid request method"); - if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$20("upgrade must be a string"); - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$20("invalid headersTimeout"); - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$20("invalid bodyTimeout"); - if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError$20("invalid reset"); - if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError$20("invalid expectContinue"); - this.headersTimeout = headersTimeout; - this.bodyTimeout = bodyTimeout; - this.throwOnError = throwOnError === true; - this.method = method; - this.abort = null; - if (body == null) this.body = null; - else if (util$15.isStream(body)) { - this.body = body; - const rState = this.body._readableState; - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy() { - util$15.destroy(this); - }; - this.body.on("end", this.endHandler); - } - this.errorHandler = (err) => { - if (this.abort) this.abort(err); - else this.error = err; - }; - this.body.on("error", this.errorHandler); - } else if (util$15.isBuffer(body)) this.body = body.byteLength ? body : null; - else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; - else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; - else if (util$15.isFormDataLike(body) || util$15.isIterable(body) || util$15.isBlobLike(body)) this.body = body; - else throw new InvalidArgumentError$20("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); - this.completed = false; - this.aborted = false; - this.upgrade = upgrade$1 || null; - this.path = query ? util$15.buildURL(path$5, query) : path$5; - this.origin = origin; - this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; - this.blocking = blocking == null ? false : blocking; - this.reset = reset == null ? null : reset; - this.host = null; - this.contentLength = null; - this.contentType = null; - this.headers = ""; - this.expectContinue = expectContinue != null ? expectContinue : false; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) throw new InvalidArgumentError$20("headers array must be even"); - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) processHeader(this, headers[i$1], headers[i$1 + 1]); - } else if (headers && typeof headers === "object") { - const keys = Object.keys(headers); - for (let i$1 = 0; i$1 < keys.length; i$1++) { - const key = keys[i$1]; - processHeader(this, key, headers[key]); - } - } else if (headers != null) throw new InvalidArgumentError$20("headers must be an object or an array"); - if (util$15.isFormDataLike(this.body)) { - if (util$15.nodeMajor < 16 || util$15.nodeMajor === 16 && util$15.nodeMinor < 8) throw new InvalidArgumentError$20("Form-Data bodies are only supported in node v16.8 and newer."); - if (!extractBody$2) extractBody$2 = require_body().extractBody; - const [bodyStream, contentType] = extractBody$2(body); - if (this.contentType == null) { - this.contentType = contentType; - this.headers += `content-type: ${contentType}\r\n`; - } - this.body = bodyStream.stream; - this.contentLength = bodyStream.length; - } else if (util$15.isBlobLike(body) && this.contentType == null && body.type) { - this.contentType = body.type; - this.headers += `content-type: ${body.type}\r\n`; - } - util$15.validateHandler(handler, method, upgrade$1); - this.servername = util$15.getServerName(this.host); - this[kHandler] = handler; - if (channels$3.create.hasSubscribers) channels$3.create.publish({ request: this }); - } - onBodySent(chunk) { - if (this[kHandler].onBodySent) try { - return this[kHandler].onBodySent(chunk); - } catch (err) { - this.abort(err); - } - } - onRequestSent() { - if (channels$3.bodySent.hasSubscribers) channels$3.bodySent.publish({ request: this }); - if (this[kHandler].onRequestSent) try { - return this[kHandler].onRequestSent(); - } catch (err) { - this.abort(err); - } - } - onConnect(abort$1) { - assert$15(!this.aborted); - assert$15(!this.completed); - if (this.error) abort$1(this.error); - else { - this.abort = abort$1; - return this[kHandler].onConnect(abort$1); - } - } - onHeaders(statusCode, headers, resume$1, statusText) { - assert$15(!this.aborted); - assert$15(!this.completed); - if (channels$3.headers.hasSubscribers) channels$3.headers.publish({ - request: this, - response: { - statusCode, - headers, - statusText - } - }); - try { - return this[kHandler].onHeaders(statusCode, headers, resume$1, statusText); - } catch (err) { - this.abort(err); - } - } - onData(chunk) { - assert$15(!this.aborted); - assert$15(!this.completed); - try { - return this[kHandler].onData(chunk); - } catch (err) { - this.abort(err); - return false; - } - } - onUpgrade(statusCode, headers, socket) { - assert$15(!this.aborted); - assert$15(!this.completed); - return this[kHandler].onUpgrade(statusCode, headers, socket); - } - onComplete(trailers) { - this.onFinally(); - assert$15(!this.aborted); - this.completed = true; - if (channels$3.trailers.hasSubscribers) channels$3.trailers.publish({ - request: this, - trailers - }); - try { - return this[kHandler].onComplete(trailers); - } catch (err) { - this.onError(err); - } - } - onError(error$1) { - this.onFinally(); - if (channels$3.error.hasSubscribers) channels$3.error.publish({ - request: this, - error: error$1 - }); - if (this.aborted) return; - this.aborted = true; - return this[kHandler].onError(error$1); - } - onFinally() { - if (this.errorHandler) { - this.body.off("error", this.errorHandler); - this.errorHandler = null; - } - if (this.endHandler) { - this.body.off("end", this.endHandler); - this.endHandler = null; - } - } - addHeader(key, value) { - processHeader(this, key, value); - return this; - } - static [kHTTP1BuildRequest$1](origin, opts, handler) { - return new Request$4(origin, opts, handler); - } - static [kHTTP2BuildRequest$1](origin, opts, handler) { - const headers = opts.headers; - opts = { - ...opts, - headers: null - }; - const request$1 = new Request$4(origin, opts, handler); - request$1.headers = {}; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) throw new InvalidArgumentError$20("headers array must be even"); - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) processHeader(request$1, headers[i$1], headers[i$1 + 1], true); - } else if (headers && typeof headers === "object") { - const keys = Object.keys(headers); - for (let i$1 = 0; i$1 < keys.length; i$1++) { - const key = keys[i$1]; - processHeader(request$1, key, headers[key], true); - } - } else if (headers != null) throw new InvalidArgumentError$20("headers must be an object or an array"); - return request$1; - } - static [kHTTP2CopyHeaders$1](raw) { - const rawHeaders = raw.split("\r\n"); - const headers = {}; - for (const header of rawHeaders) { - const [key, value] = header.split(": "); - if (value == null || value.length === 0) continue; - if (headers[key]) headers[key] += `,${value}`; - else headers[key] = value; - } - return headers; - } - }; - function processHeaderValue(key, val, skipAppend) { - if (val && typeof val === "object") throw new InvalidArgumentError$20(`invalid ${key} header`); - val = val != null ? `${val}` : ""; - if (headerCharRegex.exec(val) !== null) throw new InvalidArgumentError$20(`invalid ${key} header`); - return skipAppend ? val : `${key}: ${val}\r\n`; - } - function processHeader(request$1, key, val, skipAppend = false) { - if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError$20(`invalid ${key} header`); - else if (val === void 0) return; - if (request$1.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val) !== null) throw new InvalidArgumentError$20(`invalid ${key} header`); - request$1.host = val; - } else if (request$1.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request$1.contentLength = parseInt(val, 10); - if (!Number.isFinite(request$1.contentLength)) throw new InvalidArgumentError$20("invalid content-length header"); - } else if (request$1.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request$1.contentType = val; - if (skipAppend) request$1.headers[key] = processHeaderValue(key, val, skipAppend); - else request$1.headers += processHeaderValue(key, val); - } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") throw new InvalidArgumentError$20("invalid transfer-encoding header"); - else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; - if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError$20("invalid connection header"); - else if (value === "close") request$1.reset = true; - } else if (key.length === 10 && key.toLowerCase() === "keep-alive") throw new InvalidArgumentError$20("invalid keep-alive header"); - else if (key.length === 7 && key.toLowerCase() === "upgrade") throw new InvalidArgumentError$20("invalid upgrade header"); - else if (key.length === 6 && key.toLowerCase() === "expect") throw new NotSupportedError$1("expect header not supported"); - else if (tokenRegExp.exec(key) === null) throw new InvalidArgumentError$20("invalid header key"); - else if (Array.isArray(val)) for (let i$1 = 0; i$1 < val.length; i$1++) if (skipAppend) if (request$1.headers[key]) request$1.headers[key] += `,${processHeaderValue(key, val[i$1], skipAppend)}`; - else request$1.headers[key] = processHeaderValue(key, val[i$1], skipAppend); - else request$1.headers += processHeaderValue(key, val[i$1]); - else if (skipAppend) request$1.headers[key] = processHeaderValue(key, val, skipAppend); - else request$1.headers += processHeaderValue(key, val); - } - module.exports = Request$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher.js -var require_dispatcher = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher.js"(exports, module) { - const EventEmitter = __require("events"); - var Dispatcher$3 = class extends EventEmitter { - dispatch() { - throw new Error("not implemented"); - } - close() { - throw new Error("not implemented"); - } - destroy() { - throw new Error("not implemented"); - } - }; - module.exports = Dispatcher$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js -var require_dispatcher_base = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js"(exports, module) { - const Dispatcher$2 = require_dispatcher(); - const { ClientDestroyedError: ClientDestroyedError$1, ClientClosedError, InvalidArgumentError: InvalidArgumentError$19 } = require_errors(); - const { kDestroy: kDestroy$4, kClose: kClose$6, kDispatch: kDispatch$3, kInterceptors: kInterceptors$5 } = require_symbols$4(); - const kDestroyed = Symbol("destroyed"); - const kClosed = Symbol("closed"); - const kOnDestroyed = Symbol("onDestroyed"); - const kOnClosed = Symbol("onClosed"); - const kInterceptedDispatch = Symbol("Intercepted Dispatch"); - var DispatcherBase$4 = class extends Dispatcher$2 { - constructor() { - super(); - this[kDestroyed] = false; - this[kOnDestroyed] = null; - this[kClosed] = false; - this[kOnClosed] = []; - } - get destroyed() { - return this[kDestroyed]; - } - get closed() { - return this[kClosed]; - } - get interceptors() { - return this[kInterceptors$5]; - } - set interceptors(newInterceptors) { - if (newInterceptors) for (let i$1 = newInterceptors.length - 1; i$1 >= 0; i$1--) { - const interceptor = this[kInterceptors$5][i$1]; - if (typeof interceptor !== "function") throw new InvalidArgumentError$19("interceptor must be an function"); - } - this[kInterceptors$5] = newInterceptors; - } - close(callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new InvalidArgumentError$19("invalid callback"); - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError$1(), null)); - return; - } - if (this[kClosed]) { - if (this[kOnClosed]) this[kOnClosed].push(callback); - else queueMicrotask(() => callback(null, null)); - return; - } - this[kClosed] = true; - this[kOnClosed].push(callback); - const onClosed = () => { - const callbacks = this[kOnClosed]; - this[kOnClosed] = null; - for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); - }; - this[kClose$6]().then(() => this.destroy()).then(() => { - queueMicrotask(onClosed); - }); - } - destroy(err, callback) { - if (typeof err === "function") { - callback = err; - err = null; - } - if (callback === void 0) return new Promise((resolve, reject) => { - this.destroy(err, (err$1, data) => { - return err$1 ? reject(err$1) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new InvalidArgumentError$19("invalid callback"); - if (this[kDestroyed]) { - if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); - else queueMicrotask(() => callback(null, null)); - return; - } - if (!err) err = new ClientDestroyedError$1(); - this[kDestroyed] = true; - this[kOnDestroyed] = this[kOnDestroyed] || []; - this[kOnDestroyed].push(callback); - const onDestroyed = () => { - const callbacks = this[kOnDestroyed]; - this[kOnDestroyed] = null; - for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); - }; - this[kDestroy$4](err).then(() => { - queueMicrotask(onDestroyed); - }); - } - [kInterceptedDispatch](opts, handler) { - if (!this[kInterceptors$5] || this[kInterceptors$5].length === 0) { - this[kInterceptedDispatch] = this[kDispatch$3]; - return this[kDispatch$3](opts, handler); - } - let dispatch = this[kDispatch$3].bind(this); - for (let i$1 = this[kInterceptors$5].length - 1; i$1 >= 0; i$1--) dispatch = this[kInterceptors$5][i$1](dispatch); - this[kInterceptedDispatch] = dispatch; - return dispatch(opts, handler); - } - dispatch(opts, handler) { - if (!handler || typeof handler !== "object") throw new InvalidArgumentError$19("handler must be an object"); - try { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$19("opts must be an object."); - if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError$1(); - if (this[kClosed]) throw new ClientClosedError(); - return this[kInterceptedDispatch](opts, handler); - } catch (err) { - if (typeof handler.onError !== "function") throw new InvalidArgumentError$19("invalid onError method"); - handler.onError(err); - return false; - } - } - }; - module.exports = DispatcherBase$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/connect.js -var require_connect = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/connect.js"(exports, module) { - const net$1 = __require("net"); - const assert$14 = __require("assert"); - const util$14 = require_util$6(); - const { InvalidArgumentError: InvalidArgumentError$18, ConnectTimeoutError } = require_errors(); - let tls; - let SessionCache; - if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) SessionCache = class WeakSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) return; - const ref = this._sessionCache.get(key); - if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); - }); - } - get(sessionKey) { - const ref = this._sessionCache.get(sessionKey); - return ref ? ref.deref() : null; - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - this._sessionCache.set(sessionKey, new WeakRef(session)); - this._sessionRegistry.register(session, sessionKey); - } - }; - else SessionCache = class SimpleSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); - } - get(sessionKey) { - return this._sessionCache.get(sessionKey); - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - if (this._sessionCache.size >= this._maxCachedSessions) { - const { value: oldestKey } = this._sessionCache.keys().next(); - this._sessionCache.delete(oldestKey); - } - this._sessionCache.set(sessionKey, session); - } - }; - function buildConnector$4({ allowH2, maxCachedSessions, socketPath, timeout,...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError$18("maxCachedSessions must be a positive integer or zero"); - const options = { - path: socketPath, - ...opts - }; - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); - timeout = timeout == null ? 1e4 : timeout; - allowH2 = allowH2 != null ? allowH2 : false; - return function connect$2({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket; - if (protocol === "https:") { - if (!tls) tls = __require("tls"); - servername = servername || options.servername || util$14.getServerName(host) || null; - const sessionKey = servername || hostname; - const session = sessionCache.get(sessionKey) || null; - assert$14(sessionKey); - socket = tls.connect({ - highWaterMark: 16384, - ...options, - servername, - session, - localAddress, - ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], - socket: httpSocket, - port: port || 443, - host: hostname - }); - socket.on("session", function(session$1) { - sessionCache.set(sessionKey, session$1); - }); - } else { - assert$14(!httpSocket, "httpSocket can only be sent on TLS update"); - socket = net$1.connect({ - highWaterMark: 64 * 1024, - ...options, - localAddress, - port: port || 80, - host: hostname - }); - } - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; - socket.setKeepAlive(true, keepAliveInitialDelay); - } - const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout); - socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }; - } - function setupTimeout(onConnectTimeout$1, timeout) { - if (!timeout) return () => {}; - let s1 = null; - let s2 = null; - const timeoutId = setTimeout(() => { - s1 = setImmediate(() => { - if (process.platform === "win32") s2 = setImmediate(() => onConnectTimeout$1()); - else onConnectTimeout$1(); - }); - }, timeout); - return () => { - clearTimeout(timeoutId); - clearImmediate(s1); - clearImmediate(s2); - }; - } - function onConnectTimeout(socket) { - util$14.destroy(socket, new ConnectTimeoutError()); - } - module.exports = buildConnector$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js -var require_utils = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.enumToMap = void 0; - function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === "number") res[key] = value; - }); - return res; - } - exports.enumToMap = enumToMap; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js -var require_constants$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; - const utils_1$1 = require_utils(); - var ERROR; - (function(ERROR$1) { - ERROR$1[ERROR$1["OK"] = 0] = "OK"; - ERROR$1[ERROR$1["INTERNAL"] = 1] = "INTERNAL"; - ERROR$1[ERROR$1["STRICT"] = 2] = "STRICT"; - ERROR$1[ERROR$1["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR$1[ERROR$1["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR$1[ERROR$1["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR$1[ERROR$1["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR$1[ERROR$1["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR$1[ERROR$1["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR$1[ERROR$1["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR$1[ERROR$1["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR$1[ERROR$1["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR$1[ERROR$1["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR$1[ERROR$1["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR$1[ERROR$1["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR$1[ERROR$1["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR$1[ERROR$1["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR$1[ERROR$1["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR$1[ERROR$1["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR$1[ERROR$1["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR$1[ERROR$1["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR$1[ERROR$1["PAUSED"] = 21] = "PAUSED"; - ERROR$1[ERROR$1["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR$1[ERROR$1["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR$1[ERROR$1["USER"] = 24] = "USER"; - })(ERROR = exports.ERROR || (exports.ERROR = {})); - var TYPE; - (function(TYPE$1) { - TYPE$1[TYPE$1["BOTH"] = 0] = "BOTH"; - TYPE$1[TYPE$1["REQUEST"] = 1] = "REQUEST"; - TYPE$1[TYPE$1["RESPONSE"] = 2] = "RESPONSE"; - })(TYPE = exports.TYPE || (exports.TYPE = {})); - var FLAGS; - (function(FLAGS$1) { - FLAGS$1[FLAGS$1["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS$1[FLAGS$1["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS$1[FLAGS$1["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS$1[FLAGS$1["CHUNKED"] = 8] = "CHUNKED"; - FLAGS$1[FLAGS$1["UPGRADE"] = 16] = "UPGRADE"; - FLAGS$1[FLAGS$1["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS$1[FLAGS$1["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS$1[FLAGS$1["TRAILING"] = 128] = "TRAILING"; - FLAGS$1[FLAGS$1["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; - })(FLAGS = exports.FLAGS || (exports.FLAGS = {})); - var LENIENT_FLAGS; - (function(LENIENT_FLAGS$1) { - LENIENT_FLAGS$1[LENIENT_FLAGS$1["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS$1[LENIENT_FLAGS$1["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS$1[LENIENT_FLAGS$1["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; - })(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); - var METHODS; - (function(METHODS$1) { - METHODS$1[METHODS$1["DELETE"] = 0] = "DELETE"; - METHODS$1[METHODS$1["GET"] = 1] = "GET"; - METHODS$1[METHODS$1["HEAD"] = 2] = "HEAD"; - METHODS$1[METHODS$1["POST"] = 3] = "POST"; - METHODS$1[METHODS$1["PUT"] = 4] = "PUT"; - METHODS$1[METHODS$1["CONNECT"] = 5] = "CONNECT"; - METHODS$1[METHODS$1["OPTIONS"] = 6] = "OPTIONS"; - METHODS$1[METHODS$1["TRACE"] = 7] = "TRACE"; - METHODS$1[METHODS$1["COPY"] = 8] = "COPY"; - METHODS$1[METHODS$1["LOCK"] = 9] = "LOCK"; - METHODS$1[METHODS$1["MKCOL"] = 10] = "MKCOL"; - METHODS$1[METHODS$1["MOVE"] = 11] = "MOVE"; - METHODS$1[METHODS$1["PROPFIND"] = 12] = "PROPFIND"; - METHODS$1[METHODS$1["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS$1[METHODS$1["SEARCH"] = 14] = "SEARCH"; - METHODS$1[METHODS$1["UNLOCK"] = 15] = "UNLOCK"; - METHODS$1[METHODS$1["BIND"] = 16] = "BIND"; - METHODS$1[METHODS$1["REBIND"] = 17] = "REBIND"; - METHODS$1[METHODS$1["UNBIND"] = 18] = "UNBIND"; - METHODS$1[METHODS$1["ACL"] = 19] = "ACL"; - METHODS$1[METHODS$1["REPORT"] = 20] = "REPORT"; - METHODS$1[METHODS$1["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS$1[METHODS$1["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS$1[METHODS$1["MERGE"] = 23] = "MERGE"; - METHODS$1[METHODS$1["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS$1[METHODS$1["NOTIFY"] = 25] = "NOTIFY"; - METHODS$1[METHODS$1["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS$1[METHODS$1["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - METHODS$1[METHODS$1["PATCH"] = 28] = "PATCH"; - METHODS$1[METHODS$1["PURGE"] = 29] = "PURGE"; - METHODS$1[METHODS$1["MKCALENDAR"] = 30] = "MKCALENDAR"; - METHODS$1[METHODS$1["LINK"] = 31] = "LINK"; - METHODS$1[METHODS$1["UNLINK"] = 32] = "UNLINK"; - METHODS$1[METHODS$1["SOURCE"] = 33] = "SOURCE"; - METHODS$1[METHODS$1["PRI"] = 34] = "PRI"; - METHODS$1[METHODS$1["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS$1[METHODS$1["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS$1[METHODS$1["SETUP"] = 37] = "SETUP"; - METHODS$1[METHODS$1["PLAY"] = 38] = "PLAY"; - METHODS$1[METHODS$1["PAUSE"] = 39] = "PAUSE"; - METHODS$1[METHODS$1["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS$1[METHODS$1["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS$1[METHODS$1["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS$1[METHODS$1["REDIRECT"] = 43] = "REDIRECT"; - METHODS$1[METHODS$1["RECORD"] = 44] = "RECORD"; - METHODS$1[METHODS$1["FLUSH"] = 45] = "FLUSH"; - })(METHODS = exports.METHODS || (exports.METHODS = {})); - exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS["M-SEARCH"], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - METHODS.SOURCE - ]; - exports.METHODS_ICE = [METHODS.SOURCE]; - exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - METHODS.GET, - METHODS.POST - ]; - exports.METHOD_MAP = utils_1$1.enumToMap(METHODS); - exports.H_METHOD_MAP = {}; - Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - }); - var FINISH; - (function(FINISH$1) { - FINISH$1[FINISH$1["SAFE"] = 0] = "SAFE"; - FINISH$1[FINISH$1["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH$1[FINISH$1["UNSAFE"] = 2] = "UNSAFE"; - })(FINISH = exports.FINISH || (exports.FINISH = {})); - exports.ALPHA = []; - for (let i$1 = "A".charCodeAt(0); i$1 <= "Z".charCodeAt(0); i$1++) { - exports.ALPHA.push(String.fromCharCode(i$1)); - exports.ALPHA.push(String.fromCharCode(i$1 + 32)); - } - exports.NUM_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9 - }; - exports.HEX_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - A: 10, - B: 11, - C: 12, - D: 13, - E: 14, - F: 15, - a: 10, - b: 11, - c: 12, - d: 13, - e: 14, - f: 15 - }; - exports.NUM = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9" - ]; - exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); - exports.MARK = [ - "-", - "_", - ".", - "!", - "~", - "*", - "'", - "(", - ")" - ]; - exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ - "%", - ";", - ":", - "&", - "=", - "+", - "$", - "," - ]); - exports.STRICT_URL_CHAR = [ - "!", - "\"", - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~" - ].concat(exports.ALPHANUM); - exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); - for (let i$1 = 128; i$1 <= 255; i$1++) exports.URL_CHAR.push(i$1); - exports.HEX = exports.NUM.concat([ - "a", - "b", - "c", - "d", - "e", - "f", - "A", - "B", - "C", - "D", - "E", - "F" - ]); - exports.STRICT_TOKEN = [ - "!", - "#", - "$", - "%", - "&", - "'", - "*", - "+", - "-", - ".", - "^", - "_", - "`", - "|", - "~" - ].concat(exports.ALPHANUM); - exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); - exports.HEADER_CHARS = [" "]; - for (let i$1 = 32; i$1 <= 255; i$1++) if (i$1 !== 127) exports.HEADER_CHARS.push(i$1); - exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); - exports.MAJOR = exports.NUM_MAP; - exports.MINOR = exports.MAJOR; - var HEADER_STATE; - (function(HEADER_STATE$1) { - HEADER_STATE$1[HEADER_STATE$1["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE$1[HEADER_STATE$1["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE$1[HEADER_STATE$1["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE$1[HEADER_STATE$1["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE$1[HEADER_STATE$1["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; - })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); - exports.SPECIAL_HEADERS = { - "connection": HEADER_STATE.CONNECTION, - "content-length": HEADER_STATE.CONTENT_LENGTH, - "proxy-connection": HEADER_STATE.CONNECTION, - "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, - "upgrade": HEADER_STATE.UPGRADE - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js -var require_RedirectHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js"(exports, module) { - const util$13 = require_util$6(); - const { kBodyUsed } = require_symbols$4(); - const assert$13 = __require("assert"); - const { InvalidArgumentError: InvalidArgumentError$17 } = require_errors(); - const EE$1 = __require("events"); - const redirectableStatusCodes = [ - 300, - 301, - 302, - 303, - 307, - 308 - ]; - const kBody$1 = Symbol("body"); - var BodyAsyncIterable = class { - constructor(body) { - this[kBody$1] = body; - this[kBodyUsed] = false; - } - async *[Symbol.asyncIterator]() { - assert$13(!this[kBodyUsed], "disturbed"); - this[kBodyUsed] = true; - yield* this[kBody$1]; - } - }; - var RedirectHandler$2 = class { - constructor(dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$17("maxRedirections must be a positive number"); - util$13.validateHandler(handler, opts.method, opts.upgrade); - this.dispatch = dispatch; - this.location = null; - this.abort = null; - this.opts = { - ...opts, - maxRedirections: 0 - }; - this.maxRedirections = maxRedirections; - this.handler = handler; - this.history = []; - if (util$13.isStream(this.opts.body)) { - if (util$13.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { - assert$13(false); - }); - if (typeof this.opts.body.readableDidRead !== "boolean") { - this.opts.body[kBodyUsed] = false; - EE$1.prototype.on.call(this.opts.body, "data", function() { - this[kBodyUsed] = true; - }); - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); - else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util$13.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); - } - onConnect(abort$1) { - this.abort = abort$1; - this.handler.onConnect(abort$1, { history: this.history }); - } - onUpgrade(statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket); - } - onError(error$1) { - this.handler.onError(error$1); - } - onHeaders(statusCode, headers, resume$1, statusText) { - this.location = this.history.length >= this.maxRedirections || util$13.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); - if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); - if (!this.location) return this.handler.onHeaders(statusCode, headers, resume$1, statusText); - const { origin, pathname, search } = util$13.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path$5 = search ? `${pathname}${search}` : pathname; - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path$5; - this.opts.origin = origin; - this.opts.maxRedirections = 0; - this.opts.query = null; - if (statusCode === 303 && this.opts.method !== "HEAD") { - this.opts.method = "GET"; - this.opts.body = null; - } - } - onData(chunk) { - if (this.location) {} else return this.handler.onData(chunk); - } - onComplete(trailers) { - if (this.location) { - this.location = null; - this.abort = null; - this.dispatch(this.opts, this); - } else this.handler.onComplete(trailers); - } - onBodySent(chunk) { - if (this.handler.onBodySent) this.handler.onBodySent(chunk); - } - }; - function parseLocation(statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (headers[i$1].toString().toLowerCase() === "location") return headers[i$1 + 1]; - } - function shouldRemoveHeader(header, removeContent, unknownOrigin) { - if (header.length === 4) return util$13.headerNameToString(header) === "host"; - if (removeContent && util$13.headerNameToString(header).startsWith("content-")) return true; - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util$13.headerNameToString(header); - return name === "authorization" || name === "cookie" || name === "proxy-authorization"; - } - return false; - } - function cleanRequestHeaders(headers, removeContent, unknownOrigin) { - const ret = []; - if (Array.isArray(headers)) { - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (!shouldRemoveHeader(headers[i$1], removeContent, unknownOrigin)) ret.push(headers[i$1], headers[i$1 + 1]); - } else if (headers && typeof headers === "object") { - for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); - } else assert$13(headers == null, "headers must be an object or an array"); - return ret; - } - module.exports = RedirectHandler$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js -var require_redirectInterceptor = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports, module) { - const RedirectHandler$1 = require_RedirectHandler(); - function createRedirectInterceptor$3({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept(opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts; - if (!maxRedirections) return dispatch(opts, handler); - const redirectHandler = new RedirectHandler$1(dispatch, maxRedirections, opts, handler); - opts = { - ...opts, - maxRedirections: 0 - }; - return dispatch(opts, redirectHandler); - }; - }; - } - module.exports = createRedirectInterceptor$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js -var require_llhttp_wasm = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { - module.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2Fzb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bGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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QEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1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EQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js -var require_llhttp_simd_wasm = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) { - module.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWx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JGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEy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0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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IgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBA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yAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUAN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C9BRFRQLw=="; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/client.js -var require_client = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/client.js"(exports, module) { - const assert$12 = __require("assert"); - const net = __require("net"); - const http$1 = __require("http"); - const { pipeline: pipeline$2 } = __require("stream"); - const util$12 = require_util$6(); - const timers = require_timers(); - const Request$3 = require_request$1(); - const DispatcherBase$3 = require_dispatcher_base(); - const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, InvalidArgumentError: InvalidArgumentError$16, RequestAbortedError: RequestAbortedError$8, HeadersTimeoutError, HeadersOverflowError, SocketError: SocketError$2, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError, ClientDestroyedError } = require_errors(); - const buildConnector$3 = require_connect(); - const { kUrl: kUrl$3, kReset, kServerName, kClient: kClient$1, kBusy: kBusy$1, kParser, kConnect, kBlocking, kResuming, kRunning: kRunning$3, kPending: kPending$2, kSize: kSize$4, kWriting, kQueue: kQueue$1, kConnected: kConnected$5, kConnecting, kNeedDrain: kNeedDrain$3, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError: kError$2, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections: kMaxRedirections$1, kMaxRequests, kCounter, kClose: kClose$5, kDestroy: kDestroy$3, kDispatch: kDispatch$2, kInterceptors: kInterceptors$4, kLocalAddress, kMaxResponseSize, kHTTPConnVersion, kHost, kHTTP2Session, kHTTP2SessionState, kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols$4(); - /** @type {import('http2')} */ - let http2; - try { - http2 = __require("http2"); - } catch { - http2 = { constants: {} }; - } - const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; - let h2ExperimentalWarned = false; - const FastBuffer = Buffer[Symbol.species]; - const kClosedResolve$1 = Symbol("kClosedResolve"); - const channels$2 = {}; - try { - const diagnosticsChannel$2 = __require("diagnostics_channel"); - channels$2.sendHeaders = diagnosticsChannel$2.channel("undici:client:sendHeaders"); - channels$2.beforeConnect = diagnosticsChannel$2.channel("undici:client:beforeConnect"); - channels$2.connectError = diagnosticsChannel$2.channel("undici:client:connectError"); - channels$2.connected = diagnosticsChannel$2.channel("undici:client:connected"); - } catch { - channels$2.sendHeaders = { hasSubscribers: false }; - channels$2.beforeConnect = { hasSubscribers: false }; - channels$2.connectError = { hasSubscribers: false }; - channels$2.connected = { hasSubscribers: false }; - } - /** - * @type {import('../types/client').default} - */ - var Client$4 = class extends DispatcherBase$3 { - /** - * - * @param {string|URL} url - * @param {import('../types/client').Client.Options} options - */ - constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls: tls$2, strictContentLength, maxCachedSessions, maxRedirections, connect: connect$2, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, maxConcurrentStreams } = {}) { - super(); - if (keepAlive !== void 0) throw new InvalidArgumentError$16("unsupported keepAlive, use pipelining=0 instead"); - if (socketTimeout !== void 0) throw new InvalidArgumentError$16("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - if (requestTimeout !== void 0) throw new InvalidArgumentError$16("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - if (idleTimeout !== void 0) throw new InvalidArgumentError$16("unsupported idleTimeout, use keepAliveTimeout instead"); - if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError$16("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError$16("invalid maxHeaderSize"); - if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError$16("invalid socketPath"); - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError$16("invalid connectTimeout"); - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError$16("invalid keepAliveTimeout"); - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError$16("invalid keepAliveMaxTimeout"); - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError$16("invalid keepAliveTimeoutThreshold"); - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$16("headersTimeout must be a positive integer or zero"); - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$16("bodyTimeout must be a positive integer or zero"); - if (connect$2 != null && typeof connect$2 !== "function" && typeof connect$2 !== "object") throw new InvalidArgumentError$16("connect must be a function or an object"); - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$16("maxRedirections must be a positive number"); - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError$16("maxRequestsPerClient must be a positive number"); - if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError$16("localAddress must be valid string IP address"); - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError$16("maxResponseSize must be a positive number"); - if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError$16("autoSelectFamilyAttemptTimeout must be a positive number"); - if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError$16("allowH2 must be a valid boolean value"); - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError$16("maxConcurrentStreams must be a possitive integer, greater than 0"); - if (typeof connect$2 !== "function") connect$2 = buildConnector$3({ - ...tls$2, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...util$12.nodeHasAutoSelectFamily && autoSelectFamily ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : void 0, - ...connect$2 - }); - this[kInterceptors$4] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor$2({ maxRedirections })]; - this[kUrl$3] = util$12.parseOrigin(url); - this[kConnector] = connect$2; - this[kSocket] = null; - this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize || http$1.maxHeaderSize; - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; - this[kServerName] = null; - this[kLocalAddress] = localAddress != null ? localAddress : null; - this[kResuming] = 0; - this[kNeedDrain$3] = 0; - this[kHostHeader] = `host: ${this[kUrl$3].hostname}${this[kUrl$3].port ? `:${this[kUrl$3].port}` : ""}\r\n`; - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; - this[kMaxRedirections$1] = maxRedirections; - this[kMaxRequests] = maxRequestsPerClient; - this[kClosedResolve$1] = null; - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; - this[kHTTPConnVersion] = "h1"; - this[kHTTP2Session] = null; - this[kHTTP2SessionState] = !allowH2 ? null : { - openStreams: 0, - maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 - }; - this[kHost] = `${this[kUrl$3].hostname}${this[kUrl$3].port ? `:${this[kUrl$3].port}` : ""}`; - this[kQueue$1] = []; - this[kRunningIdx] = 0; - this[kPendingIdx] = 0; - } - get pipelining() { - return this[kPipelining]; - } - set pipelining(value) { - this[kPipelining] = value; - resume(this, true); - } - get [kPending$2]() { - return this[kQueue$1].length - this[kPendingIdx]; - } - get [kRunning$3]() { - return this[kPendingIdx] - this[kRunningIdx]; - } - get [kSize$4]() { - return this[kQueue$1].length - this[kRunningIdx]; - } - get [kConnected$5]() { - return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed; - } - get [kBusy$1]() { - const socket = this[kSocket]; - return socket && (socket[kReset] || socket[kWriting] || socket[kBlocking]) || this[kSize$4] >= (this[kPipelining] || 1) || this[kPending$2] > 0; - } - /* istanbul ignore: only used for test */ - [kConnect](cb) { - connect$1(this); - this.once("connect", cb); - } - [kDispatch$2](opts, handler) { - const origin = opts.origin || this[kUrl$3].origin; - const request$1 = this[kHTTPConnVersion] === "h2" ? Request$3[kHTTP2BuildRequest](origin, opts, handler) : Request$3[kHTTP1BuildRequest](origin, opts, handler); - this[kQueue$1].push(request$1); - if (this[kResuming]) {} else if (util$12.bodyLength(request$1.body) == null && util$12.isIterable(request$1.body)) { - this[kResuming] = 1; - process.nextTick(resume, this); - } else resume(this, true); - if (this[kResuming] && this[kNeedDrain$3] !== 2 && this[kBusy$1]) this[kNeedDrain$3] = 2; - return this[kNeedDrain$3] < 2; - } - async [kClose$5]() { - return new Promise((resolve) => { - if (!this[kSize$4]) resolve(null); - else this[kClosedResolve$1] = resolve; - }); - } - async [kDestroy$3](err) { - return new Promise((resolve) => { - const requests = this[kQueue$1].splice(this[kPendingIdx]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$1 = requests[i$1]; - errorRequest(this, request$1, err); - } - const callback = () => { - if (this[kClosedResolve$1]) { - this[kClosedResolve$1](); - this[kClosedResolve$1] = null; - } - resolve(); - }; - if (this[kHTTP2Session] != null) { - util$12.destroy(this[kHTTP2Session], err); - this[kHTTP2Session] = null; - this[kHTTP2SessionState] = null; - } - if (!this[kSocket]) queueMicrotask(callback); - else util$12.destroy(this[kSocket].on("close", callback), err); - resume(this); - }); - } - }; - function onHttp2SessionError(err) { - assert$12(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kSocket][kError$2] = err; - onError(this[kClient$1], err); - } - function onHttp2FrameError(type, code, id) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - if (id === 0) { - this[kSocket][kError$2] = err; - onError(this[kClient$1], err); - } - } - function onHttp2SessionEnd() { - util$12.destroy(this, new SocketError$2("other side closed")); - util$12.destroy(this[kSocket], new SocketError$2("other side closed")); - } - function onHTTP2GoAway(code) { - const client = this[kClient$1]; - const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`); - client[kSocket] = null; - client[kHTTP2Session] = null; - if (client.destroyed) { - assert$12(this[kPending$2] === 0); - const requests = client[kQueue$1].splice(client[kRunningIdx]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$1 = requests[i$1]; - errorRequest(this, request$1, err); - } - } else if (client[kRunning$3] > 0) { - const request$1 = client[kQueue$1][client[kRunningIdx]]; - client[kQueue$1][client[kRunningIdx]++] = null; - errorRequest(client, request$1, err); - } - client[kPendingIdx] = client[kRunningIdx]; - assert$12(client[kRunning$3] === 0); - client.emit("disconnect", client[kUrl$3], [client], err); - resume(client); - } - const constants = require_constants$2(); - const createRedirectInterceptor$2 = require_redirectInterceptor(); - const EMPTY_BUF = Buffer.alloc(0); - async function lazyllhttp() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; - let mod; - try { - mod = await WebAssembly.compile(Buffer.from(require_llhttp_simd_wasm(), "base64")); - } catch (e) { - /* istanbul ignore next */ - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require_llhttp_wasm(), "base64")); - } - return await WebAssembly.instantiate(mod, { env: { - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0; - }, - wasm_on_status: (p, at, len) => { - assert$12.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_begin: (p) => { - assert$12.strictEqual(currentParser.ptr, p); - return currentParser.onMessageBegin() || 0; - }, - wasm_on_header_field: (p, at, len) => { - assert$12.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_header_value: (p, at, len) => { - assert$12.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_headers_complete: (p, statusCode, upgrade$1, shouldKeepAlive) => { - assert$12.strictEqual(currentParser.ptr, p); - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade$1), Boolean(shouldKeepAlive)) || 0; - }, - wasm_on_body: (p, at, len) => { - assert$12.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_complete: (p) => { - assert$12.strictEqual(currentParser.ptr, p); - return currentParser.onMessageComplete() || 0; - } - } }); - } - let llhttpInstance = null; - let llhttpPromise = lazyllhttp(); - llhttpPromise.catch(); - let currentParser = null; - let currentBufferRef = null; - let currentBufferSize = 0; - let currentBufferPtr = null; - const TIMEOUT_HEADERS = 1; - const TIMEOUT_BODY = 2; - const TIMEOUT_IDLE = 3; - var Parser = class { - constructor(client, socket, { exports: exports$1 }) { - assert$12(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); - this.llhttp = exports$1; - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); - this.client = client; - this.socket = socket; - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.statusCode = null; - this.statusText = ""; - this.upgrade = false; - this.headers = []; - this.headersSize = 0; - this.headersMaxSize = client[kMaxHeadersSize]; - this.shouldKeepAlive = false; - this.paused = false; - this.resume = this.resume.bind(this); - this.bytesRead = 0; - this.keepAlive = ""; - this.contentLength = ""; - this.connection = ""; - this.maxResponseSize = client[kMaxResponseSize]; - } - setTimeout(value, type) { - this.timeoutType = type; - if (value !== this.timeoutValue) { - timers.clearTimeout(this.timeout); - if (value) { - this.timeout = timers.setTimeout(onParserTimeout, value, this); - // istanbul ignore else: only for jest - if (this.timeout.unref) this.timeout.unref(); - } else this.timeout = null; - this.timeoutValue = value; - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - } - resume() { - if (this.socket.destroyed || !this.paused) return; - assert$12(this.ptr != null); - assert$12(currentParser == null); - this.llhttp.llhttp_resume(this.ptr); - assert$12(this.timeoutType === TIMEOUT_BODY); - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - this.paused = false; - this.execute(this.socket.read() || EMPTY_BUF); - this.readMore(); - } - readMore() { - while (!this.paused && this.ptr) { - const chunk = this.socket.read(); - if (chunk === null) break; - this.execute(chunk); - } - } - execute(data) { - assert$12(this.ptr != null); - assert$12(currentParser == null); - assert$12(!this.paused); - const { socket, llhttp } = this; - if (data.length > currentBufferSize) { - if (currentBufferPtr) llhttp.free(currentBufferPtr); - currentBufferSize = Math.ceil(data.length / 4096) * 4096; - currentBufferPtr = llhttp.malloc(currentBufferSize); - } - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); - try { - let ret; - try { - currentBufferRef = data; - currentParser = this; - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err; - } finally { - currentParser = null; - currentBufferRef = null; - } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); - else if (ret === constants.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data.slice(offset)); - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); - } - } catch (err) { - util$12.destroy(socket, err); - } - } - destroy() { - assert$12(this.ptr != null); - assert$12(currentParser == null); - this.llhttp.llhttp_free(this.ptr); - this.ptr = null; - timers.clearTimeout(this.timeout); - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.paused = false; - } - onStatus(buf) { - this.statusText = buf.toString(); - } - onMessageBegin() { - const { socket, client } = this; - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) return -1; - const request$1 = client[kQueue$1][client[kRunningIdx]]; - if (!request$1) return -1; - } - onHeaderField(buf) { - const len = this.headers.length; - if ((len & 1) === 0) this.headers.push(buf); - else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - this.trackHeader(buf.length); - } - onHeaderValue(buf) { - let len = this.headers.length; - if ((len & 1) === 1) { - this.headers.push(buf); - len += 1; - } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - const key = this.headers[len - 2]; - if (key.length === 10 && key.toString().toLowerCase() === "keep-alive") this.keepAlive += buf.toString(); - else if (key.length === 10 && key.toString().toLowerCase() === "connection") this.connection += buf.toString(); - else if (key.length === 14 && key.toString().toLowerCase() === "content-length") this.contentLength += buf.toString(); - this.trackHeader(buf.length); - } - trackHeader(len) { - this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) util$12.destroy(this.socket, new HeadersOverflowError()); - } - onUpgrade(head) { - const { upgrade: upgrade$1, client, socket, headers, statusCode } = this; - assert$12(upgrade$1); - const request$1 = client[kQueue$1][client[kRunningIdx]]; - assert$12(request$1); - assert$12(!socket.destroyed); - assert$12(socket === client[kSocket]); - assert$12(!this.paused); - assert$12(request$1.upgrade || request$1.method === "CONNECT"); - this.statusCode = null; - this.statusText = ""; - this.shouldKeepAlive = null; - assert$12(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - socket.unshift(head); - socket[kParser].destroy(); - socket[kParser] = null; - socket[kClient$1] = null; - socket[kError$2] = null; - socket.removeListener("error", onSocketError$1).removeListener("readable", onSocketReadable).removeListener("end", onSocketEnd).removeListener("close", onSocketClose$1); - client[kSocket] = null; - client[kQueue$1][client[kRunningIdx]++] = null; - client.emit("disconnect", client[kUrl$3], [client], new InformationalError("upgrade")); - try { - request$1.onUpgrade(statusCode, headers, socket); - } catch (err) { - util$12.destroy(socket, err); - } - resume(client); - } - onHeadersComplete(statusCode, upgrade$1, shouldKeepAlive) { - const { client, socket, headers, statusText } = this; - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) return -1; - const request$1 = client[kQueue$1][client[kRunningIdx]]; - /* istanbul ignore next: difficult to make a test case for */ - if (!request$1) return -1; - assert$12(!this.upgrade); - assert$12(this.statusCode < 200); - if (statusCode === 100) { - util$12.destroy(socket, new SocketError$2("bad response", util$12.getSocketInfo(socket))); - return -1; - } - if (upgrade$1 && !request$1.upgrade) { - util$12.destroy(socket, new SocketError$2("bad upgrade", util$12.getSocketInfo(socket))); - return -1; - } - assert$12.strictEqual(this.timeoutType, TIMEOUT_HEADERS); - this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive || request$1.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; - if (this.statusCode >= 200) { - const bodyTimeout = request$1.bodyTimeout != null ? request$1.bodyTimeout : client[kBodyTimeout]; - this.setTimeout(bodyTimeout, TIMEOUT_BODY); - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - if (request$1.method === "CONNECT") { - assert$12(client[kRunning$3] === 1); - this.upgrade = true; - return 2; - } - if (upgrade$1) { - assert$12(client[kRunning$3] === 1); - this.upgrade = true; - return 2; - } - assert$12(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util$12.parseKeepAliveTimeout(this.keepAlive) : null; - if (keepAliveTimeout != null) { - const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); - if (timeout <= 0) socket[kReset] = true; - else client[kKeepAliveTimeoutValue] = timeout; - } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; - } else socket[kReset] = true; - const pause = request$1.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request$1.aborted) return -1; - if (request$1.method === "HEAD") return 1; - if (statusCode < 200) return 1; - if (socket[kBlocking]) { - socket[kBlocking] = false; - resume(client); - } - return pause ? constants.ERROR.PAUSED : 0; - } - onBody(buf) { - const { client, socket, statusCode, maxResponseSize } = this; - if (socket.destroyed) return -1; - const request$1 = client[kQueue$1][client[kRunningIdx]]; - assert$12(request$1); - assert$12.strictEqual(this.timeoutType, TIMEOUT_BODY); - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - assert$12(statusCode >= 200); - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util$12.destroy(socket, new ResponseExceededMaxSizeError()); - return -1; - } - this.bytesRead += buf.length; - if (request$1.onData(buf) === false) return constants.ERROR.PAUSED; - } - onMessageComplete() { - const { client, socket, statusCode, upgrade: upgrade$1, headers, contentLength, bytesRead, shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; - if (upgrade$1) return; - const request$1 = client[kQueue$1][client[kRunningIdx]]; - assert$12(request$1); - assert$12(statusCode >= 100); - this.statusCode = null; - this.statusText = ""; - this.bytesRead = 0; - this.contentLength = ""; - this.keepAlive = ""; - this.connection = ""; - assert$12(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (statusCode < 200) return; - /* istanbul ignore next: should be handled by llhttp? */ - if (request$1.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util$12.destroy(socket, new ResponseContentLengthMismatchError()); - return -1; - } - request$1.onComplete(headers); - client[kQueue$1][client[kRunningIdx]++] = null; - if (socket[kWriting]) { - assert$12.strictEqual(client[kRunning$3], 0); - util$12.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (!shouldKeepAlive) { - util$12.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (socket[kReset] && client[kRunning$3] === 0) { - util$12.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (client[kPipelining] === 1) setImmediate(resume, client); - else resume(client); - } - }; - function onParserTimeout(parser) { - const { socket, timeoutType, client } = parser; - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning$3] > 1) { - assert$12(!parser.paused, "cannot be paused while waiting for headers"); - util$12.destroy(socket, new HeadersTimeoutError()); - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!parser.paused) util$12.destroy(socket, new BodyTimeoutError()); - } else if (timeoutType === TIMEOUT_IDLE) { - assert$12(client[kRunning$3] === 0 && client[kKeepAliveTimeoutValue]); - util$12.destroy(socket, new InformationalError("socket idle timeout")); - } - } - function onSocketReadable() { - const { [kParser]: parser } = this; - if (parser) parser.readMore(); - } - function onSocketError$1(err) { - const { [kClient$1]: client, [kParser]: parser } = this; - assert$12(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - if (client[kHTTPConnVersion] !== "h2") { - if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - } - this[kError$2] = err; - onError(this[kClient$1], err); - } - function onError(client, err) { - if (client[kRunning$3] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert$12(client[kPendingIdx] === client[kRunningIdx]); - const requests = client[kQueue$1].splice(client[kRunningIdx]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$1 = requests[i$1]; - errorRequest(client, request$1, err); - } - assert$12(client[kSize$4] === 0); - } - } - function onSocketEnd() { - const { [kParser]: parser, [kClient$1]: client } = this; - if (client[kHTTPConnVersion] !== "h2") { - if (parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - } - util$12.destroy(this, new SocketError$2("other side closed", util$12.getSocketInfo(this))); - } - function onSocketClose$1() { - const { [kClient$1]: client, [kParser]: parser } = this; - if (client[kHTTPConnVersion] === "h1" && parser) { - if (!this[kError$2] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); - this[kParser].destroy(); - this[kParser] = null; - } - const err = this[kError$2] || new SocketError$2("closed", util$12.getSocketInfo(this)); - client[kSocket] = null; - if (client.destroyed) { - assert$12(client[kPending$2] === 0); - const requests = client[kQueue$1].splice(client[kRunningIdx]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$1 = requests[i$1]; - errorRequest(client, request$1, err); - } - } else if (client[kRunning$3] > 0 && err.code !== "UND_ERR_INFO") { - const request$1 = client[kQueue$1][client[kRunningIdx]]; - client[kQueue$1][client[kRunningIdx]++] = null; - errorRequest(client, request$1, err); - } - client[kPendingIdx] = client[kRunningIdx]; - assert$12(client[kRunning$3] === 0); - client.emit("disconnect", client[kUrl$3], [client], err); - resume(client); - } - async function connect$1(client) { - assert$12(!client[kConnecting]); - assert$12(!client[kSocket]); - let { host, hostname, protocol, port } = client[kUrl$3]; - if (hostname[0] === "[") { - const idx = hostname.indexOf("]"); - assert$12(idx !== -1); - const ip = hostname.substring(1, idx); - assert$12(net.isIP(ip)); - hostname = ip; - } - client[kConnecting] = true; - if (channels$2.beforeConnect.hasSubscribers) channels$2.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }); - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket$1) => { - if (err) reject(err); - else resolve(socket$1); - }); - }); - if (client.destroyed) { - util$12.destroy(socket.on("error", () => {}), new ClientDestroyedError()); - return; - } - client[kConnecting] = false; - assert$12(socket); - const isH2 = socket.alpnProtocol === "h2"; - if (isH2) { - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true; - process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); - } - const session = http2.connect(client[kUrl$3], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams - }); - client[kHTTPConnVersion] = "h2"; - session[kClient$1] = client; - session[kSocket] = socket; - session.on("error", onHttp2SessionError); - session.on("frameError", onHttp2FrameError); - session.on("end", onHttp2SessionEnd); - session.on("goaway", onHTTP2GoAway); - session.on("close", onSocketClose$1); - session.unref(); - client[kHTTP2Session] = session; - socket[kHTTP2Session] = session; - } else { - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise; - llhttpPromise = null; - } - socket[kNoRef] = false; - socket[kWriting] = false; - socket[kReset] = false; - socket[kBlocking] = false; - socket[kParser] = new Parser(client, socket, llhttpInstance); - } - socket[kCounter] = 0; - socket[kMaxRequests] = client[kMaxRequests]; - socket[kClient$1] = client; - socket[kError$2] = null; - socket.on("error", onSocketError$1).on("readable", onSocketReadable).on("end", onSocketEnd).on("close", onSocketClose$1); - client[kSocket] = socket; - if (channels$2.connected.hasSubscribers) channels$2.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }); - client.emit("connect", client[kUrl$3], [client]); - } catch (err) { - if (client.destroyed) return; - client[kConnecting] = false; - if (channels$2.connectError.hasSubscribers) channels$2.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }); - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert$12(client[kRunning$3] === 0); - while (client[kPending$2] > 0 && client[kQueue$1][client[kPendingIdx]].servername === client[kServerName]) { - const request$1 = client[kQueue$1][client[kPendingIdx]++]; - errorRequest(client, request$1, err); - } - } else onError(client, err); - client.emit("connectionError", client[kUrl$3], [client], err); - } - resume(client); - } - function emitDrain(client) { - client[kNeedDrain$3] = 0; - client.emit("drain", client[kUrl$3], [client]); - } - function resume(client, sync) { - if (client[kResuming] === 2) return; - client[kResuming] = 2; - _resume(client, sync); - client[kResuming] = 0; - if (client[kRunningIdx] > 256) { - client[kQueue$1].splice(0, client[kRunningIdx]); - client[kPendingIdx] -= client[kRunningIdx]; - client[kRunningIdx] = 0; - } - } - function _resume(client, sync) { - while (true) { - if (client.destroyed) { - assert$12(client[kPending$2] === 0); - return; - } - if (client[kClosedResolve$1] && !client[kSize$4]) { - client[kClosedResolve$1](); - client[kClosedResolve$1] = null; - return; - } - const socket = client[kSocket]; - if (socket && !socket.destroyed && socket.alpnProtocol !== "h2") { - if (client[kSize$4] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref(); - socket[kNoRef] = true; - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref(); - socket[kNoRef] = false; - } - if (client[kSize$4] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_IDLE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE); - } else if (client[kRunning$3] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request$2 = client[kQueue$1][client[kRunningIdx]]; - const headersTimeout = request$2.headersTimeout != null ? request$2.headersTimeout : client[kHeadersTimeout]; - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); - } - } - } - if (client[kBusy$1]) client[kNeedDrain$3] = 2; - else if (client[kNeedDrain$3] === 2) { - if (sync) { - client[kNeedDrain$3] = 1; - process.nextTick(emitDrain, client); - } else emitDrain(client); - continue; - } - if (client[kPending$2] === 0) return; - if (client[kRunning$3] >= (client[kPipelining] || 1)) return; - const request$1 = client[kQueue$1][client[kPendingIdx]]; - if (client[kUrl$3].protocol === "https:" && client[kServerName] !== request$1.servername) { - if (client[kRunning$3] > 0) return; - client[kServerName] = request$1.servername; - if (socket && socket.servername !== request$1.servername) { - util$12.destroy(socket, new InformationalError("servername changed")); - return; - } - } - if (client[kConnecting]) return; - if (!socket && !client[kHTTP2Session]) { - connect$1(client); - return; - } - if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) return; - if (client[kRunning$3] > 0 && !request$1.idempotent) return; - if (client[kRunning$3] > 0 && (request$1.upgrade || request$1.method === "CONNECT")) return; - if (client[kRunning$3] > 0 && util$12.bodyLength(request$1.body) !== 0 && (util$12.isStream(request$1.body) || util$12.isAsyncIterable(request$1.body))) return; - if (!request$1.aborted && write(client, request$1)) client[kPendingIdx]++; - else client[kQueue$1].splice(client[kPendingIdx], 1); - } - } - function shouldSendContentLength(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - function write(client, request$1) { - if (client[kHTTPConnVersion] === "h2") { - writeH2(client, client[kHTTP2Session], request$1); - return; - } - const { body, method, path: path$5, host, upgrade: upgrade$1, headers, blocking, reset } = request$1; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") body.read(0); - const bodyLength$1 = util$12.bodyLength(body); - let contentLength = bodyLength$1; - if (contentLength === null) contentLength = request$1.contentLength; - if (contentLength === 0 && !expectsPayload) contentLength = null; - if (shouldSendContentLength(method) && contentLength > 0 && request$1.contentLength !== null && request$1.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request$1, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - const socket = client[kSocket]; - try { - request$1.onConnect((err) => { - if (request$1.aborted || request$1.completed) return; - errorRequest(client, request$1, err || new RequestAbortedError$8()); - util$12.destroy(socket, new InformationalError("aborted")); - }); - } catch (err) { - errorRequest(client, request$1, err); - } - if (request$1.aborted) return false; - if (method === "HEAD") socket[kReset] = true; - if (upgrade$1 || method === "CONNECT") socket[kReset] = true; - if (reset != null) socket[kReset] = reset; - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; - if (blocking) socket[kBlocking] = true; - let header = `${method} ${path$5} HTTP/1.1\r\n`; - if (typeof host === "string") header += `host: ${host}\r\n`; - else header += client[kHostHeader]; - if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`; - else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; - else header += "connection: close\r\n"; - if (headers) header += headers; - if (channels$2.sendHeaders.hasSubscribers) channels$2.sendHeaders.publish({ - request: request$1, - headers: header, - socket - }); - /* istanbul ignore else: assertion */ - if (!body || bodyLength$1 === 0) { - if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else { - assert$12(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r\n`, "latin1"); - } - request$1.onRequestSent(); - } else if (util$12.isBuffer(body)) { - assert$12(contentLength === body.byteLength, "buffer body must have content length"); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(body); - socket.uncork(); - request$1.onBodySent(body); - request$1.onRequestSent(); - if (!expectsPayload) socket[kReset] = true; - } else if (util$12.isBlobLike(body)) if (typeof body.stream === "function") writeIterable({ - body: body.stream(), - client, - request: request$1, - socket, - contentLength, - header, - expectsPayload - }); - else writeBlob({ - body, - client, - request: request$1, - socket, - contentLength, - header, - expectsPayload - }); - else if (util$12.isStream(body)) writeStream({ - body, - client, - request: request$1, - socket, - contentLength, - header, - expectsPayload - }); - else if (util$12.isIterable(body)) writeIterable({ - body, - client, - request: request$1, - socket, - contentLength, - header, - expectsPayload - }); - else assert$12(false); - return true; - } - function writeH2(client, session, request$1) { - const { body, method, path: path$5, host, upgrade: upgrade$1, expectContinue, signal, headers: reqHeaders } = request$1; - let headers; - if (typeof reqHeaders === "string") headers = Request$3[kHTTP2CopyHeaders](reqHeaders.trim()); - else headers = reqHeaders; - if (upgrade$1) { - errorRequest(client, request$1, new Error("Upgrade not supported for H2")); - return false; - } - try { - request$1.onConnect((err) => { - if (request$1.aborted || request$1.completed) return; - errorRequest(client, request$1, err || new RequestAbortedError$8()); - }); - } catch (err) { - errorRequest(client, request$1, err); - } - if (request$1.aborted) return false; - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream$2; - const h2State = client[kHTTP2SessionState]; - headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]; - headers[HTTP2_HEADER_METHOD] = method; - if (method === "CONNECT") { - session.ref(); - stream$2 = session.request(headers, { - endStream: false, - signal - }); - if (stream$2.id && !stream$2.pending) { - request$1.onUpgrade(null, null, stream$2); - ++h2State.openStreams; - } else stream$2.once("ready", () => { - request$1.onUpgrade(null, null, stream$2); - ++h2State.openStreams; - }); - stream$2.once("close", () => { - h2State.openStreams -= 1; - if (h2State.openStreams === 0) session.unref(); - }); - return true; - } - headers[HTTP2_HEADER_PATH] = path$5; - headers[HTTP2_HEADER_SCHEME] = "https"; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") body.read(0); - let contentLength = util$12.bodyLength(body); - if (contentLength == null) contentLength = request$1.contentLength; - if (contentLength === 0 || !expectsPayload) contentLength = null; - if (shouldSendContentLength(method) && contentLength > 0 && request$1.contentLength != null && request$1.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request$1, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - if (contentLength != null) { - assert$12(body, "no body must not have content length"); - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; - } - session.ref(); - const shouldEndStream = method === "GET" || method === "HEAD"; - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = "100-continue"; - stream$2 = session.request(headers, { - endStream: shouldEndStream, - signal - }); - stream$2.once("continue", writeBodyH2); - } else { - stream$2 = session.request(headers, { - endStream: shouldEndStream, - signal - }); - writeBodyH2(); - } - ++h2State.openStreams; - stream$2.once("response", (headers$1) => { - const { [HTTP2_HEADER_STATUS]: statusCode,...realHeaders } = headers$1; - if (request$1.onHeaders(Number(statusCode), realHeaders, stream$2.resume.bind(stream$2), "") === false) stream$2.pause(); - }); - stream$2.once("end", () => { - request$1.onComplete([]); - }); - stream$2.on("data", (chunk) => { - if (request$1.onData(chunk) === false) stream$2.pause(); - }); - stream$2.once("close", () => { - h2State.openStreams -= 1; - if (h2State.openStreams === 0) session.unref(); - }); - stream$2.once("error", function(err) { - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1; - util$12.destroy(stream$2, err); - } - }); - stream$2.once("frameError", (type, code) => { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - errorRequest(client, request$1, err); - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1; - util$12.destroy(stream$2, err); - } - }); - return true; - function writeBodyH2() { - /* istanbul ignore else: assertion */ - if (!body) request$1.onRequestSent(); - else if (util$12.isBuffer(body)) { - assert$12(contentLength === body.byteLength, "buffer body must have content length"); - stream$2.cork(); - stream$2.write(body); - stream$2.uncork(); - stream$2.end(); - request$1.onBodySent(body); - request$1.onRequestSent(); - } else if (util$12.isBlobLike(body)) if (typeof body.stream === "function") writeIterable({ - client, - request: request$1, - contentLength, - h2stream: stream$2, - expectsPayload, - body: body.stream(), - socket: client[kSocket], - header: "" - }); - else writeBlob({ - body, - client, - request: request$1, - contentLength, - expectsPayload, - h2stream: stream$2, - header: "", - socket: client[kSocket] - }); - else if (util$12.isStream(body)) writeStream({ - body, - client, - request: request$1, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream$2, - header: "" - }); - else if (util$12.isIterable(body)) writeIterable({ - body, - client, - request: request$1, - contentLength, - expectsPayload, - header: "", - h2stream: stream$2, - socket: client[kSocket] - }); - else assert$12(false); - } - } - function writeStream({ h2stream, body, client, request: request$1, socket, contentLength, header, expectsPayload }) { - assert$12(contentLength !== 0 || client[kRunning$3] === 0, "stream body cannot be pipelined"); - if (client[kHTTPConnVersion] === "h2") { - const pipe = pipeline$2(body, h2stream, (err) => { - if (err) { - util$12.destroy(body, err); - util$12.destroy(h2stream, err); - } else request$1.onRequestSent(); - }); - pipe.on("data", onPipeData); - pipe.once("end", () => { - pipe.removeListener("data", onPipeData); - util$12.destroy(pipe); - }); - function onPipeData(chunk) { - request$1.onBodySent(chunk); - } - return; - } - let finished$1 = false; - const writer = new AsyncWriter({ - socket, - request: request$1, - contentLength, - client, - expectsPayload, - header - }); - const onData = function(chunk) { - if (finished$1) return; - try { - if (!writer.write(chunk) && this.pause) this.pause(); - } catch (err) { - util$12.destroy(this, err); - } - }; - const onDrain = function() { - if (finished$1) return; - if (body.resume) body.resume(); - }; - const onAbort = function() { - if (finished$1) return; - const err = new RequestAbortedError$8(); - queueMicrotask(() => onFinished(err)); - }; - const onFinished = function(err) { - if (finished$1) return; - finished$1 = true; - assert$12(socket.destroyed || socket[kWriting] && client[kRunning$3] <= 1); - socket.off("drain", onDrain).off("error", onFinished); - body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); - if (!err) try { - writer.end(); - } catch (er) { - err = er; - } - writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util$12.destroy(body, err); - else util$12.destroy(body); - }; - body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); - if (body.resume) body.resume(); - socket.on("drain", onDrain).on("error", onFinished); - } - async function writeBlob({ h2stream, body, client, request: request$1, socket, contentLength, header, expectsPayload }) { - assert$12(contentLength === body.size, "blob body must have content length"); - const isH2 = client[kHTTPConnVersion] === "h2"; - try { - if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); - const buffer = Buffer.from(await body.arrayBuffer()); - if (isH2) { - h2stream.cork(); - h2stream.write(buffer); - h2stream.uncork(); - } else { - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(buffer); - socket.uncork(); - } - request$1.onBodySent(buffer); - request$1.onRequestSent(); - if (!expectsPayload) socket[kReset] = true; - resume(client); - } catch (err) { - util$12.destroy(isH2 ? h2stream : socket, err); - } - } - async function writeIterable({ h2stream, body, client, request: request$1, socket, contentLength, header, expectsPayload }) { - assert$12(contentLength !== 0 || client[kRunning$3] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - const waitForDrain = () => new Promise((resolve, reject) => { - assert$12(callback === null); - if (socket[kError$2]) reject(socket[kError$2]); - else callback = resolve; - }); - if (client[kHTTPConnVersion] === "h2") { - h2stream.on("close", onDrain).on("drain", onDrain); - try { - for await (const chunk of body) { - if (socket[kError$2]) throw socket[kError$2]; - const res = h2stream.write(chunk); - request$1.onBodySent(chunk); - if (!res) await waitForDrain(); - } - } catch (err) { - h2stream.destroy(err); - } finally { - request$1.onRequestSent(); - h2stream.end(); - h2stream.off("close", onDrain).off("drain", onDrain); - } - return; - } - socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter({ - socket, - request: request$1, - contentLength, - client, - expectsPayload, - header - }); - try { - for await (const chunk of body) { - if (socket[kError$2]) throw socket[kError$2]; - if (!writer.write(chunk)) await waitForDrain(); - } - writer.end(); - } catch (err) { - writer.destroy(err); - } finally { - socket.off("close", onDrain).off("drain", onDrain); - } - } - var AsyncWriter = class { - constructor({ socket, request: request$1, contentLength, client, expectsPayload, header }) { - this.socket = socket; - this.request = request$1; - this.contentLength = contentLength; - this.client = client; - this.bytesWritten = 0; - this.expectsPayload = expectsPayload; - this.header = header; - socket[kWriting] = true; - } - write(chunk) { - const { socket, request: request$1, contentLength, client, bytesWritten, expectsPayload, header } = this; - if (socket[kError$2]) throw socket[kError$2]; - if (socket.destroyed) return false; - const len = Buffer.byteLength(chunk); - if (!len) return true; - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); - process.emitWarning(new RequestContentLengthMismatchError()); - } - socket.cork(); - if (bytesWritten === 0) { - if (!expectsPayload) socket[kReset] = true; - if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); - else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - } - if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); - this.bytesWritten += len; - const ret = socket.write(chunk); - socket.uncork(); - request$1.onBodySent(chunk); - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); - } - } - return ret; - } - end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request$1 } = this; - request$1.onRequestSent(); - socket[kWriting] = false; - if (socket[kError$2]) throw socket[kError$2]; - if (socket.destroyed) return; - if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else socket.write(`${header}\r\n`, "latin1"); - else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); - if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); - else process.emitWarning(new RequestContentLengthMismatchError()); - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); - } - resume(client); - } - destroy(err) { - const { socket, client } = this; - socket[kWriting] = false; - if (err) { - assert$12(client[kRunning$3] <= 1, "pipeline should only contain this request"); - util$12.destroy(socket, err); - } - } - }; - function errorRequest(client, request$1, err) { - try { - request$1.onError(err); - assert$12(request$1.aborted); - } catch (err$1) { - client.emit("error", err$1); - } - } - module.exports = Client$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js -var require_fixed_queue = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js"(exports, module) { - const kSize$3 = 2048; - const kMask = kSize$3 - 1; - var FixedCircularBuffer = class { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize$3); - this.next = null; - } - isEmpty() { - return this.top === this.bottom; - } - isFull() { - return (this.top + 1 & kMask) === this.bottom; - } - push(data) { - this.list[this.top] = data; - this.top = this.top + 1 & kMask; - } - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === void 0) return null; - this.list[this.bottom] = void 0; - this.bottom = this.bottom + 1 & kMask; - return nextItem; - } - }; - module.exports = class FixedQueue$1 { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - isEmpty() { - return this.head.isEmpty(); - } - push(data) { - if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); - this.head.push(data); - } - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; - return next; - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-stats.js -var require_pool_stats = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-stats.js"(exports, module) { - const { kFree: kFree$1, kConnected: kConnected$4, kPending: kPending$1, kQueued: kQueued$1, kRunning: kRunning$2, kSize: kSize$2 } = require_symbols$4(); - const kPool = Symbol("pool"); - var PoolStats$1 = class { - constructor(pool) { - this[kPool] = pool; - } - get connected() { - return this[kPool][kConnected$4]; - } - get free() { - return this[kPool][kFree$1]; - } - get pending() { - return this[kPool][kPending$1]; - } - get queued() { - return this[kPool][kQueued$1]; - } - get running() { - return this[kPool][kRunning$2]; - } - get size() { - return this[kPool][kSize$2]; - } - }; - module.exports = PoolStats$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-base.js -var require_pool_base = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-base.js"(exports, module) { - const DispatcherBase$2 = require_dispatcher_base(); - const FixedQueue = require_fixed_queue(); - const { kConnected: kConnected$3, kSize: kSize$1, kRunning: kRunning$1, kPending, kQueued, kBusy, kFree, kUrl: kUrl$2, kClose: kClose$4, kDestroy: kDestroy$2, kDispatch: kDispatch$1 } = require_symbols$4(); - const PoolStats = require_pool_stats(); - const kClients$4 = Symbol("clients"); - const kNeedDrain$2 = Symbol("needDrain"); - const kQueue = Symbol("queue"); - const kClosedResolve = Symbol("closed resolve"); - const kOnDrain$1 = Symbol("onDrain"); - const kOnConnect$1 = Symbol("onConnect"); - const kOnDisconnect$1 = Symbol("onDisconnect"); - const kOnConnectionError$1 = Symbol("onConnectionError"); - const kGetDispatcher$2 = Symbol("get dispatcher"); - const kAddClient$2 = Symbol("add client"); - const kRemoveClient$1 = Symbol("remove client"); - const kStats = Symbol("stats"); - var PoolBase$2 = class extends DispatcherBase$2 { - constructor() { - super(); - this[kQueue] = new FixedQueue(); - this[kClients$4] = []; - this[kQueued] = 0; - const pool = this; - this[kOnDrain$1] = function onDrain(origin, targets) { - const queue = pool[kQueue]; - let needDrain = false; - while (!needDrain) { - const item = queue.shift(); - if (!item) break; - pool[kQueued]--; - needDrain = !this.dispatch(item.opts, item.handler); - } - this[kNeedDrain$2] = needDrain; - if (!this[kNeedDrain$2] && pool[kNeedDrain$2]) { - pool[kNeedDrain$2] = false; - pool.emit("drain", origin, [pool, ...targets]); - } - if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients$4].map((c) => c.close())).then(pool[kClosedResolve]); - }; - this[kOnConnect$1] = (origin, targets) => { - pool.emit("connect", origin, [pool, ...targets]); - }; - this[kOnDisconnect$1] = (origin, targets, err) => { - pool.emit("disconnect", origin, [pool, ...targets], err); - }; - this[kOnConnectionError$1] = (origin, targets, err) => { - pool.emit("connectionError", origin, [pool, ...targets], err); - }; - this[kStats] = new PoolStats(this); - } - get [kBusy]() { - return this[kNeedDrain$2]; - } - get [kConnected$3]() { - return this[kClients$4].filter((client) => client[kConnected$3]).length; - } - get [kFree]() { - return this[kClients$4].filter((client) => client[kConnected$3] && !client[kNeedDrain$2]).length; - } - get [kPending]() { - let ret = this[kQueued]; - for (const { [kPending]: pending } of this[kClients$4]) ret += pending; - return ret; - } - get [kRunning$1]() { - let ret = 0; - for (const { [kRunning$1]: running } of this[kClients$4]) ret += running; - return ret; - } - get [kSize$1]() { - let ret = this[kQueued]; - for (const { [kSize$1]: size } of this[kClients$4]) ret += size; - return ret; - } - get stats() { - return this[kStats]; - } - async [kClose$4]() { - if (this[kQueue].isEmpty()) return Promise.all(this[kClients$4].map((c) => c.close())); - else return new Promise((resolve) => { - this[kClosedResolve] = resolve; - }); - } - async [kDestroy$2](err) { - while (true) { - const item = this[kQueue].shift(); - if (!item) break; - item.handler.onError(err); - } - return Promise.all(this[kClients$4].map((c) => c.destroy(err))); - } - [kDispatch$1](opts, handler) { - const dispatcher = this[kGetDispatcher$2](); - if (!dispatcher) { - this[kNeedDrain$2] = true; - this[kQueue].push({ - opts, - handler - }); - this[kQueued]++; - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain$2] = true; - this[kNeedDrain$2] = !this[kGetDispatcher$2](); - } - return !this[kNeedDrain$2]; - } - [kAddClient$2](client) { - client.on("drain", this[kOnDrain$1]).on("connect", this[kOnConnect$1]).on("disconnect", this[kOnDisconnect$1]).on("connectionError", this[kOnConnectionError$1]); - this[kClients$4].push(client); - if (this[kNeedDrain$2]) process.nextTick(() => { - if (this[kNeedDrain$2]) this[kOnDrain$1](client[kUrl$2], [this, client]); - }); - return this; - } - [kRemoveClient$1](client) { - client.close(() => { - const idx = this[kClients$4].indexOf(client); - if (idx !== -1) this[kClients$4].splice(idx, 1); - }); - this[kNeedDrain$2] = this[kClients$4].some((dispatcher) => !dispatcher[kNeedDrain$2] && dispatcher.closed !== true && dispatcher.destroyed !== true); - } - }; - module.exports = { - PoolBase: PoolBase$2, - kClients: kClients$4, - kNeedDrain: kNeedDrain$2, - kAddClient: kAddClient$2, - kRemoveClient: kRemoveClient$1, - kGetDispatcher: kGetDispatcher$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool.js -var require_pool = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool.js"(exports, module) { - const { PoolBase: PoolBase$1, kClients: kClients$3, kNeedDrain: kNeedDrain$1, kAddClient: kAddClient$1, kGetDispatcher: kGetDispatcher$1 } = require_pool_base(); - const Client$3 = require_client(); - const { InvalidArgumentError: InvalidArgumentError$15 } = require_errors(); - const util$11 = require_util$6(); - const { kUrl: kUrl$1, kInterceptors: kInterceptors$3 } = require_symbols$4(); - const buildConnector$2 = require_connect(); - const kOptions$3 = Symbol("options"); - const kConnections = Symbol("connections"); - const kFactory$3 = Symbol("factory"); - function defaultFactory$3(origin, opts) { - return new Client$3(origin, opts); - } - var Pool$5 = class extends PoolBase$1 { - constructor(origin, { connections, factory = defaultFactory$3, connect: connect$2, connectTimeout, tls: tls$2, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2,...options } = {}) { - super(); - if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError$15("invalid connections"); - if (typeof factory !== "function") throw new InvalidArgumentError$15("factory must be a function."); - if (connect$2 != null && typeof connect$2 !== "function" && typeof connect$2 !== "object") throw new InvalidArgumentError$15("connect must be a function or an object"); - if (typeof connect$2 !== "function") connect$2 = buildConnector$2({ - ...tls$2, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...util$11.nodeHasAutoSelectFamily && autoSelectFamily ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : void 0, - ...connect$2 - }); - this[kInterceptors$3] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; - this[kConnections] = connections || null; - this[kUrl$1] = util$11.parseOrigin(origin); - this[kOptions$3] = { - ...util$11.deepClone(options), - connect: connect$2, - allowH2 - }; - this[kOptions$3].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kFactory$3] = factory; - this.on("connectionError", (origin$1, targets, error$1) => { - for (const target of targets) { - const idx = this[kClients$3].indexOf(target); - if (idx !== -1) this[kClients$3].splice(idx, 1); - } - }); - } - [kGetDispatcher$1]() { - let dispatcher = this[kClients$3].find((dispatcher$1) => !dispatcher$1[kNeedDrain$1]); - if (dispatcher) return dispatcher; - if (!this[kConnections] || this[kClients$3].length < this[kConnections]) { - dispatcher = this[kFactory$3](this[kUrl$1], this[kOptions$3]); - this[kAddClient$1](dispatcher); - } - return dispatcher; - } - }; - module.exports = Pool$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/balanced-pool.js -var require_balanced_pool = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/balanced-pool.js"(exports, module) { - const { BalancedPoolMissingUpstreamError, InvalidArgumentError: InvalidArgumentError$14 } = require_errors(); - const { PoolBase, kClients: kClients$2, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); - const Pool$4 = require_pool(); - const { kUrl, kInterceptors: kInterceptors$2 } = require_symbols$4(); - const { parseOrigin } = require_util$6(); - const kFactory$2 = Symbol("factory"); - const kOptions$2 = Symbol("options"); - const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); - const kCurrentWeight = Symbol("kCurrentWeight"); - const kIndex = Symbol("kIndex"); - const kWeight = Symbol("kWeight"); - const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); - const kErrorPenalty = Symbol("kErrorPenalty"); - function getGreatestCommonDivisor(a, b) { - if (b === 0) return a; - return getGreatestCommonDivisor(b, a % b); - } - function defaultFactory$2(origin, opts) { - return new Pool$4(origin, opts); - } - var BalancedPool$1 = class extends PoolBase { - constructor(upstreams = [], { factory = defaultFactory$2,...opts } = {}) { - super(); - this[kOptions$2] = opts; - this[kIndex] = -1; - this[kCurrentWeight] = 0; - this[kMaxWeightPerServer] = this[kOptions$2].maxWeightPerServer || 100; - this[kErrorPenalty] = this[kOptions$2].errorPenalty || 15; - if (!Array.isArray(upstreams)) upstreams = [upstreams]; - if (typeof factory !== "function") throw new InvalidArgumentError$14("factory must be a function."); - this[kInterceptors$2] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; - this[kFactory$2] = factory; - for (const upstream of upstreams) this.addUpstream(upstream); - this._updateBalancedPoolStats(); - } - addUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - if (this[kClients$2].find((pool$1) => pool$1[kUrl].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true)) return this; - const pool = this[kFactory$2](upstreamOrigin, Object.assign({}, this[kOptions$2])); - this[kAddClient](pool); - pool.on("connect", () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); - }); - pool.on("connectionError", () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); - }); - pool.on("disconnect", (...args) => { - const err = args[2]; - if (err && err.code === "UND_ERR_SOCKET") { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); - } - }); - for (const client of this[kClients$2]) client[kWeight] = this[kMaxWeightPerServer]; - this._updateBalancedPoolStats(); - return this; - } - _updateBalancedPoolStats() { - this[kGreatestCommonDivisor] = this[kClients$2].map((p) => p[kWeight]).reduce(getGreatestCommonDivisor, 0); - } - removeUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - const pool = this[kClients$2].find((pool$1) => pool$1[kUrl].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true); - if (pool) this[kRemoveClient](pool); - return this; - } - get upstreams() { - return this[kClients$2].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); - } - [kGetDispatcher]() { - if (this[kClients$2].length === 0) throw new BalancedPoolMissingUpstreamError(); - const dispatcher = this[kClients$2].find((dispatcher$1) => !dispatcher$1[kNeedDrain] && dispatcher$1.closed !== true && dispatcher$1.destroyed !== true); - if (!dispatcher) return; - const allClientsBusy = this[kClients$2].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); - if (allClientsBusy) return; - let counter = 0; - let maxWeightIndex = this[kClients$2].findIndex((pool) => !pool[kNeedDrain]); - while (counter++ < this[kClients$2].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients$2].length; - const pool = this[kClients$2][this[kIndex]]; - if (pool[kWeight] > this[kClients$2][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; - if (this[kIndex] === 0) { - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; - if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; - } - if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; - } - this[kCurrentWeight] = this[kClients$2][maxWeightIndex][kWeight]; - this[kIndex] = maxWeightIndex; - return this[kClients$2][maxWeightIndex]; - } - }; - module.exports = BalancedPool$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js -var require_dispatcher_weakref = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js"(exports, module) { - /* istanbul ignore file: only for Node 12 */ - const { kConnected: kConnected$2, kSize } = require_symbols$4(); - var CompatWeakRef = class { - constructor(value) { - this.value = value; - } - deref() { - return this.value[kConnected$2] === 0 && this.value[kSize] === 0 ? void 0 : this.value; - } - }; - var CompatFinalizer = class { - constructor(finalizer) { - this.finalizer = finalizer; - } - register(dispatcher, key) { - if (dispatcher.on) dispatcher.on("disconnect", () => { - if (dispatcher[kConnected$2] === 0 && dispatcher[kSize] === 0) this.finalizer(key); - }); - } - }; - module.exports = function() { - if (process.env.NODE_V8_COVERAGE) return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - }; - return { - WeakRef: global.WeakRef || CompatWeakRef, - FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer - }; - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/agent.js -var require_agent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/agent.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$13 } = require_errors(); - const { kClients: kClients$1, kRunning, kClose: kClose$3, kDestroy: kDestroy$1, kDispatch, kInterceptors: kInterceptors$1 } = require_symbols$4(); - const DispatcherBase$1 = require_dispatcher_base(); - const Pool$3 = require_pool(); - const Client$2 = require_client(); - const util$10 = require_util$6(); - const createRedirectInterceptor$1 = require_redirectInterceptor(); - const { WeakRef: WeakRef$1, FinalizationRegistry: FinalizationRegistry$1 } = require_dispatcher_weakref()(); - const kOnConnect = Symbol("onConnect"); - const kOnDisconnect = Symbol("onDisconnect"); - const kOnConnectionError = Symbol("onConnectionError"); - const kMaxRedirections = Symbol("maxRedirections"); - const kOnDrain = Symbol("onDrain"); - const kFactory$1 = Symbol("factory"); - const kFinalizer = Symbol("finalizer"); - const kOptions$1 = Symbol("options"); - function defaultFactory$1(origin, opts) { - return opts && opts.connections === 1 ? new Client$2(origin, opts) : new Pool$3(origin, opts); - } - var Agent$4 = class extends DispatcherBase$1 { - constructor({ factory = defaultFactory$1, maxRedirections = 0, connect: connect$2,...options } = {}) { - super(); - if (typeof factory !== "function") throw new InvalidArgumentError$13("factory must be a function."); - if (connect$2 != null && typeof connect$2 !== "function" && typeof connect$2 !== "object") throw new InvalidArgumentError$13("connect must be a function or an object"); - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError$13("maxRedirections must be a positive number"); - if (connect$2 && typeof connect$2 !== "function") connect$2 = { ...connect$2 }; - this[kInterceptors$1] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor$1({ maxRedirections })]; - this[kOptions$1] = { - ...util$10.deepClone(options), - connect: connect$2 - }; - this[kOptions$1].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kMaxRedirections] = maxRedirections; - this[kFactory$1] = factory; - this[kClients$1] = new Map(); - this[kFinalizer] = new FinalizationRegistry$1( - /* istanbul ignore next: gc is undeterministic */ - (key) => { - const ref = this[kClients$1].get(key); - if (ref !== void 0 && ref.deref() === void 0) this[kClients$1].delete(key); - } -); - const agent = this; - this[kOnDrain] = (origin, targets) => { - agent.emit("drain", origin, [agent, ...targets]); - }; - this[kOnConnect] = (origin, targets) => { - agent.emit("connect", origin, [agent, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - agent.emit("disconnect", origin, [agent, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - agent.emit("connectionError", origin, [agent, ...targets], err); - }; - } - get [kRunning]() { - let ret = 0; - for (const ref of this[kClients$1].values()) { - const client = ref.deref(); - /* istanbul ignore next: gc is undeterministic */ - if (client) ret += client[kRunning]; - } - return ret; - } - [kDispatch](opts, handler) { - let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); - else throw new InvalidArgumentError$13("opts.origin must be a non-empty string or URL."); - const ref = this[kClients$1].get(key); - let dispatcher = ref ? ref.deref() : null; - if (!dispatcher) { - dispatcher = this[kFactory$1](opts.origin, this[kOptions$1]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients$1].set(key, new WeakRef$1(dispatcher)); - this[kFinalizer].register(dispatcher, key); - } - return dispatcher.dispatch(opts, handler); - } - async [kClose$3]() { - const closePromises = []; - for (const ref of this[kClients$1].values()) { - const client = ref.deref(); - /* istanbul ignore else: gc is undeterministic */ - if (client) closePromises.push(client.close()); - } - await Promise.all(closePromises); - } - async [kDestroy$1](err) { - const destroyPromises = []; - for (const ref of this[kClients$1].values()) { - const client = ref.deref(); - /* istanbul ignore else: gc is undeterministic */ - if (client) destroyPromises.push(client.destroy(err)); - } - await Promise.all(destroyPromises); - } - }; - module.exports = Agent$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/readable.js -var require_readable = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/readable.js"(exports, module) { - const assert$11 = __require("assert"); - const { Readable: Readable$3 } = __require("stream"); - const { RequestAbortedError: RequestAbortedError$7, NotSupportedError, InvalidArgumentError: InvalidArgumentError$12 } = require_errors(); - const util$9 = require_util$6(); - const { ReadableStreamFrom, toUSVString: toUSVString$1 } = require_util$6(); - let Blob$1; - const kConsume = Symbol("kConsume"); - const kReading = Symbol("kReading"); - const kBody = Symbol("kBody"); - const kAbort = Symbol("abort"); - const kContentType = Symbol("kContentType"); - const noop = () => {}; - module.exports = class BodyReadable extends Readable$3 { - constructor({ resume: resume$1, abort: abort$1, contentType = "", highWaterMark = 64 * 1024 }) { - super({ - autoDestroy: true, - read: resume$1, - highWaterMark - }); - this._readableState.dataEmitted = false; - this[kAbort] = abort$1; - this[kConsume] = null; - this[kBody] = null; - this[kContentType] = contentType; - this[kReading] = false; - } - destroy(err) { - if (this.destroyed) return this; - if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$7(); - if (err) this[kAbort](); - return super.destroy(err); - } - emit(ev, ...args) { - if (ev === "data") this._readableState.dataEmitted = true; - else if (ev === "error") this._readableState.errorEmitted = true; - return super.emit(ev, ...args); - } - on(ev, ...args) { - if (ev === "data" || ev === "readable") this[kReading] = true; - return super.on(ev, ...args); - } - addListener(ev, ...args) { - return this.on(ev, ...args); - } - off(ev, ...args) { - const ret = super.off(ev, ...args); - if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - return ret; - } - 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; - } - return super.push(chunk); - } - async text() { - return consume(this, "text"); - } - async json() { - return consume(this, "json"); - } - async blob() { - return consume(this, "blob"); - } - async arrayBuffer() { - return consume(this, "arrayBuffer"); - } - async formData() { - throw new NotSupportedError(); - } - get bodyUsed() { - return util$9.isDisturbed(this); - } - get body() { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this); - if (this[kConsume]) { - this[kBody].getReader(); - assert$11(this[kBody].locked); - } - } - return this[kBody]; - } - dump(opts) { - let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144; - const signal = opts && opts.signal; - if (signal) try { - if (typeof signal !== "object" || !("aborted" in signal)) throw new InvalidArgumentError$12("signal must be an AbortSignal"); - util$9.throwIfAborted(signal); - } catch (err) { - return Promise.reject(err); - } - if (this.closed) return Promise.resolve(null); - return new Promise((resolve, reject) => { - const signalListenerCleanup = signal ? util$9.addAbortListener(signal, () => { - this.destroy(); - }) : noop; - this.on("close", function() { - signalListenerCleanup(); - if (signal && signal.aborted) reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); - else resolve(null); - }).on("error", noop).on("data", function(chunk) { - limit -= chunk.length; - if (limit <= 0) this.destroy(); - }).resume(); - }); - } - }; - function isLocked(self) { - return self[kBody] && self[kBody].locked === true || self[kConsume]; - } - function isUnusable(self) { - return util$9.isDisturbed(self) || isLocked(self); - } - async function consume(stream$2, type) { - if (isUnusable(stream$2)) throw new TypeError("unusable"); - assert$11(!stream$2[kConsume]); - return new Promise((resolve, reject) => { - stream$2[kConsume] = { - type, - stream: stream$2, - resolve, - reject, - length: 0, - body: [] - }; - stream$2.on("error", function(err) { - consumeFinish(this[kConsume], err); - }).on("close", function() { - if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError$7()); - }); - process.nextTick(consumeStart, stream$2[kConsume]); - }); - } - function consumeStart(consume$1) { - if (consume$1.body === null) return; - const { _readableState: state } = consume$1.stream; - for (const chunk of state.buffer) consumePush(consume$1, chunk); - if (state.endEmitted) consumeEnd(this[kConsume]); - else consume$1.stream.on("end", function() { - consumeEnd(this[kConsume]); - }); - consume$1.stream.resume(); - while (consume$1.stream.read() != null); - } - function consumeEnd(consume$1) { - const { type, body, resolve, stream: stream$2, length } = consume$1; - try { - if (type === "text") resolve(toUSVString$1(Buffer.concat(body))); - else if (type === "json") resolve(JSON.parse(Buffer.concat(body))); - else if (type === "arrayBuffer") { - const dst = new Uint8Array(length); - let pos = 0; - for (const buf of body) { - dst.set(buf, pos); - pos += buf.byteLength; - } - resolve(dst.buffer); - } else if (type === "blob") { - if (!Blob$1) Blob$1 = __require("buffer").Blob; - resolve(new Blob$1(body, { type: stream$2[kContentType] })); - } - consumeFinish(consume$1); - } catch (err) { - stream$2.destroy(err); - } - } - function consumePush(consume$1, chunk) { - consume$1.length += chunk.length; - consume$1.body.push(chunk); - } - function consumeFinish(consume$1, err) { - if (consume$1.body === null) return; - if (err) consume$1.reject(err); - else consume$1.resolve(); - consume$1.type = null; - consume$1.stream = null; - consume$1.resolve = null; - consume$1.reject = null; - consume$1.length = 0; - consume$1.body = null; - } -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/util.js -var require_util$4 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/util.js"(exports, module) { - const assert$10 = __require("assert"); - const { ResponseStatusCodeError } = require_errors(); - const { toUSVString } = require_util$6(); - async function getResolveErrorBodyCallback$2({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert$10(body); - let chunks = []; - let limit = 0; - for await (const chunk of body) { - chunks.push(chunk); - limit += chunk.length; - if (limit > 128 * 1024) { - chunks = null; - break; - } - } - if (statusCode === 204 || !contentType || !chunks) { - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); - return; - } - try { - if (contentType.startsWith("application/json")) { - const payload = JSON.parse(toUSVString(Buffer.concat(chunks))); - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - if (contentType.startsWith("text/")) { - const payload = toUSVString(Buffer.concat(chunks)); - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - } catch (err) {} - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); - } - module.exports = { getResolveErrorBodyCallback: getResolveErrorBodyCallback$2 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js -var require_abort_signal = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { - const { addAbortListener: addAbortListener$1 } = require_util$6(); - const { RequestAbortedError: RequestAbortedError$6 } = require_errors(); - const kListener = Symbol("kListener"); - const kSignal$1 = Symbol("kSignal"); - function abort(self) { - if (self.abort) self.abort(); - else self.onError(new RequestAbortedError$6()); - } - function addSignal$5(self, signal) { - self[kSignal$1] = null; - self[kListener] = null; - if (!signal) return; - if (signal.aborted) { - abort(self); - return; - } - self[kSignal$1] = signal; - self[kListener] = () => { - abort(self); - }; - addAbortListener$1(self[kSignal$1], self[kListener]); - } - function removeSignal$5(self) { - if (!self[kSignal$1]) return; - if ("removeEventListener" in self[kSignal$1]) self[kSignal$1].removeEventListener("abort", self[kListener]); - else self[kSignal$1].removeListener("abort", self[kListener]); - self[kSignal$1] = null; - self[kListener] = null; - } - module.exports = { - addSignal: addSignal$5, - removeSignal: removeSignal$5 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-request.js -var require_api_request = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-request.js"(exports, module) { - const Readable$2 = require_readable(); - const { InvalidArgumentError: InvalidArgumentError$11, RequestAbortedError: RequestAbortedError$5 } = require_errors(); - const util$8 = require_util$6(); - const { getResolveErrorBodyCallback: getResolveErrorBodyCallback$1 } = require_util$4(); - const { AsyncResource: AsyncResource$4 } = __require("async_hooks"); - const { addSignal: addSignal$4, removeSignal: removeSignal$4 } = require_abort_signal(); - var RequestHandler = class extends AsyncResource$4 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$11("invalid opts"); - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; - try { - if (typeof callback !== "function") throw new InvalidArgumentError$11("invalid callback"); - if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError$11("invalid highWaterMark"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$11("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$11("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$11("invalid onInfo callback"); - super("UNDICI_REQUEST"); - } catch (err) { - if (util$8.isStream(body)) util$8.destroy(body.on("error", util$8.nop), err); - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.res = null; - this.abort = null; - this.body = body; - this.trailers = {}; - this.context = null; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError; - this.highWaterMark = highWaterMark; - if (util$8.isStream(body)) body.on("error", (err) => { - this.onError(err); - }); - addSignal$4(this, signal); - } - onConnect(abort$1, context) { - if (!this.callback) throw new RequestAbortedError$5(); - this.abort = abort$1; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { - const { callback, opaque, abort: abort$1, context, responseHeaders, highWaterMark } = this; - const headers = responseHeaders === "raw" ? util$8.parseRawHeaders(rawHeaders) : util$8.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode, - headers - }); - return; - } - const parsedHeaders = responseHeaders === "raw" ? util$8.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - const body = new Readable$2({ - resume: resume$1, - abort: abort$1, - contentType, - highWaterMark - }); - this.callback = null; - this.res = body; - if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback$1, null, { - callback, - body, - contentType, - statusCode, - statusMessage, - headers - }); - else this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body, - context - }); - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - removeSignal$4(this); - util$8.parseHeaders(trailers, this.trailers); - res.push(null); - } - onError(err) { - const { res, callback, body, opaque } = this; - removeSignal$4(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (res) { - this.res = null; - queueMicrotask(() => { - util$8.destroy(res, err); - }); - } - if (body) { - this.body = null; - util$8.destroy(body, err); - } - } - }; - function request(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - this.dispatch(opts, new RequestHandler(opts, callback)); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = request; - module.exports.RequestHandler = RequestHandler; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-stream.js -var require_api_stream = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { - const { finished, PassThrough: PassThrough$1 } = __require("stream"); - const { InvalidArgumentError: InvalidArgumentError$10, InvalidReturnValueError: InvalidReturnValueError$1, RequestAbortedError: RequestAbortedError$4 } = require_errors(); - const util$7 = require_util$6(); - const { getResolveErrorBodyCallback } = require_util$4(); - const { AsyncResource: AsyncResource$3 } = __require("async_hooks"); - const { addSignal: addSignal$3, removeSignal: removeSignal$3 } = require_abort_signal(); - var StreamHandler = class extends AsyncResource$3 { - constructor(opts, factory, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$10("invalid opts"); - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; - try { - if (typeof callback !== "function") throw new InvalidArgumentError$10("invalid callback"); - if (typeof factory !== "function") throw new InvalidArgumentError$10("invalid factory"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$10("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$10("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$10("invalid onInfo callback"); - super("UNDICI_STREAM"); - } catch (err) { - if (util$7.isStream(body)) util$7.destroy(body.on("error", util$7.nop), err); - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.factory = factory; - this.callback = callback; - this.res = null; - this.abort = null; - this.context = null; - this.trailers = null; - this.body = body; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError || false; - if (util$7.isStream(body)) body.on("error", (err) => { - this.onError(err); - }); - addSignal$3(this, signal); - } - onConnect(abort$1, context) { - if (!this.callback) throw new RequestAbortedError$4(); - this.abort = abort$1; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this; - const headers = responseHeaders === "raw" ? util$7.parseRawHeaders(rawHeaders) : util$7.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode, - headers - }); - return; - } - this.factory = null; - let res; - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === "raw" ? util$7.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - res = new PassThrough$1(); - this.callback = null; - this.runInAsyncScope(getResolveErrorBodyCallback, null, { - callback, - body: res, - contentType, - statusCode, - statusMessage, - headers - }); - } else { - if (factory === null) return; - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }); - if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError$1("expected Writable"); - finished(res, { readable: false }, (err) => { - const { callback: callback$1, res: res$1, opaque: opaque$1, trailers, abort: abort$1 } = this; - this.res = null; - if (err || !res$1.readable) util$7.destroy(res$1, err); - this.callback = null; - this.runInAsyncScope(callback$1, null, err || null, { - opaque: opaque$1, - trailers - }); - if (err) abort$1(); - }); - } - res.on("drain", resume$1); - this.res = res; - const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; - return needDrain !== true; - } - onData(chunk) { - const { res } = this; - return res ? res.write(chunk) : true; - } - onComplete(trailers) { - const { res } = this; - removeSignal$3(this); - if (!res) return; - this.trailers = util$7.parseHeaders(trailers); - res.end(); - } - onError(err) { - const { res, callback, opaque, body } = this; - removeSignal$3(this); - this.factory = null; - if (res) { - this.res = null; - util$7.destroy(res, err); - } else if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (body) { - this.body = null; - util$7.destroy(body, err); - } - } - }; - function stream(opts, factory, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = stream; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js -var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { - const { Readable: Readable$1, Duplex, PassThrough } = __require("stream"); - const { InvalidArgumentError: InvalidArgumentError$9, InvalidReturnValueError, RequestAbortedError: RequestAbortedError$3 } = require_errors(); - const util$6 = require_util$6(); - const { AsyncResource: AsyncResource$2 } = __require("async_hooks"); - const { addSignal: addSignal$2, removeSignal: removeSignal$2 } = require_abort_signal(); - const assert$9 = __require("assert"); - const kResume = Symbol("resume"); - var PipelineRequest = class extends Readable$1 { - constructor() { - super({ autoDestroy: true }); - this[kResume] = null; - } - _read() { - const { [kResume]: resume$1 } = this; - if (resume$1) { - this[kResume] = null; - resume$1(); - } - } - _destroy(err, callback) { - this._read(); - callback(err); - } - }; - var PipelineResponse = class extends Readable$1 { - constructor(resume$1) { - super({ autoDestroy: true }); - this[kResume] = resume$1; - } - _read() { - this[kResume](); - } - _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$3(); - callback(err); - } - }; - var PipelineHandler = class extends AsyncResource$2 { - constructor(opts, handler) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$9("invalid opts"); - if (typeof handler !== "function") throw new InvalidArgumentError$9("invalid handler"); - const { signal, method, opaque, onInfo, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$9("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$9("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$9("invalid onInfo callback"); - super("UNDICI_PIPELINE"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.handler = handler; - this.abort = null; - this.context = null; - this.onInfo = onInfo || null; - this.req = new PipelineRequest().on("error", util$6.nop); - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this; - if (body && body.resume) body.resume(); - }, - write: (chunk, encoding, callback) => { - const { req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); - else req[kResume] = callback; - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort: abort$1 } = this; - if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError$3(); - if (abort$1 && err) abort$1(); - util$6.destroy(body, err); - util$6.destroy(req, err); - util$6.destroy(res, err); - removeSignal$2(this); - callback(err); - } - }).on("prefinish", () => { - const { req } = this; - req.push(null); - }); - this.res = null; - addSignal$2(this, signal); - } - onConnect(abort$1, context) { - const { ret, res } = this; - assert$9(!res, "pipeline cannot be retried"); - if (ret.destroyed) throw new RequestAbortedError$3(); - this.abort = abort$1; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$1) { - const { opaque, handler, context } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? util$6.parseRawHeaders(rawHeaders) : util$6.parseHeaders(rawHeaders); - this.onInfo({ - statusCode, - headers - }); - } - return; - } - this.res = new PipelineResponse(resume$1); - let body; - try { - this.handler = null; - const headers = this.responseHeaders === "raw" ? util$6.parseRawHeaders(rawHeaders) : util$6.parseHeaders(rawHeaders); - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }); - } catch (err) { - this.res.on("error", util$6.nop); - throw err; - } - if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); - body.on("data", (chunk) => { - const { ret, body: body$1 } = this; - if (!ret.push(chunk) && body$1.pause) body$1.pause(); - }).on("error", (err) => { - const { ret } = this; - util$6.destroy(ret, err); - }).on("end", () => { - const { ret } = this; - ret.push(null); - }).on("close", () => { - const { ret } = this; - if (!ret._readableState.ended) util$6.destroy(ret, new RequestAbortedError$3()); - }); - this.body = body; - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - res.push(null); - } - onError(err) { - const { ret } = this; - this.handler = null; - util$6.destroy(ret, err); - } - }; - function pipeline$1(opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler); - this.dispatch({ - ...opts, - body: pipelineHandler.req - }, pipelineHandler); - return pipelineHandler.ret; - } catch (err) { - return new PassThrough().destroy(err); - } - } - module.exports = pipeline$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js -var require_api_upgrade = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$8, RequestAbortedError: RequestAbortedError$2, SocketError: SocketError$1 } = require_errors(); - const { AsyncResource: AsyncResource$1 } = __require("async_hooks"); - const util$5 = require_util$6(); - const { addSignal: addSignal$1, removeSignal: removeSignal$1 } = require_abort_signal(); - const assert$8 = __require("assert"); - var UpgradeHandler = class extends AsyncResource$1 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$8("invalid opts"); - if (typeof callback !== "function") throw new InvalidArgumentError$8("invalid callback"); - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$8("signal must be an EventEmitter or EventTarget"); - super("UNDICI_UPGRADE"); - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.abort = null; - this.context = null; - addSignal$1(this, signal); - } - onConnect(abort$1, context) { - if (!this.callback) throw new RequestAbortedError$2(); - this.abort = abort$1; - this.context = null; - } - onHeaders() { - throw new SocketError$1("bad upgrade", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this; - assert$8.strictEqual(statusCode, 101); - removeSignal$1(this); - this.callback = null; - const headers = this.responseHeaders === "raw" ? util$5.parseRawHeaders(rawHeaders) : util$5.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal$1(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function upgrade(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const upgradeHandler = new UpgradeHandler(opts, callback); - this.dispatch({ - ...opts, - method: opts.method || "GET", - upgrade: opts.protocol || "Websocket" - }, upgradeHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = upgrade; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-connect.js -var require_api_connect = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { - const { AsyncResource } = __require("async_hooks"); - const { InvalidArgumentError: InvalidArgumentError$7, RequestAbortedError: RequestAbortedError$1, SocketError } = require_errors(); - const util$4 = require_util$6(); - const { addSignal, removeSignal } = require_abort_signal(); - var ConnectHandler = class extends AsyncResource { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$7("invalid opts"); - if (typeof callback !== "function") throw new InvalidArgumentError$7("invalid callback"); - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$7("signal must be an EventEmitter or EventTarget"); - super("UNDICI_CONNECT"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.callback = callback; - this.abort = null; - addSignal(this, signal); - } - onConnect(abort$1, context) { - if (!this.callback) throw new RequestAbortedError$1(); - this.abort = abort$1; - this.context = context; - } - onHeaders() { - throw new SocketError("bad connect", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this; - removeSignal(this); - this.callback = null; - let headers = rawHeaders; - if (headers != null) headers = this.responseHeaders === "raw" ? util$4.parseRawHeaders(rawHeaders) : util$4.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function connect(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const connectHandler = new ConnectHandler(opts, callback); - this.dispatch({ - ...opts, - method: "CONNECT" - }, connectHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = connect; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/index.js -var require_api = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/index.js"(exports, module) { - module.exports.request = require_api_request(); - module.exports.stream = require_api_stream(); - module.exports.pipeline = require_api_pipeline(); - module.exports.upgrade = require_api_upgrade(); - module.exports.connect = require_api_connect(); -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js -var require_mock_errors = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { - const { UndiciError: UndiciError$1 } = require_errors(); - var MockNotMatchedError$1 = class MockNotMatchedError$1 extends UndiciError$1 { - constructor(message) { - super(message); - Error.captureStackTrace(this, MockNotMatchedError$1); - this.name = "MockNotMatchedError"; - this.message = message || "The request does not match any registered mock dispatches"; - this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; - } - }; - module.exports = { MockNotMatchedError: MockNotMatchedError$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js -var require_mock_symbols = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { - module.exports = { - kAgent: Symbol("agent"), - kOptions: Symbol("options"), - kFactory: Symbol("factory"), - kDispatches: Symbol("dispatches"), - kDispatchKey: Symbol("dispatch key"), - kDefaultHeaders: Symbol("default headers"), - kDefaultTrailers: Symbol("default trailers"), - kContentLength: Symbol("content length"), - kMockAgent: Symbol("mock agent"), - kMockAgentSet: Symbol("mock agent set"), - kMockAgentGet: Symbol("mock agent get"), - kMockDispatch: Symbol("mock dispatch"), - kClose: Symbol("close"), - kOriginalClose: Symbol("original agent close"), - kOrigin: Symbol("origin"), - kIsMockActive: Symbol("is mock active"), - kNetConnect: Symbol("net connect"), - kGetNetConnect: Symbol("get net connect"), - kConnected: Symbol("connected") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js -var require_mock_utils = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { - const { MockNotMatchedError } = require_mock_errors(); - const { kDispatches: kDispatches$4, kMockAgent: kMockAgent$2, kOriginalDispatch: kOriginalDispatch$2, kOrigin: kOrigin$2, kGetNetConnect: kGetNetConnect$1 } = require_mock_symbols(); - const { buildURL: buildURL$1, nop } = require_util$6(); - const { STATUS_CODES: STATUS_CODES$1 } = __require("http"); - const { types: { isPromise } } = __require("util"); - function matchValue$1(match, value) { - if (typeof match === "string") return match === value; - if (match instanceof RegExp) return match.test(value); - if (typeof match === "function") return match(value) === true; - return false; - } - function lowerCaseEntries(headers) { - return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue]; - })); - } - /** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ - function getHeaderByName(headers, key) { - if (Array.isArray(headers)) { - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (headers[i$1].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i$1 + 1]; - return void 0; - } else if (typeof headers.get === "function") return headers.get(key); - else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; - } - /** @param {string[]} headers */ - function buildHeadersFromArray(headers) { - const clone = headers.slice(); - const entries = []; - for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); - return Object.fromEntries(entries); - } - function matchHeaders(mockDispatch$1, headers) { - if (typeof mockDispatch$1.headers === "function") { - if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); - return mockDispatch$1.headers(headers ? lowerCaseEntries(headers) : {}); - } - if (typeof mockDispatch$1.headers === "undefined") return true; - if (typeof headers !== "object" || typeof mockDispatch$1.headers !== "object") return false; - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch$1.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName); - if (!matchValue$1(matchHeaderValue, headerValue)) return false; - } - return true; - } - function safeUrl(path$5) { - if (typeof path$5 !== "string") return path$5; - const pathSegments = path$5.split("?"); - if (pathSegments.length !== 2) return path$5; - const qp = new URLSearchParams(pathSegments.pop()); - qp.sort(); - return [...pathSegments, qp.toString()].join("?"); - } - function matchKey(mockDispatch$1, { path: path$5, method, body, headers }) { - const pathMatch = matchValue$1(mockDispatch$1.path, path$5); - const methodMatch = matchValue$1(mockDispatch$1.method, method); - const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true; - const headersMatch = matchHeaders(mockDispatch$1, headers); - return pathMatch && methodMatch && bodyMatch && headersMatch; - } - function getResponseData$1(data) { - if (Buffer.isBuffer(data)) return data; - else if (typeof data === "object") return JSON.stringify(data); - else return data.toString(); - } - function getMockDispatch(mockDispatches, key) { - const basePath = key.query ? buildURL$1(key.path, key.query) : key.path; - const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$5 }) => matchValue$1(safeUrl(path$5), resolvedPath)); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method)); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`); - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue$1(body, key.body) : true); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`); - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch$1) => matchHeaders(mockDispatch$1, key.headers)); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}'`); - return matchedMockDispatches[0]; - } - function addMockDispatch$1(mockDispatches, key, data) { - const baseData = { - timesInvoked: 0, - times: 1, - persist: false, - consumed: false - }; - const replyData = typeof data === "function" ? { callback: data } : { ...data }; - const newMockDispatch = { - ...baseData, - ...key, - pending: true, - data: { - error: null, - ...replyData - } - }; - mockDispatches.push(newMockDispatch); - return newMockDispatch; - } - function deleteMockDispatch(mockDispatches, key) { - const index = mockDispatches.findIndex((dispatch) => { - if (!dispatch.consumed) return false; - return matchKey(dispatch, key); - }); - if (index !== -1) mockDispatches.splice(index, 1); - } - function buildKey$1(opts) { - const { path: path$5, method, body, headers, query } = opts; - return { - path: path$5, - method, - body, - headers, - query - }; - } - function generateKeyValues(data) { - return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ - ...keyValuePairs, - Buffer.from(`${key}`), - Array.isArray(value) ? value.map((x) => Buffer.from(`${x}`)) : Buffer.from(`${value}`) - ], []); - } - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ - function getStatusText(statusCode) { - return STATUS_CODES$1[statusCode] || "unknown"; - } - async function getResponse(body) { - const buffers = []; - for await (const data of body) buffers.push(data); - return Buffer.concat(buffers).toString("utf8"); - } - /** - * Mock dispatch function used to simulate undici dispatches - */ - function mockDispatch(opts, handler) { - const key = buildKey$1(opts); - const mockDispatch$1 = getMockDispatch(this[kDispatches$4], key); - mockDispatch$1.timesInvoked++; - if (mockDispatch$1.data.callback) mockDispatch$1.data = { - ...mockDispatch$1.data, - ...mockDispatch$1.data.callback(opts) - }; - const { data: { statusCode, data, headers, trailers, error: error$1 }, delay, persist } = mockDispatch$1; - const { timesInvoked, times } = mockDispatch$1; - mockDispatch$1.consumed = !persist && timesInvoked >= times; - mockDispatch$1.pending = timesInvoked < times; - if (error$1 !== null) { - deleteMockDispatch(this[kDispatches$4], key); - handler.onError(error$1); - return true; - } - if (typeof delay === "number" && delay > 0) setTimeout(() => { - handleReply(this[kDispatches$4]); - }, delay); - else handleReply(this[kDispatches$4]); - function handleReply(mockDispatches, _data = data) { - const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; - const body = typeof _data === "function" ? _data({ - ...opts, - headers: optsHeaders - }) : _data; - if (isPromise(body)) { - body.then((newData) => handleReply(mockDispatches, newData)); - return; - } - const responseData = getResponseData$1(body); - const responseHeaders = generateKeyValues(headers); - const responseTrailers = generateKeyValues(trailers); - handler.abort = nop; - handler.onHeaders(statusCode, responseHeaders, resume$1, getStatusText(statusCode)); - handler.onData(Buffer.from(responseData)); - handler.onComplete(responseTrailers); - deleteMockDispatch(mockDispatches, key); - } - function resume$1() {} - return true; - } - function buildMockDispatch$2() { - const agent = this[kMockAgent$2]; - const origin = this[kOrigin$2]; - const originalDispatch = this[kOriginalDispatch$2]; - return function dispatch(opts, handler) { - if (agent.isMockActive) try { - mockDispatch.call(this, opts, handler); - } catch (error$1) { - if (error$1 instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect$1](); - if (netConnect === false) throw new MockNotMatchedError(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); - if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); - else throw new MockNotMatchedError(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); - } else throw error$1; - } - else originalDispatch.call(this, opts, handler); - }; - } - function checkNetConnect(netConnect, origin) { - const url = new URL(origin); - if (netConnect === true) return true; - else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue$1(matcher, url.host))) return true; - return false; - } - function buildMockOptions$1(opts) { - if (opts) { - const { agent,...mockOptions } = opts; - return mockOptions; - } - } - module.exports = { - getResponseData: getResponseData$1, - getMockDispatch, - addMockDispatch: addMockDispatch$1, - deleteMockDispatch, - buildKey: buildKey$1, - generateKeyValues, - matchValue: matchValue$1, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch: buildMockDispatch$2, - checkNetConnect, - buildMockOptions: buildMockOptions$1, - getHeaderByName - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js -var require_mock_interceptor = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { - const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); - const { kDispatches: kDispatches$3, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); - const { InvalidArgumentError: InvalidArgumentError$6 } = require_errors(); - const { buildURL } = require_util$6(); - /** - * Defines the scope API for an interceptor reply - */ - var MockScope = class { - constructor(mockDispatch$1) { - this[kMockDispatch] = mockDispatch$1; - } - /** - * Delay a reply by a set amount in ms. - */ - delay(waitInMs) { - if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError$6("waitInMs must be a valid integer > 0"); - this[kMockDispatch].delay = waitInMs; - return this; - } - /** - * For a defined reply, never mark as consumed. - */ - persist() { - this[kMockDispatch].persist = true; - return this; - } - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times(repeatTimes) { - if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError$6("repeatTimes must be a valid integer > 0"); - this[kMockDispatch].times = repeatTimes; - return this; - } - }; - /** - * Defines an interceptor for a Mock - */ - var MockInterceptor$2 = class { - constructor(opts, mockDispatches) { - if (typeof opts !== "object") throw new InvalidArgumentError$6("opts must be an object"); - if (typeof opts.path === "undefined") throw new InvalidArgumentError$6("opts.path must be defined"); - if (typeof opts.method === "undefined") opts.method = "GET"; - if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); - else { - const parsedURL = new URL(opts.path, "data://"); - opts.path = parsedURL.pathname + parsedURL.search; - } - if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); - this[kDispatchKey] = buildKey(opts); - this[kDispatches$3] = mockDispatches; - this[kDefaultHeaders] = {}; - this[kDefaultTrailers] = {}; - this[kContentLength] = false; - } - createMockScopeDispatchData(statusCode, data, responseOptions = {}) { - const responseData = getResponseData(data); - const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; - const headers = { - ...this[kDefaultHeaders], - ...contentLength, - ...responseOptions.headers - }; - const trailers = { - ...this[kDefaultTrailers], - ...responseOptions.trailers - }; - return { - statusCode, - data, - headers, - trailers - }; - } - validateReplyParameters(statusCode, data, responseOptions) { - if (typeof statusCode === "undefined") throw new InvalidArgumentError$6("statusCode must be defined"); - if (typeof data === "undefined") throw new InvalidArgumentError$6("data must be defined"); - if (typeof responseOptions !== "object") throw new InvalidArgumentError$6("responseOptions must be an object"); - } - /** - * Mock an undici request with a defined reply. - */ - reply(replyData) { - if (typeof replyData === "function") { - const wrappedDefaultsCallback = (opts) => { - const resolvedData = replyData(opts); - if (typeof resolvedData !== "object") throw new InvalidArgumentError$6("reply options callback must return an object"); - const { statusCode: statusCode$1, data: data$1 = "", responseOptions: responseOptions$1 = {} } = resolvedData; - this.validateReplyParameters(statusCode$1, data$1, responseOptions$1); - return { ...this.createMockScopeDispatchData(statusCode$1, data$1, responseOptions$1) }; - }; - const newMockDispatch$1 = addMockDispatch(this[kDispatches$3], this[kDispatchKey], wrappedDefaultsCallback); - return new MockScope(newMockDispatch$1); - } - const [statusCode, data = "", responseOptions = {}] = [...arguments]; - this.validateReplyParameters(statusCode, data, responseOptions); - const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions); - const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], dispatchData); - return new MockScope(newMockDispatch); - } - /** - * Mock an undici request with a defined error. - */ - replyWithError(error$1) { - if (typeof error$1 === "undefined") throw new InvalidArgumentError$6("error must be defined"); - const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], { error: error$1 }); - return new MockScope(newMockDispatch); - } - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders(headers) { - if (typeof headers === "undefined") throw new InvalidArgumentError$6("headers must be defined"); - this[kDefaultHeaders] = headers; - return this; - } - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers(trailers) { - if (typeof trailers === "undefined") throw new InvalidArgumentError$6("trailers must be defined"); - this[kDefaultTrailers] = trailers; - return this; - } - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength() { - this[kContentLength] = true; - return this; - } - }; - module.exports.MockInterceptor = MockInterceptor$2; - module.exports.MockScope = MockScope; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js -var require_mock_client = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { - const { promisify: promisify$1 } = __require("util"); - const Client$1 = require_client(); - const { buildMockDispatch: buildMockDispatch$1 } = require_mock_utils(); - const { kDispatches: kDispatches$2, kMockAgent: kMockAgent$1, kClose: kClose$2, kOriginalClose: kOriginalClose$1, kOrigin: kOrigin$1, kOriginalDispatch: kOriginalDispatch$1, kConnected: kConnected$1 } = require_mock_symbols(); - const { MockInterceptor: MockInterceptor$1 } = require_mock_interceptor(); - const Symbols$1 = require_symbols$4(); - const { InvalidArgumentError: InvalidArgumentError$5 } = require_errors(); - /** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ - var MockClient$2 = class extends Client$1 { - constructor(origin, opts) { - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$5("Argument opts.agent must implement Agent"); - this[kMockAgent$1] = opts.agent; - this[kOrigin$1] = origin; - this[kDispatches$2] = []; - this[kConnected$1] = 1; - this[kOriginalDispatch$1] = this.dispatch; - this[kOriginalClose$1] = this.close.bind(this); - this.dispatch = buildMockDispatch$1.call(this); - this.close = this[kClose$2]; - } - get [Symbols$1.kConnected]() { - return this[kConnected$1]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept(opts) { - return new MockInterceptor$1(opts, this[kDispatches$2]); - } - async [kClose$2]() { - await promisify$1(this[kOriginalClose$1])(); - this[kConnected$1] = 0; - this[kMockAgent$1][Symbols$1.kClients].delete(this[kOrigin$1]); - } - }; - module.exports = MockClient$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js -var require_mock_pool = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { - const { promisify } = __require("util"); - const Pool$2 = require_pool(); - const { buildMockDispatch } = require_mock_utils(); - const { kDispatches: kDispatches$1, kMockAgent, kClose: kClose$1, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); - const { MockInterceptor } = require_mock_interceptor(); - const Symbols = require_symbols$4(); - const { InvalidArgumentError: InvalidArgumentError$4 } = require_errors(); - /** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ - var MockPool$2 = class extends Pool$2 { - constructor(origin, opts) { - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$4("Argument opts.agent must implement Agent"); - this[kMockAgent] = opts.agent; - this[kOrigin] = origin; - this[kDispatches$1] = []; - this[kConnected] = 1; - this[kOriginalDispatch] = this.dispatch; - this[kOriginalClose] = this.close.bind(this); - this.dispatch = buildMockDispatch.call(this); - this.close = this[kClose$1]; - } - get [Symbols.kConnected]() { - return this[kConnected]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept(opts) { - return new MockInterceptor(opts, this[kDispatches$1]); - } - async [kClose$1]() { - await promisify(this[kOriginalClose])(); - this[kConnected] = 0; - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); - } - }; - module.exports = MockPool$2; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js -var require_pluralizer = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js"(exports, module) { - const singulars = { - pronoun: "it", - is: "is", - was: "was", - this: "this" - }; - const plurals = { - pronoun: "they", - is: "are", - was: "were", - this: "these" - }; - module.exports = class Pluralizer$1 { - constructor(singular, plural) { - this.singular = singular; - this.plural = plural; - } - pluralize(count) { - const one = count === 1; - const keys = one ? singulars : plurals; - const noun = one ? this.singular : this.plural; - return { - ...keys, - count, - noun - }; - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js -var require_pending_interceptors_formatter = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { - const { Transform } = __require("stream"); - const { Console } = __require("console"); - /** - * Gets the output of `console.table(…)` as a string. - */ - module.exports = class PendingInterceptorsFormatter$1 { - constructor({ disableColors } = {}) { - this.transform = new Transform({ transform(chunk, _enc, cb) { - cb(null, chunk); - } }); - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { colors: !disableColors && !process.env.CI } - }); - } - format(pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$5, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path$5, - "Status code": statusCode, - Persistent: persist ? "✅" : "❌", - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })); - this.logger.table(withPrettyHeaders); - return this.transform.read().toString(); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js -var require_mock_agent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { - const { kClients } = require_symbols$4(); - const Agent$3 = require_agent(); - const { kAgent: kAgent$1, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); - const MockClient$1 = require_mock_client(); - const MockPool$1 = require_mock_pool(); - const { matchValue, buildMockOptions } = require_mock_utils(); - const { InvalidArgumentError: InvalidArgumentError$3, UndiciError } = require_errors(); - const Dispatcher$1 = require_dispatcher(); - const Pluralizer = require_pluralizer(); - const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); - var FakeWeakRef = class { - constructor(value) { - this.value = value; - } - deref() { - return this.value; - } - }; - var MockAgent$1 = class extends Dispatcher$1 { - constructor(opts) { - super(opts); - this[kNetConnect] = true; - this[kIsMockActive] = true; - if (opts && opts.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$3("Argument opts.agent must implement Agent"); - const agent = opts && opts.agent ? opts.agent : new Agent$3(opts); - this[kAgent$1] = agent; - this[kClients] = agent[kClients]; - this[kOptions] = buildMockOptions(opts); - } - get(origin) { - let dispatcher = this[kMockAgentGet](origin); - if (!dispatcher) { - dispatcher = this[kFactory](origin); - this[kMockAgentSet](origin, dispatcher); - } - return dispatcher; - } - dispatch(opts, handler) { - this.get(opts.origin); - return this[kAgent$1].dispatch(opts, handler); - } - async close() { - await this[kAgent$1].close(); - this[kClients].clear(); - } - deactivate() { - this[kIsMockActive] = false; - } - activate() { - this[kIsMockActive] = true; - } - enableNetConnect(matcher) { - if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); - else this[kNetConnect] = [matcher]; - else if (typeof matcher === "undefined") this[kNetConnect] = true; - else throw new InvalidArgumentError$3("Unsupported matcher. Must be one of String|Function|RegExp."); - } - disableNetConnect() { - this[kNetConnect] = false; - } - get isMockActive() { - return this[kIsMockActive]; - } - [kMockAgentSet](origin, dispatcher) { - this[kClients].set(origin, new FakeWeakRef(dispatcher)); - } - [kFactory](origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]); - return this[kOptions] && this[kOptions].connections === 1 ? new MockClient$1(origin, mockOptions) : new MockPool$1(origin, mockOptions); - } - [kMockAgentGet](origin) { - const ref = this[kClients].get(origin); - if (ref) return ref.deref(); - if (typeof origin !== "string") { - const dispatcher = this[kFactory]("http://localhost:9999"); - this[kMockAgentSet](origin, dispatcher); - return dispatcher; - } - for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { - const nonExplicitDispatcher = nonExplicitRef.deref(); - if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin); - this[kMockAgentSet](origin, dispatcher); - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; - return dispatcher; - } - } - } - [kGetNetConnect]() { - return this[kNetConnect]; - } - pendingInterceptors() { - const mockAgentClients = this[kClients]; - return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope.deref()[kDispatches].map((dispatch) => ({ - ...dispatch, - origin - }))).filter(({ pending }) => pending); - } - assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors(); - if (pending.length === 0) return; - const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()); - } - }; - module.exports = MockAgent$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/proxy-agent.js -var require_proxy_agent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/proxy-agent.js"(exports, module) { - const { kProxy, kClose, kDestroy, kInterceptors } = require_symbols$4(); - const { URL: URL$1 } = __require("url"); - const Agent$2 = require_agent(); - const Pool$1 = require_pool(); - const DispatcherBase = require_dispatcher_base(); - const { InvalidArgumentError: InvalidArgumentError$2, RequestAbortedError } = require_errors(); - const buildConnector$1 = require_connect(); - const kAgent = Symbol("proxy agent"); - const kClient = Symbol("proxy client"); - const kProxyHeaders = Symbol("proxy headers"); - const kRequestTls = Symbol("request tls settings"); - const kProxyTls = Symbol("proxy tls settings"); - const kConnectEndpoint = Symbol("connect endpoint function"); - function defaultProtocolPort(protocol) { - return protocol === "https:" ? 443 : 80; - } - function buildProxyOptions(opts) { - if (typeof opts === "string") opts = { uri: opts }; - if (!opts || !opts.uri) throw new InvalidArgumentError$2("Proxy opts.uri is mandatory"); - return { - uri: opts.uri, - protocol: opts.protocol || "https" - }; - } - function defaultFactory(origin, opts) { - return new Pool$1(origin, opts); - } - var ProxyAgent$1 = class extends DispatcherBase { - constructor(opts) { - super(opts); - this[kProxy] = buildProxyOptions(opts); - this[kAgent] = new Agent$2(opts); - this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; - if (typeof opts === "string") opts = { uri: opts }; - if (!opts || !opts.uri) throw new InvalidArgumentError$2("Proxy opts.uri is mandatory"); - const { clientFactory = defaultFactory } = opts; - if (typeof clientFactory !== "function") throw new InvalidArgumentError$2("Proxy opts.clientFactory must be a function."); - this[kRequestTls] = opts.requestTls; - this[kProxyTls] = opts.proxyTls; - this[kProxyHeaders] = opts.headers || {}; - const resolvedUrl = new URL$1(opts.uri); - const { origin, port, host, username, password } = resolvedUrl; - if (opts.auth && opts.token) throw new InvalidArgumentError$2("opts.auth cannot be used in combination with opts.token"); - else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; - else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; - else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; - const connect$2 = buildConnector$1({ ...opts.proxyTls }); - this[kConnectEndpoint] = buildConnector$1({ ...opts.requestTls }); - this[kClient] = clientFactory(resolvedUrl, { connect: connect$2 }); - this[kAgent] = new Agent$2({ - ...opts, - connect: async (opts$1, callback) => { - let requestedHost = opts$1.host; - if (!opts$1.port) requestedHost += `:${defaultProtocolPort(opts$1.protocol)}`; - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedHost, - signal: opts$1.signal, - headers: { - ...this[kProxyHeaders], - host - } - }); - if (statusCode !== 200) { - socket.on("error", () => {}).destroy(); - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); - } - if (opts$1.protocol !== "https:") { - callback(null, socket); - return; - } - let servername; - if (this[kRequestTls]) servername = this[kRequestTls].servername; - else servername = opts$1.servername; - this[kConnectEndpoint]({ - ...opts$1, - servername, - httpSocket: socket - }, callback); - } catch (err) { - callback(err); - } - } - }); - } - dispatch(opts, handler) { - const { host } = new URL$1(opts.origin); - const headers = buildHeaders(opts.headers); - throwIfProxyAuthIsSent(headers); - return this[kAgent].dispatch({ - ...opts, - headers: { - ...headers, - host - } - }, handler); - } - async [kClose]() { - await this[kAgent].close(); - await this[kClient].close(); - } - async [kDestroy]() { - await this[kAgent].destroy(); - await this[kClient].destroy(); - } - }; - /** - * @param {string[] | Record} headers - * @returns {Record} - */ - function buildHeaders(headers) { - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {}; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) headersPair[headers[i$1]] = headers[i$1 + 1]; - return headersPair; - } - return headers; - } - /** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ - function throwIfProxyAuthIsSent(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) throw new InvalidArgumentError$2("Proxy-Authorization should be sent in ProxyAgent constructor"); - } - module.exports = ProxyAgent$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js -var require_RetryHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js"(exports, module) { - const assert$7 = __require("assert"); - const { kRetryHandlerDefaultRetry } = require_symbols$4(); - const { RequestRetryError } = require_errors(); - const { isDisturbed: isDisturbed$1, parseHeaders, parseRangeHeader } = require_util$6(); - function calculateRetryAfterHeader(retryAfter) { - const current = Date.now(); - const diff$1 = new Date(retryAfter).getTime() - current; - return diff$1; - } - var RetryHandler$1 = class RetryHandler$1 { - constructor(opts, handlers) { - const { retryOptions,...dispatchOpts } = opts; - const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; - this.dispatch = handlers.dispatch; - this.handler = handlers.handler; - this.opts = dispatchOpts; - this.abort = null; - this.aborted = false; - this.retryOpts = { - retry: retryFn ?? RetryHandler$1[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1e3, - timeout: minTimeout ?? 500, - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - methods: methods ?? [ - "GET", - "HEAD", - "OPTIONS", - "PUT", - "DELETE", - "TRACE" - ], - statusCodes: statusCodes ?? [ - 500, - 502, - 503, - 504, - 429 - ], - errorCodes: errorCodes ?? [ - "ECONNRESET", - "ECONNREFUSED", - "ENOTFOUND", - "ENETDOWN", - "ENETUNREACH", - "EHOSTDOWN", - "EHOSTUNREACH", - "EPIPE" - ] - }; - this.retryCount = 0; - this.start = 0; - this.end = null; - this.etag = null; - this.resume = null; - this.handler.onConnect((reason) => { - this.aborted = true; - if (this.abort) this.abort(reason); - else this.reason = reason; - }); - } - onRequestSent() { - if (this.handler.onRequestSent) this.handler.onRequestSent(); - } - onUpgrade(statusCode, headers, socket) { - if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); - } - onConnect(abort$1) { - if (this.aborted) abort$1(this.reason); - else this.abort = abort$1; - } - onBodySent(chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk); - } - static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { - const { statusCode, code, headers } = err; - const { method, retryOptions } = opts; - const { maxRetries, timeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; - let { counter, currentTimeout } = state; - currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; - if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { - cb(err); - return; - } - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err); - return; - } - if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { - cb(err); - return; - } - if (counter > maxRetries) { - cb(err); - return; - } - let retryAfterHeader = headers != null && headers["retry-after"]; - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader); - retryAfterHeader = isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; - } - const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); - state.currentTimeout = retryTimeout; - setTimeout(() => cb(null), retryTimeout); - } - onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { - const headers = parseHeaders(rawHeaders); - this.retryCount += 1; - if (statusCode >= 300) { - this.abort(new RequestRetryError("Request failed", statusCode, { - headers, - count: this.retryCount - })); - return false; - } - if (this.resume != null) { - this.resume = null; - if (statusCode !== 206) return true; - const contentRange = parseRangeHeader(headers["content-range"]); - if (!contentRange) { - this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { - headers, - count: this.retryCount - })); - return false; - } - if (this.etag != null && this.etag !== headers.etag) { - this.abort(new RequestRetryError("ETag mismatch", statusCode, { - headers, - count: this.retryCount - })); - return false; - } - const { start, size, end = size } = contentRange; - assert$7(this.start === start, "content-range mismatch"); - assert$7(this.end == null || this.end === end, "content-range mismatch"); - this.resume = resume$1; - return true; - } - if (this.end == null) { - if (statusCode === 206) { - const range = parseRangeHeader(headers["content-range"]); - if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume$1, statusMessage); - const { start, size, end = size } = range; - assert$7(start != null && Number.isFinite(start) && this.start !== start, "content-range mismatch"); - assert$7(Number.isFinite(start)); - assert$7(end != null && Number.isFinite(end) && this.end !== end, "invalid content-length"); - this.start = start; - this.end = end; - } - if (this.end == null) { - const contentLength = headers["content-length"]; - this.end = contentLength != null ? Number(contentLength) : null; - } - assert$7(Number.isFinite(this.start)); - assert$7(this.end == null || Number.isFinite(this.end), "invalid content-length"); - this.resume = resume$1; - this.etag = headers.etag != null ? headers.etag : null; - return this.handler.onHeaders(statusCode, rawHeaders, resume$1, statusMessage); - } - const err = new RequestRetryError("Request failed", statusCode, { - headers, - count: this.retryCount - }); - this.abort(err); - return false; - } - onData(chunk) { - this.start += chunk.length; - return this.handler.onData(chunk); - } - onComplete(rawTrailers) { - this.retryCount = 0; - return this.handler.onComplete(rawTrailers); - } - onError(err) { - if (this.aborted || isDisturbed$1(this.opts.body)) return this.handler.onError(err); - this.retryOpts.retry(err, { - state: { - counter: this.retryCount++, - currentTimeout: this.retryAfter - }, - opts: { - retryOptions: this.retryOpts, - ...this.opts - } - }, onRetry.bind(this)); - function onRetry(err$1) { - if (err$1 != null || this.aborted || isDisturbed$1(this.opts.body)) return this.handler.onError(err$1); - if (this.start !== 0) this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - range: `bytes=${this.start}-${this.end ?? ""}` - } - }; - try { - this.dispatch(this.opts, this); - } catch (err$2) { - this.handler.onError(err$2); - } - } - } - }; - module.exports = RetryHandler$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/global.js -var require_global = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/global.js"(exports, module) { - const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); - const { InvalidArgumentError: InvalidArgumentError$1 } = require_errors(); - const Agent$1 = require_agent(); - if (getGlobalDispatcher$5() === void 0) setGlobalDispatcher$1(new Agent$1()); - function setGlobalDispatcher$1(agent) { - if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError$1("Argument agent must implement Agent"); - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }); - } - function getGlobalDispatcher$5() { - return globalThis[globalDispatcher]; - } - module.exports = { - setGlobalDispatcher: setGlobalDispatcher$1, - getGlobalDispatcher: getGlobalDispatcher$5 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js -var require_DecoratorHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js"(exports, module) { - module.exports = class DecoratorHandler$1 { - constructor(handler) { - this.handler = handler; - } - onConnect(...args) { - return this.handler.onConnect(...args); - } - onError(...args) { - return this.handler.onError(...args); - } - onUpgrade(...args) { - return this.handler.onUpgrade(...args); - } - onHeaders(...args) { - return this.handler.onHeaders(...args); - } - onData(...args) { - return this.handler.onData(...args); - } - onComplete(...args) { - return this.handler.onComplete(...args); - } - onBodySent(...args) { - return this.handler.onBodySent(...args); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/headers.js -var require_headers = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/headers.js"(exports, module) { - const { kHeadersList: kHeadersList$5, kConstruct: kConstruct$4 } = require_symbols$4(); - const { kGuard: kGuard$4 } = require_symbols$3(); - const { kEnumerableProperty: kEnumerableProperty$7 } = require_util$6(); - const { makeIterator, isValidHeaderName: isValidHeaderName$1, isValidHeaderValue } = require_util$5(); - const util$3 = __require("util"); - const { webidl: webidl$10 } = require_webidl(); - const assert$6 = __require("assert"); - const kHeadersMap = Symbol("headers map"); - const kHeadersSortedMap = Symbol("headers map sorted"); - /** - * @param {number} code - */ - function isHTTPWhiteSpaceCharCode(code) { - return code === 10 || code === 13 || code === 9 || code === 32; - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ - function headerValueNormalize(potentialValue) { - let i$1 = 0; - let j = potentialValue.length; - while (j > i$1 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; - while (j > i$1 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i$1))) ++i$1; - return i$1 === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i$1, j); - } - function fill$1(headers, object) { - if (Array.isArray(object)) for (let i$1 = 0; i$1 < object.length; ++i$1) { - const header = object[i$1]; - if (header.length !== 2) throw webidl$10.errors.exception({ - header: "Headers constructor", - message: `expected name/value pair to be length 2, found ${header.length}.` - }); - appendHeader(headers, header[0], header[1]); - } - else if (typeof object === "object" && object !== null) { - const keys = Object.keys(object); - for (let i$1 = 0; i$1 < keys.length; ++i$1) appendHeader(headers, keys[i$1], object[keys[i$1]]); - } else throw webidl$10.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ - function appendHeader(headers, name, value) { - value = headerValueNormalize(value); - if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ - prefix: "Headers.append", - value: name, - type: "header name" - }); - else if (!isValidHeaderValue(value)) throw webidl$10.errors.invalidArgument({ - prefix: "Headers.append", - value, - type: "header value" - }); - if (headers[kGuard$4] === "immutable") throw new TypeError("immutable"); - else if (headers[kGuard$4] === "request-no-cors") {} - return headers[kHeadersList$5].append(name, value); - } - var HeadersList$2 = class HeadersList$2 { - /** @type {[string, string][]|null} */ - cookies = null; - constructor(init) { - if (init instanceof HeadersList$2) { - this[kHeadersMap] = new Map(init[kHeadersMap]); - this[kHeadersSortedMap] = init[kHeadersSortedMap]; - this.cookies = init.cookies === null ? null : [...init.cookies]; - } else { - this[kHeadersMap] = new Map(init); - this[kHeadersSortedMap] = null; - } - } - contains(name) { - name = name.toLowerCase(); - return this[kHeadersMap].has(name); - } - clear() { - this[kHeadersMap].clear(); - this[kHeadersSortedMap] = null; - this.cookies = null; - } - append(name, value) { - this[kHeadersSortedMap] = null; - const lowercaseName = name.toLowerCase(); - const exists$1 = this[kHeadersMap].get(lowercaseName); - if (exists$1) { - const delimiter = lowercaseName === "cookie" ? "; " : ", "; - this[kHeadersMap].set(lowercaseName, { - name: exists$1.name, - value: `${exists$1.value}${delimiter}${value}` - }); - } else this[kHeadersMap].set(lowercaseName, { - name, - value - }); - if (lowercaseName === "set-cookie") { - this.cookies ??= []; - this.cookies.push(value); - } - } - set(name, value) { - this[kHeadersSortedMap] = null; - const lowercaseName = name.toLowerCase(); - if (lowercaseName === "set-cookie") this.cookies = [value]; - this[kHeadersMap].set(lowercaseName, { - name, - value - }); - } - delete(name) { - this[kHeadersSortedMap] = null; - name = name.toLowerCase(); - if (name === "set-cookie") this.cookies = null; - this[kHeadersMap].delete(name); - } - get(name) { - const value = this[kHeadersMap].get(name.toLowerCase()); - return value === void 0 ? null : value.value; - } - *[Symbol.iterator]() { - for (const [name, { value }] of this[kHeadersMap]) yield [name, value]; - } - get entries() { - const headers = {}; - if (this[kHeadersMap].size) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; - return headers; - } - }; - var Headers$6 = class Headers$6 { - constructor(init = void 0) { - if (init === kConstruct$4) return; - this[kHeadersList$5] = new HeadersList$2(); - this[kGuard$4] = "none"; - if (init !== void 0) { - init = webidl$10.converters.HeadersInit(init); - fill$1(this, init); - } - } - append(name, value) { - webidl$10.brandCheck(this, Headers$6); - webidl$10.argumentLengthCheck(arguments, 2, { header: "Headers.append" }); - name = webidl$10.converters.ByteString(name); - value = webidl$10.converters.ByteString(value); - return appendHeader(this, name, value); - } - delete(name) { - webidl$10.brandCheck(this, Headers$6); - webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.delete" }); - name = webidl$10.converters.ByteString(name); - if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ - prefix: "Headers.delete", - value: name, - type: "header name" - }); - if (this[kGuard$4] === "immutable") throw new TypeError("immutable"); - else if (this[kGuard$4] === "request-no-cors") {} - if (!this[kHeadersList$5].contains(name)) return; - this[kHeadersList$5].delete(name); - } - get(name) { - webidl$10.brandCheck(this, Headers$6); - webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.get" }); - name = webidl$10.converters.ByteString(name); - if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ - prefix: "Headers.get", - value: name, - type: "header name" - }); - return this[kHeadersList$5].get(name); - } - has(name) { - webidl$10.brandCheck(this, Headers$6); - webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.has" }); - name = webidl$10.converters.ByteString(name); - if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ - prefix: "Headers.has", - value: name, - type: "header name" - }); - return this[kHeadersList$5].contains(name); - } - set(name, value) { - webidl$10.brandCheck(this, Headers$6); - webidl$10.argumentLengthCheck(arguments, 2, { header: "Headers.set" }); - name = webidl$10.converters.ByteString(name); - value = webidl$10.converters.ByteString(value); - value = headerValueNormalize(value); - if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ - prefix: "Headers.set", - value: name, - type: "header name" - }); - else if (!isValidHeaderValue(value)) throw webidl$10.errors.invalidArgument({ - prefix: "Headers.set", - value, - type: "header value" - }); - if (this[kGuard$4] === "immutable") throw new TypeError("immutable"); - else if (this[kGuard$4] === "request-no-cors") {} - this[kHeadersList$5].set(name, value); - } - getSetCookie() { - webidl$10.brandCheck(this, Headers$6); - const list = this[kHeadersList$5].cookies; - if (list) return [...list]; - return []; - } - get [kHeadersSortedMap]() { - if (this[kHeadersList$5][kHeadersSortedMap]) return this[kHeadersList$5][kHeadersSortedMap]; - const headers = []; - const names = [...this[kHeadersList$5]].sort((a, b) => a[0] < b[0] ? -1 : 1); - const cookies = this[kHeadersList$5].cookies; - for (let i$1 = 0; i$1 < names.length; ++i$1) { - const [name, value] = names[i$1]; - if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); - else { - assert$6(value !== null); - headers.push([name, value]); - } - } - this[kHeadersList$5][kHeadersSortedMap] = headers; - return headers; - } - keys() { - webidl$10.brandCheck(this, Headers$6); - if (this[kGuard$4] === "immutable") { - const value = this[kHeadersSortedMap]; - return makeIterator(() => value, "Headers", "key"); - } - return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "key"); - } - values() { - webidl$10.brandCheck(this, Headers$6); - if (this[kGuard$4] === "immutable") { - const value = this[kHeadersSortedMap]; - return makeIterator(() => value, "Headers", "value"); - } - return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "value"); - } - entries() { - webidl$10.brandCheck(this, Headers$6); - if (this[kGuard$4] === "immutable") { - const value = this[kHeadersSortedMap]; - return makeIterator(() => value, "Headers", "key+value"); - } - return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "key+value"); - } - /** - * @param {(value: string, key: string, self: Headers) => void} callbackFn - * @param {unknown} thisArg - */ - forEach(callbackFn, thisArg = globalThis) { - webidl$10.brandCheck(this, Headers$6); - webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.forEach" }); - if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'."); - for (const [key, value] of this) callbackFn.apply(thisArg, [ - value, - key, - this - ]); - } - [Symbol.for("nodejs.util.inspect.custom")]() { - webidl$10.brandCheck(this, Headers$6); - return this[kHeadersList$5]; - } - }; - Headers$6.prototype[Symbol.iterator] = Headers$6.prototype.entries; - Object.defineProperties(Headers$6.prototype, { - append: kEnumerableProperty$7, - delete: kEnumerableProperty$7, - get: kEnumerableProperty$7, - has: kEnumerableProperty$7, - set: kEnumerableProperty$7, - getSetCookie: kEnumerableProperty$7, - keys: kEnumerableProperty$7, - values: kEnumerableProperty$7, - entries: kEnumerableProperty$7, - forEach: kEnumerableProperty$7, - [Symbol.iterator]: { enumerable: false }, - [Symbol.toStringTag]: { - value: "Headers", - configurable: true - }, - [util$3.inspect.custom]: { enumerable: false } - }); - webidl$10.converters.HeadersInit = function(V) { - if (webidl$10.util.Type(V) === "Object") { - if (V[Symbol.iterator]) return webidl$10.converters["sequence>"](V); - return webidl$10.converters["record"](V); - } - throw webidl$10.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - }; - module.exports = { - fill: fill$1, - Headers: Headers$6, - HeadersList: HeadersList$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/response.js -var require_response = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/response.js"(exports, module) { - const { Headers: Headers$5, HeadersList: HeadersList$1, fill } = require_headers(); - const { extractBody: extractBody$1, cloneBody: cloneBody$1, mixinBody: mixinBody$1 } = require_body(); - const util$2 = require_util$6(); - const { kEnumerableProperty: kEnumerableProperty$6 } = util$2; - const { isValidReasonPhrase, isCancelled: isCancelled$1, isAborted: isAborted$1, isBlobLike: isBlobLike$2, serializeJavascriptValueToJSONString, isErrorLike: isErrorLike$1, isomorphicEncode: isomorphicEncode$1 } = require_util$5(); - const { redirectStatusSet: redirectStatusSet$1, nullBodyStatus: nullBodyStatus$1, DOMException: DOMException$4 } = require_constants$3(); - const { kState: kState$6, kHeaders: kHeaders$3, kGuard: kGuard$3, kRealm: kRealm$3 } = require_symbols$3(); - const { webidl: webidl$9 } = require_webidl(); - const { FormData } = require_formdata(); - const { getGlobalOrigin: getGlobalOrigin$2 } = require_global$1(); - const { URLSerializer: URLSerializer$3 } = require_dataURL(); - const { kHeadersList: kHeadersList$4, kConstruct: kConstruct$3 } = require_symbols$4(); - const assert$5 = __require("assert"); - const { types: types$2 } = __require("util"); - const ReadableStream$1 = globalThis.ReadableStream || __require("stream/web").ReadableStream; - const textEncoder = new TextEncoder("utf-8"); - var Response$2 = class Response$2 { - static error() { - const relevantRealm = { settingsObject: {} }; - const responseObject = new Response$2(); - responseObject[kState$6] = makeNetworkError$1(); - responseObject[kRealm$3] = relevantRealm; - responseObject[kHeaders$3][kHeadersList$4] = responseObject[kState$6].headersList; - responseObject[kHeaders$3][kGuard$3] = "immutable"; - responseObject[kHeaders$3][kRealm$3] = relevantRealm; - return responseObject; - } - static json(data, init = {}) { - webidl$9.argumentLengthCheck(arguments, 1, { header: "Response.json" }); - if (init !== null) init = webidl$9.converters.ResponseInit(init); - const bytes = textEncoder.encode(serializeJavascriptValueToJSONString(data)); - const body = extractBody$1(bytes); - const relevantRealm = { settingsObject: {} }; - const responseObject = new Response$2(); - responseObject[kRealm$3] = relevantRealm; - responseObject[kHeaders$3][kGuard$3] = "response"; - responseObject[kHeaders$3][kRealm$3] = relevantRealm; - initializeResponse(responseObject, init, { - body: body[0], - type: "application/json" - }); - return responseObject; - } - static redirect(url, status = 302) { - const relevantRealm = { settingsObject: {} }; - webidl$9.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl$9.converters.USVString(url); - status = webidl$9.converters["unsigned short"](status); - let parsedURL; - try { - parsedURL = new URL(url, getGlobalOrigin$2()); - } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { cause: err }); - } - if (!redirectStatusSet$1.has(status)) throw new RangeError("Invalid status code " + status); - const responseObject = new Response$2(); - responseObject[kRealm$3] = relevantRealm; - responseObject[kHeaders$3][kGuard$3] = "immutable"; - responseObject[kHeaders$3][kRealm$3] = relevantRealm; - responseObject[kState$6].status = status; - const value = isomorphicEncode$1(URLSerializer$3(parsedURL)); - responseObject[kState$6].headersList.append("location", value); - return responseObject; - } - constructor(body = null, init = {}) { - if (body !== null) body = webidl$9.converters.BodyInit(body); - init = webidl$9.converters.ResponseInit(init); - this[kRealm$3] = { settingsObject: {} }; - this[kState$6] = makeResponse$1({}); - this[kHeaders$3] = new Headers$5(kConstruct$3); - this[kHeaders$3][kGuard$3] = "response"; - this[kHeaders$3][kHeadersList$4] = this[kState$6].headersList; - this[kHeaders$3][kRealm$3] = this[kRealm$3]; - let bodyWithType = null; - if (body != null) { - const [extractedBody, type] = extractBody$1(body); - bodyWithType = { - body: extractedBody, - type - }; - } - initializeResponse(this, init, bodyWithType); - } - get type() { - webidl$9.brandCheck(this, Response$2); - return this[kState$6].type; - } - get url() { - webidl$9.brandCheck(this, Response$2); - const urlList = this[kState$6].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) return ""; - return URLSerializer$3(url, true); - } - get redirected() { - webidl$9.brandCheck(this, Response$2); - return this[kState$6].urlList.length > 1; - } - get status() { - webidl$9.brandCheck(this, Response$2); - return this[kState$6].status; - } - get ok() { - webidl$9.brandCheck(this, Response$2); - return this[kState$6].status >= 200 && this[kState$6].status <= 299; - } - get statusText() { - webidl$9.brandCheck(this, Response$2); - return this[kState$6].statusText; - } - get headers() { - webidl$9.brandCheck(this, Response$2); - return this[kHeaders$3]; - } - get body() { - webidl$9.brandCheck(this, Response$2); - return this[kState$6].body ? this[kState$6].body.stream : null; - } - get bodyUsed() { - webidl$9.brandCheck(this, Response$2); - return !!this[kState$6].body && util$2.isDisturbed(this[kState$6].body.stream); - } - clone() { - webidl$9.brandCheck(this, Response$2); - if (this.bodyUsed || this.body && this.body.locked) throw webidl$9.errors.exception({ - header: "Response.clone", - message: "Body has already been consumed." - }); - const clonedResponse = cloneResponse$1(this[kState$6]); - const clonedResponseObject = new Response$2(); - clonedResponseObject[kState$6] = clonedResponse; - clonedResponseObject[kRealm$3] = this[kRealm$3]; - clonedResponseObject[kHeaders$3][kHeadersList$4] = clonedResponse.headersList; - clonedResponseObject[kHeaders$3][kGuard$3] = this[kHeaders$3][kGuard$3]; - clonedResponseObject[kHeaders$3][kRealm$3] = this[kHeaders$3][kRealm$3]; - return clonedResponseObject; - } - }; - mixinBody$1(Response$2); - Object.defineProperties(Response$2.prototype, { - type: kEnumerableProperty$6, - url: kEnumerableProperty$6, - status: kEnumerableProperty$6, - ok: kEnumerableProperty$6, - redirected: kEnumerableProperty$6, - statusText: kEnumerableProperty$6, - headers: kEnumerableProperty$6, - clone: kEnumerableProperty$6, - body: kEnumerableProperty$6, - bodyUsed: kEnumerableProperty$6, - [Symbol.toStringTag]: { - value: "Response", - configurable: true - } - }); - Object.defineProperties(Response$2, { - json: kEnumerableProperty$6, - redirect: kEnumerableProperty$6, - error: kEnumerableProperty$6 - }); - function cloneResponse$1(response) { - if (response.internalResponse) return filterResponse$1(cloneResponse$1(response.internalResponse), response.type); - const newResponse = makeResponse$1({ - ...response, - body: null - }); - if (response.body != null) newResponse.body = cloneBody$1(response.body); - return newResponse; - } - function makeResponse$1(init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: "default", - status: 200, - timingInfo: null, - cacheState: "", - statusText: "", - ...init, - headersList: init.headersList ? new HeadersList$1(init.headersList) : new HeadersList$1(), - urlList: init.urlList ? [...init.urlList] : [] - }; - } - function makeNetworkError$1(reason) { - const isError = isErrorLike$1(reason); - return makeResponse$1({ - type: "error", - status: 0, - error: isError ? reason : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === "AbortError" - }); - } - function makeFilteredResponse(response, state) { - state = { - internalResponse: response, - ...state - }; - return new Proxy(response, { - get(target, p) { - return p in state ? state[p] : target[p]; - }, - set(target, p, value) { - assert$5(!(p in state)); - target[p] = value; - return true; - } - }); - } - function filterResponse$1(response, type) { - if (type === "basic") return makeFilteredResponse(response, { - type: "basic", - headersList: response.headersList - }); - else if (type === "cors") return makeFilteredResponse(response, { - type: "cors", - headersList: response.headersList - }); - else if (type === "opaque") return makeFilteredResponse(response, { - type: "opaque", - urlList: Object.freeze([]), - status: 0, - statusText: "", - body: null - }); - else if (type === "opaqueredirect") return makeFilteredResponse(response, { - type: "opaqueredirect", - status: 0, - statusText: "", - headersList: [], - body: null - }); - else assert$5(false); - } - function makeAppropriateNetworkError$1(fetchParams, err = null) { - assert$5(isCancelled$1(fetchParams)); - return isAborted$1(fetchParams) ? makeNetworkError$1(Object.assign(new DOMException$4("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError$1(Object.assign(new DOMException$4("Request was cancelled."), { cause: err })); - } - function initializeResponse(response, init, body) { - if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); - if ("statusText" in init && init.statusText != null) { - if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); - } - if ("status" in init && init.status != null) response[kState$6].status = init.status; - if ("statusText" in init && init.statusText != null) response[kState$6].statusText = init.statusText; - if ("headers" in init && init.headers != null) fill(response[kHeaders$3], init.headers); - if (body) { - if (nullBodyStatus$1.includes(response.status)) throw webidl$9.errors.exception({ - header: "Response constructor", - message: "Invalid response status code " + response.status - }); - response[kState$6].body = body.body; - if (body.type != null && !response[kState$6].headersList.contains("Content-Type")) response[kState$6].headersList.append("content-type", body.type); - } - } - webidl$9.converters.ReadableStream = webidl$9.interfaceConverter(ReadableStream$1); - webidl$9.converters.FormData = webidl$9.interfaceConverter(FormData); - webidl$9.converters.URLSearchParams = webidl$9.interfaceConverter(URLSearchParams); - webidl$9.converters.XMLHttpRequestBodyInit = function(V) { - if (typeof V === "string") return webidl$9.converters.USVString(V); - if (isBlobLike$2(V)) return webidl$9.converters.Blob(V, { strict: false }); - if (types$2.isArrayBuffer(V) || types$2.isTypedArray(V) || types$2.isDataView(V)) return webidl$9.converters.BufferSource(V); - if (util$2.isFormDataLike(V)) return webidl$9.converters.FormData(V, { strict: false }); - if (V instanceof URLSearchParams) return webidl$9.converters.URLSearchParams(V); - return webidl$9.converters.DOMString(V); - }; - webidl$9.converters.BodyInit = function(V) { - if (V instanceof ReadableStream$1) return webidl$9.converters.ReadableStream(V); - if (V?.[Symbol.asyncIterator]) return V; - return webidl$9.converters.XMLHttpRequestBodyInit(V); - }; - webidl$9.converters.ResponseInit = webidl$9.dictionaryConverter([ - { - key: "status", - converter: webidl$9.converters["unsigned short"], - defaultValue: 200 - }, - { - key: "statusText", - converter: webidl$9.converters.ByteString, - defaultValue: "" - }, - { - key: "headers", - converter: webidl$9.converters.HeadersInit - } - ]); - module.exports = { - makeNetworkError: makeNetworkError$1, - makeResponse: makeResponse$1, - makeAppropriateNetworkError: makeAppropriateNetworkError$1, - filterResponse: filterResponse$1, - Response: Response$2, - cloneResponse: cloneResponse$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/request.js -var require_request = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/request.js"(exports, module) { - const { extractBody, mixinBody, cloneBody } = require_body(); - const { Headers: Headers$4, fill: fillHeaders, HeadersList } = require_headers(); - const { FinalizationRegistry } = require_dispatcher_weakref()(); - const util$1 = require_util$6(); - const { isValidHTTPToken, sameOrigin: sameOrigin$1, normalizeMethod, makePolicyContainer: makePolicyContainer$1, normalizeMethodRecord } = require_util$5(); - const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$3(); - const { kEnumerableProperty: kEnumerableProperty$5 } = util$1; - const { kHeaders: kHeaders$2, kSignal, kState: kState$5, kGuard: kGuard$2, kRealm: kRealm$2 } = require_symbols$3(); - const { webidl: webidl$8 } = require_webidl(); - const { getGlobalOrigin: getGlobalOrigin$1 } = require_global$1(); - const { URLSerializer: URLSerializer$2 } = require_dataURL(); - const { kHeadersList: kHeadersList$3, kConstruct: kConstruct$2 } = require_symbols$4(); - const assert$4 = __require("assert"); - const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("events"); - let TransformStream$1 = globalThis.TransformStream; - const kAbortController = Symbol("abortController"); - const requestFinalizer = new FinalizationRegistry(({ signal, abort: abort$1 }) => { - signal.removeEventListener("abort", abort$1); - }); - var Request$2 = class Request$2 { - constructor(input, init = {}) { - if (input === kConstruct$2) return; - webidl$8.argumentLengthCheck(arguments, 1, { header: "Request constructor" }); - input = webidl$8.converters.RequestInfo(input); - init = webidl$8.converters.RequestInit(init); - this[kRealm$2] = { settingsObject: { - baseUrl: getGlobalOrigin$1(), - get origin() { - return this.baseUrl?.origin; - }, - policyContainer: makePolicyContainer$1() - } }; - let request$1 = null; - let fallbackMode = null; - const baseUrl = this[kRealm$2].settingsObject.baseUrl; - let signal = null; - if (typeof input === "string") { - let parsedURL; - try { - parsedURL = new URL(input, baseUrl); - } catch (err) { - throw new TypeError("Failed to parse URL from " + input, { cause: err }); - } - if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); - request$1 = makeRequest$2({ urlList: [parsedURL] }); - fallbackMode = "cors"; - } else { - assert$4(input instanceof Request$2); - request$1 = input[kState$5]; - signal = input[kSignal]; - } - const origin = this[kRealm$2].settingsObject.origin; - let window = "client"; - if (request$1.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin$1(request$1.window, origin)) window = request$1.window; - if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); - if ("window" in init) window = "no-window"; - request$1 = makeRequest$2({ - method: request$1.method, - headersList: request$1.headersList, - unsafeRequest: request$1.unsafeRequest, - client: this[kRealm$2].settingsObject, - window, - priority: request$1.priority, - origin: request$1.origin, - referrer: request$1.referrer, - referrerPolicy: request$1.referrerPolicy, - mode: request$1.mode, - credentials: request$1.credentials, - cache: request$1.cache, - redirect: request$1.redirect, - integrity: request$1.integrity, - keepalive: request$1.keepalive, - reloadNavigation: request$1.reloadNavigation, - historyNavigation: request$1.historyNavigation, - urlList: [...request$1.urlList] - }); - const initHasKey = Object.keys(init).length !== 0; - if (initHasKey) { - if (request$1.mode === "navigate") request$1.mode = "same-origin"; - request$1.reloadNavigation = false; - request$1.historyNavigation = false; - request$1.origin = "client"; - request$1.referrer = "client"; - request$1.referrerPolicy = ""; - request$1.url = request$1.urlList[request$1.urlList.length - 1]; - request$1.urlList = [request$1.url]; - } - if (init.referrer !== void 0) { - const referrer = init.referrer; - if (referrer === "") request$1.referrer = "no-referrer"; - else { - let parsedReferrer; - try { - parsedReferrer = new URL(referrer, baseUrl); - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); - } - if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin$1(parsedReferrer, this[kRealm$2].settingsObject.baseUrl)) request$1.referrer = "client"; - else request$1.referrer = parsedReferrer; - } - } - if (init.referrerPolicy !== void 0) request$1.referrerPolicy = init.referrerPolicy; - let mode; - if (init.mode !== void 0) mode = init.mode; - else mode = fallbackMode; - if (mode === "navigate") throw webidl$8.errors.exception({ - header: "Request constructor", - message: "invalid request mode navigate." - }); - if (mode != null) request$1.mode = mode; - if (init.credentials !== void 0) request$1.credentials = init.credentials; - if (init.cache !== void 0) request$1.cache = init.cache; - if (request$1.cache === "only-if-cached" && request$1.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); - if (init.redirect !== void 0) request$1.redirect = init.redirect; - if (init.integrity != null) request$1.integrity = String(init.integrity); - if (init.keepalive !== void 0) request$1.keepalive = Boolean(init.keepalive); - if (init.method !== void 0) { - let method = init.method; - if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); - if (forbiddenMethodsSet.has(method.toUpperCase())) throw new TypeError(`'${method}' HTTP method is unsupported.`); - method = normalizeMethodRecord[method] ?? normalizeMethod(method); - request$1.method = method; - } - if (init.signal !== void 0) signal = init.signal; - this[kState$5] = request$1; - const ac = new AbortController(); - this[kSignal] = ac.signal; - this[kSignal][kRealm$2] = this[kRealm$2]; - if (signal != null) { - if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); - if (signal.aborted) ac.abort(signal.reason); - else { - this[kAbortController] = ac; - const acRef = new WeakRef(ac); - const abort$1 = function() { - const ac$1 = acRef.deref(); - if (ac$1 !== void 0) ac$1.abort(this.reason); - }; - try { - if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(100, signal); - else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(100, signal); - } catch {} - util$1.addAbortListener(signal, abort$1); - requestFinalizer.register(ac, { - signal, - abort: abort$1 - }); - } - } - this[kHeaders$2] = new Headers$4(kConstruct$2); - this[kHeaders$2][kHeadersList$3] = request$1.headersList; - this[kHeaders$2][kGuard$2] = "request"; - this[kHeaders$2][kRealm$2] = this[kRealm$2]; - if (mode === "no-cors") { - if (!corsSafeListedMethodsSet.has(request$1.method)) throw new TypeError(`'${request$1.method} is unsupported in no-cors mode.`); - this[kHeaders$2][kGuard$2] = "request-no-cors"; - } - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = this[kHeaders$2][kHeadersList$3]; - const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); - headersList.clear(); - if (headers instanceof HeadersList) { - for (const [key, val] of headers) headersList.append(key, val); - headersList.cookies = headers.cookies; - } else fillHeaders(this[kHeaders$2], headers); - } - const inputBody = input instanceof Request$2 ? input[kState$5].body : null; - if ((init.body != null || inputBody != null) && (request$1.method === "GET" || request$1.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); - let initBody = null; - if (init.body != null) { - const [extractedBody, contentType] = extractBody(init.body, request$1.keepalive); - initBody = extractedBody; - if (contentType && !this[kHeaders$2][kHeadersList$3].contains("content-type")) this[kHeaders$2].append("content-type", contentType); - } - const inputOrInitBody = initBody ?? inputBody; - if (inputOrInitBody != null && inputOrInitBody.source == null) { - if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); - if (request$1.mode !== "same-origin" && request$1.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); - request$1.useCORSPreflightFlag = true; - } - let finalBody = inputOrInitBody; - if (initBody == null && inputBody != null) { - if (util$1.isDisturbed(inputBody.stream) || inputBody.stream.locked) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); - if (!TransformStream$1) TransformStream$1 = __require("stream/web").TransformStream; - const identityTransform = new TransformStream$1(); - inputBody.stream.pipeThrough(identityTransform); - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - }; - } - this[kState$5].body = finalBody; - } - get method() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].method; - } - get url() { - webidl$8.brandCheck(this, Request$2); - return URLSerializer$2(this[kState$5].url); - } - get headers() { - webidl$8.brandCheck(this, Request$2); - return this[kHeaders$2]; - } - get destination() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].destination; - } - get referrer() { - webidl$8.brandCheck(this, Request$2); - if (this[kState$5].referrer === "no-referrer") return ""; - if (this[kState$5].referrer === "client") return "about:client"; - return this[kState$5].referrer.toString(); - } - get referrerPolicy() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].referrerPolicy; - } - get mode() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].mode; - } - get credentials() { - return this[kState$5].credentials; - } - get cache() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].cache; - } - get redirect() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].redirect; - } - get integrity() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].integrity; - } - get keepalive() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].keepalive; - } - get isReloadNavigation() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].reloadNavigation; - } - get isHistoryNavigation() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].historyNavigation; - } - get signal() { - webidl$8.brandCheck(this, Request$2); - return this[kSignal]; - } - get body() { - webidl$8.brandCheck(this, Request$2); - return this[kState$5].body ? this[kState$5].body.stream : null; - } - get bodyUsed() { - webidl$8.brandCheck(this, Request$2); - return !!this[kState$5].body && util$1.isDisturbed(this[kState$5].body.stream); - } - get duplex() { - webidl$8.brandCheck(this, Request$2); - return "half"; - } - clone() { - webidl$8.brandCheck(this, Request$2); - if (this.bodyUsed || this.body?.locked) throw new TypeError("unusable"); - const clonedRequest = cloneRequest(this[kState$5]); - const clonedRequestObject = new Request$2(kConstruct$2); - clonedRequestObject[kState$5] = clonedRequest; - clonedRequestObject[kRealm$2] = this[kRealm$2]; - clonedRequestObject[kHeaders$2] = new Headers$4(kConstruct$2); - clonedRequestObject[kHeaders$2][kHeadersList$3] = clonedRequest.headersList; - clonedRequestObject[kHeaders$2][kGuard$2] = this[kHeaders$2][kGuard$2]; - clonedRequestObject[kHeaders$2][kRealm$2] = this[kHeaders$2][kRealm$2]; - const ac = new AbortController(); - if (this.signal.aborted) ac.abort(this.signal.reason); - else util$1.addAbortListener(this.signal, () => { - ac.abort(this.signal.reason); - }); - clonedRequestObject[kSignal] = ac.signal; - return clonedRequestObject; - } - }; - mixinBody(Request$2); - function makeRequest$2(init) { - const request$1 = { - method: "GET", - localURLsOnly: false, - unsafeRequest: false, - body: null, - client: null, - reservedClient: null, - replacesClientId: "", - window: "client", - keepalive: false, - serviceWorkers: "all", - initiator: "", - destination: "", - priority: null, - origin: "client", - policyContainer: "client", - referrer: "client", - referrerPolicy: "", - mode: "no-cors", - useCORSPreflightFlag: false, - credentials: "same-origin", - useCredentials: false, - cache: "default", - redirect: "follow", - integrity: "", - cryptoGraphicsNonceMetadata: "", - parserMetadata: "", - reloadNavigation: false, - historyNavigation: false, - userActivation: false, - taintedOrigin: false, - redirectCount: 0, - responseTainting: "basic", - preventNoCacheCacheControlHeaderModification: false, - done: false, - timingAllowFailed: false, - ...init, - headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() - }; - request$1.url = request$1.urlList[0]; - return request$1; - } - function cloneRequest(request$1) { - const newRequest = makeRequest$2({ - ...request$1, - body: null - }); - if (request$1.body != null) newRequest.body = cloneBody(request$1.body); - return newRequest; - } - Object.defineProperties(Request$2.prototype, { - method: kEnumerableProperty$5, - url: kEnumerableProperty$5, - headers: kEnumerableProperty$5, - redirect: kEnumerableProperty$5, - clone: kEnumerableProperty$5, - signal: kEnumerableProperty$5, - duplex: kEnumerableProperty$5, - destination: kEnumerableProperty$5, - body: kEnumerableProperty$5, - bodyUsed: kEnumerableProperty$5, - isHistoryNavigation: kEnumerableProperty$5, - isReloadNavigation: kEnumerableProperty$5, - keepalive: kEnumerableProperty$5, - integrity: kEnumerableProperty$5, - cache: kEnumerableProperty$5, - credentials: kEnumerableProperty$5, - attribute: kEnumerableProperty$5, - referrerPolicy: kEnumerableProperty$5, - referrer: kEnumerableProperty$5, - mode: kEnumerableProperty$5, - [Symbol.toStringTag]: { - value: "Request", - configurable: true - } - }); - webidl$8.converters.Request = webidl$8.interfaceConverter(Request$2); - webidl$8.converters.RequestInfo = function(V) { - if (typeof V === "string") return webidl$8.converters.USVString(V); - if (V instanceof Request$2) return webidl$8.converters.Request(V); - return webidl$8.converters.USVString(V); - }; - webidl$8.converters.AbortSignal = webidl$8.interfaceConverter(AbortSignal); - webidl$8.converters.RequestInit = webidl$8.dictionaryConverter([ - { - key: "method", - converter: webidl$8.converters.ByteString - }, - { - key: "headers", - converter: webidl$8.converters.HeadersInit - }, - { - key: "body", - converter: webidl$8.nullableConverter(webidl$8.converters.BodyInit) - }, - { - key: "referrer", - converter: webidl$8.converters.USVString - }, - { - key: "referrerPolicy", - converter: webidl$8.converters.DOMString, - allowedValues: referrerPolicy - }, - { - key: "mode", - converter: webidl$8.converters.DOMString, - allowedValues: requestMode - }, - { - key: "credentials", - converter: webidl$8.converters.DOMString, - allowedValues: requestCredentials - }, - { - key: "cache", - converter: webidl$8.converters.DOMString, - allowedValues: requestCache - }, - { - key: "redirect", - converter: webidl$8.converters.DOMString, - allowedValues: requestRedirect - }, - { - key: "integrity", - converter: webidl$8.converters.DOMString - }, - { - key: "keepalive", - converter: webidl$8.converters.boolean - }, - { - key: "signal", - converter: webidl$8.nullableConverter((signal) => webidl$8.converters.AbortSignal(signal, { strict: false })) - }, - { - key: "window", - converter: webidl$8.converters.any - }, - { - key: "duplex", - converter: webidl$8.converters.DOMString, - allowedValues: requestDuplex - } - ]); - module.exports = { - Request: Request$2, - makeRequest: makeRequest$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/index.js -var require_fetch = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/index.js"(exports, module) { - const { Response: Response$1, makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse } = require_response(); - const { Headers: Headers$3 } = require_headers(); - const { Request: Request$1, makeRequest: makeRequest$1 } = require_request(); - const zlib = __require("zlib"); - const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise: createDeferredPromise$1, isBlobLike: isBlobLike$1, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$1, urlHasHttpsScheme } = require_util$5(); - const { kState: kState$4, kHeaders: kHeaders$1, kGuard: kGuard$1, kRealm: kRealm$1 } = require_symbols$3(); - const assert$3 = __require("assert"); - const { safelyExtractBody } = require_body(); - const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet, DOMException: DOMException$3 } = require_constants$3(); - const { kHeadersList: kHeadersList$2 } = require_symbols$4(); - const EE = __require("events"); - const { Readable, pipeline } = __require("stream"); - const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require_util$6(); - const { dataURLProcessor, serializeAMimeType: serializeAMimeType$1 } = require_dataURL(); - const { TransformStream } = __require("stream/web"); - const { getGlobalDispatcher: getGlobalDispatcher$4 } = require_global(); - const { webidl: webidl$7 } = require_webidl(); - const { STATUS_CODES } = __require("http"); - const GET_OR_HEAD = ["GET", "HEAD"]; - /** @type {import('buffer').resolveObjectURL} */ - let resolveObjectURL; - let ReadableStream = globalThis.ReadableStream; - var Fetch = class extends EE { - constructor(dispatcher) { - super(); - this.dispatcher = dispatcher; - this.connection = null; - this.dump = false; - this.state = "ongoing"; - this.setMaxListeners(21); - } - terminate(reason) { - if (this.state !== "ongoing") return; - this.state = "terminated"; - this.connection?.destroy(reason); - this.emit("terminated", reason); - } - abort(error$1) { - if (this.state !== "ongoing") return; - this.state = "aborted"; - if (!error$1) error$1 = new DOMException$3("The operation was aborted.", "AbortError"); - this.serializedAbortReason = error$1; - this.connection?.destroy(error$1); - this.emit("terminated", error$1); - } - }; - function fetch(input, init = {}) { - webidl$7.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); - const p = createDeferredPromise$1(); - let requestObject; - try { - requestObject = new Request$1(input, init); - } catch (e) { - p.reject(e); - return p.promise; - } - const request$1 = requestObject[kState$4]; - if (requestObject.signal.aborted) { - abortFetch(p, request$1, null, requestObject.signal.reason); - return p.promise; - } - const globalObject = request$1.client.globalObject; - if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request$1.serviceWorkers = "none"; - let responseObject = null; - const relevantRealm = null; - let locallyAborted = false; - let controller = null; - addAbortListener(requestObject.signal, () => { - locallyAborted = true; - assert$3(controller != null); - controller.abort(requestObject.signal.reason); - abortFetch(p, request$1, responseObject, requestObject.signal.reason); - }); - const handleFetchDone = (response) => finalizeAndReportTiming(response, "fetch"); - const processResponse = (response) => { - if (locallyAborted) return Promise.resolve(); - if (response.aborted) { - abortFetch(p, request$1, responseObject, controller.serializedAbortReason); - return Promise.resolve(); - } - if (response.type === "error") { - p.reject(Object.assign(new TypeError("fetch failed"), { cause: response.error })); - return Promise.resolve(); - } - responseObject = new Response$1(); - responseObject[kState$4] = response; - responseObject[kRealm$1] = relevantRealm; - responseObject[kHeaders$1][kHeadersList$2] = response.headersList; - responseObject[kHeaders$1][kGuard$1] = "immutable"; - responseObject[kHeaders$1][kRealm$1] = relevantRealm; - p.resolve(responseObject); - }; - controller = fetching$2({ - request: request$1, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: init.dispatcher ?? getGlobalDispatcher$4() - }); - return p.promise; - } - function finalizeAndReportTiming(response, initiatorType = "other") { - if (response.type === "error" && response.aborted) return; - if (!response.urlList?.length) return; - const originalURL = response.urlList[0]; - let timingInfo = response.timingInfo; - let cacheState = response.cacheState; - if (!urlIsHttpHttpsScheme$1(originalURL)) return; - if (timingInfo === null) return; - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); - cacheState = ""; - } - timingInfo.endTime = coarsenedSharedCurrentTime(); - response.timingInfo = timingInfo; - markResourceTiming(timingInfo, originalURL, initiatorType, globalThis, cacheState); - } - function markResourceTiming(timingInfo, originalURL, initiatorType, globalThis$1, cacheState) { - if (nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 2) performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis$1, cacheState); - } - function abortFetch(p, request$1, responseObject, error$1) { - if (!error$1) error$1 = new DOMException$3("The operation was aborted.", "AbortError"); - p.reject(error$1); - if (request$1.body != null && isReadable(request$1.body?.stream)) request$1.body.stream.cancel(error$1).catch((err) => { - if (err.code === "ERR_INVALID_STATE") return; - throw err; - }); - if (responseObject == null) return; - const response = responseObject[kState$4]; - if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error$1).catch((err) => { - if (err.code === "ERR_INVALID_STATE") return; - throw err; - }); - } - function fetching$2({ request: request$1, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher }) { - let taskDestination = null; - let crossOriginIsolatedCapability = false; - if (request$1.client != null) { - taskDestination = request$1.client.globalObject; - crossOriginIsolatedCapability = request$1.client.crossOriginIsolatedCapability; - } - const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); - const timingInfo = createOpaqueTimingInfo({ startTime: currenTime }); - const fetchParams = { - controller: new Fetch(dispatcher), - request: request$1, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - }; - assert$3(!request$1.body || request$1.body.stream); - if (request$1.window === "client") request$1.window = request$1.client?.globalObject?.constructor?.name === "Window" ? request$1.client : "no-window"; - if (request$1.origin === "client") request$1.origin = request$1.client?.origin; - if (request$1.policyContainer === "client") if (request$1.client != null) request$1.policyContainer = clonePolicyContainer(request$1.client.policyContainer); - else request$1.policyContainer = makePolicyContainer(); - if (!request$1.headersList.contains("accept")) { - const value = "*/*"; - request$1.headersList.append("accept", value); - } - if (!request$1.headersList.contains("accept-language")) request$1.headersList.append("accept-language", "*"); - if (request$1.priority === null) {} - if (subresourceSet.has(request$1.destination)) {} - mainFetch(fetchParams).catch((err) => { - fetchParams.controller.terminate(err); - }); - return fetchParams.controller; - } - async function mainFetch(fetchParams, recursive = false) { - const request$1 = fetchParams.request; - let response = null; - if (request$1.localURLsOnly && !urlIsLocal(requestCurrentURL(request$1))) response = makeNetworkError("local URLs only"); - tryUpgradeRequestToAPotentiallyTrustworthyURL(request$1); - if (requestBadPort(request$1) === "blocked") response = makeNetworkError("bad port"); - if (request$1.referrerPolicy === "") request$1.referrerPolicy = request$1.policyContainer.referrerPolicy; - if (request$1.referrer !== "no-referrer") request$1.referrer = determineRequestsReferrer(request$1); - if (response === null) response = await (async () => { - const currentURL = requestCurrentURL(request$1); - if (sameOrigin(currentURL, request$1.url) && request$1.responseTainting === "basic" || currentURL.protocol === "data:" || request$1.mode === "navigate" || request$1.mode === "websocket") { - request$1.responseTainting = "basic"; - return await schemeFetch(fetchParams); - } - if (request$1.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); - if (request$1.mode === "no-cors") { - if (request$1.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); - request$1.responseTainting = "opaque"; - return await schemeFetch(fetchParams); - } - if (!urlIsHttpHttpsScheme$1(requestCurrentURL(request$1))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); - request$1.responseTainting = "cors"; - return await httpFetch(fetchParams); - })(); - if (recursive) return response; - if (response.status !== 0 && !response.internalResponse) { - if (request$1.responseTainting === "cors") {} - if (request$1.responseTainting === "basic") response = filterResponse(response, "basic"); - else if (request$1.responseTainting === "cors") response = filterResponse(response, "cors"); - else if (request$1.responseTainting === "opaque") response = filterResponse(response, "opaque"); - else assert$3(false); - } - let internalResponse = response.status === 0 ? response : response.internalResponse; - if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request$1.urlList); - if (!request$1.timingAllowFailed) response.timingAllowPassed = true; - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request$1.headers.contains("range")) response = internalResponse = makeNetworkError(); - if (response.status !== 0 && (request$1.method === "HEAD" || request$1.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { - internalResponse.body = null; - fetchParams.controller.dump = true; - } - if (request$1.integrity) { - const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); - if (request$1.responseTainting === "opaque" || response.body == null) { - processBodyError(response.error); - return; - } - const processBody = (bytes) => { - if (!bytesMatch(bytes, request$1.integrity)) { - processBodyError("integrity mismatch"); - return; - } - response.body = safelyExtractBody(bytes)[0]; - fetchFinale(fetchParams, response); - }; - await fullyReadBody(response.body, processBody, processBodyError); - } else fetchFinale(fetchParams, response); - } - function schemeFetch(fetchParams) { - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); - const { request: request$1 } = fetchParams; - const { protocol: scheme } = requestCurrentURL(request$1); - switch (scheme) { - case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); - case "blob:": { - if (!resolveObjectURL) resolveObjectURL = __require("buffer").resolveObjectURL; - const blobURLEntry = requestCurrentURL(request$1); - if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); - const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()); - if (request$1.method !== "GET" || !isBlobLike$1(blobURLEntryObject)) return Promise.resolve(makeNetworkError("invalid method")); - const bodyWithType = safelyExtractBody(blobURLEntryObject); - const body = bodyWithType[0]; - const length = isomorphicEncode(`${body.length}`); - const type = bodyWithType[1] ?? ""; - const response = makeResponse({ - statusText: "OK", - headersList: [["content-length", { - name: "Content-Length", - value: length - }], ["content-type", { - name: "Content-Type", - value: type - }]] - }); - response.body = body; - return Promise.resolve(response); - } - case "data:": { - const currentURL = requestCurrentURL(request$1); - const dataURLStruct = dataURLProcessor(currentURL); - if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); - const mimeType = serializeAMimeType$1(dataURLStruct.mimeType); - return Promise.resolve(makeResponse({ - statusText: "OK", - headersList: [["content-type", { - name: "Content-Type", - value: mimeType - }]], - body: safelyExtractBody(dataURLStruct.body)[0] - })); - } - case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); - case "http:": - case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); - default: return Promise.resolve(makeNetworkError("unknown scheme")); - } - } - function finalizeResponse(fetchParams, response) { - fetchParams.request.done = true; - if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); - } - function fetchFinale(fetchParams, response) { - if (response.type === "error") { - response.urlList = [fetchParams.request.urlList[0]]; - response.timingInfo = createOpaqueTimingInfo({ startTime: fetchParams.timingInfo.startTime }); - } - const processResponseEndOfBody = () => { - fetchParams.request.done = true; - if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); - }; - if (fetchParams.processResponse != null) queueMicrotask(() => fetchParams.processResponse(response)); - if (response.body == null) processResponseEndOfBody(); - else { - const identityTransformAlgorithm = (chunk, controller) => { - controller.enqueue(chunk); - }; - const transformStream = new TransformStream({ - start() {}, - transform: identityTransformAlgorithm, - flush: processResponseEndOfBody - }, { size() { - return 1; - } }, { size() { - return 1; - } }); - response.body = { stream: response.body.stream.pipeThrough(transformStream) }; - } - if (fetchParams.processResponseConsumeBody != null) { - const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes); - const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure); - if (response.body == null) queueMicrotask(() => processBody(null)); - else return fullyReadBody(response.body, processBody, processBodyError); - return Promise.resolve(); - } - } - async function httpFetch(fetchParams) { - const request$1 = fetchParams.request; - let response = null; - let actualResponse = null; - const timingInfo = fetchParams.timingInfo; - if (request$1.serviceWorkers === "all") {} - if (response === null) { - if (request$1.redirect === "follow") request$1.serviceWorkers = "none"; - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); - if (request$1.responseTainting === "cors" && corsCheck(request$1, response) === "failure") return makeNetworkError("cors failure"); - if (TAOCheck(request$1, response) === "failure") request$1.timingAllowFailed = true; - } - if ((request$1.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request$1.origin, request$1.client, request$1.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); - if (redirectStatusSet.has(actualResponse.status)) { - if (request$1.redirect !== "manual") fetchParams.controller.connection.destroy(); - if (request$1.redirect === "error") response = makeNetworkError("unexpected redirect"); - else if (request$1.redirect === "manual") response = actualResponse; - else if (request$1.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); - else assert$3(false); - } - response.timingInfo = timingInfo; - return response; - } - function httpRedirectFetch(fetchParams, response) { - const request$1 = fetchParams.request; - const actualResponse = response.internalResponse ? response.internalResponse : response; - let locationURL; - try { - locationURL = responseLocationURL(actualResponse, requestCurrentURL(request$1).hash); - if (locationURL == null) return response; - } catch (err) { - return Promise.resolve(makeNetworkError(err)); - } - if (!urlIsHttpHttpsScheme$1(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); - if (request$1.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); - request$1.redirectCount += 1; - if (request$1.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request$1, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); - if (request$1.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); - if (actualResponse.status !== 303 && request$1.body != null && request$1.body.source == null) return Promise.resolve(makeNetworkError()); - if ([301, 302].includes(actualResponse.status) && request$1.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request$1.method)) { - request$1.method = "GET"; - request$1.body = null; - for (const headerName of requestBodyHeader) request$1.headersList.delete(headerName); - } - if (!sameOrigin(requestCurrentURL(request$1), locationURL)) { - request$1.headersList.delete("authorization"); - request$1.headersList.delete("proxy-authorization", true); - request$1.headersList.delete("cookie"); - request$1.headersList.delete("host"); - } - if (request$1.body != null) { - assert$3(request$1.body.source != null); - request$1.body = safelyExtractBody(request$1.body.source)[0]; - } - const timingInfo = fetchParams.timingInfo; - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); - if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; - request$1.urlList.push(locationURL); - setRequestReferrerPolicyOnRedirect(request$1, actualResponse); - return mainFetch(fetchParams, true); - } - async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - const request$1 = fetchParams.request; - let httpFetchParams = null; - let httpRequest = null; - let response = null; - const httpCache = null; - const revalidatingFlag = false; - if (request$1.window === "no-window" && request$1.redirect === "error") { - httpFetchParams = fetchParams; - httpRequest = request$1; - } else { - httpRequest = makeRequest$1(request$1); - httpFetchParams = { ...fetchParams }; - httpFetchParams.request = httpRequest; - } - const includeCredentials = request$1.credentials === "include" || request$1.credentials === "same-origin" && request$1.responseTainting === "basic"; - const contentLength = httpRequest.body ? httpRequest.body.length : null; - let contentLengthHeaderValue = null; - if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; - if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); - if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue); - if (contentLength != null && httpRequest.keepalive) {} - if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href)); - appendRequestOriginHeader(httpRequest); - appendFetchMetadata(httpRequest); - if (!httpRequest.headersList.contains("user-agent")) httpRequest.headersList.append("user-agent", typeof esbuildDetection === "undefined" ? "undici" : "node"); - if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since") || httpRequest.headersList.contains("if-none-match") || httpRequest.headersList.contains("if-unmodified-since") || httpRequest.headersList.contains("if-match") || httpRequest.headersList.contains("if-range"))) httpRequest.cache = "no-store"; - if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "max-age=0"); - if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { - if (!httpRequest.headersList.contains("pragma")) httpRequest.headersList.append("pragma", "no-cache"); - if (!httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "no-cache"); - } - if (httpRequest.headersList.contains("range")) httpRequest.headersList.append("accept-encoding", "identity"); - if (!httpRequest.headersList.contains("accept-encoding")) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate"); - else httpRequest.headersList.append("accept-encoding", "gzip, deflate"); - httpRequest.headersList.delete("host"); - if (includeCredentials) {} - if (httpCache == null) httpRequest.cache = "no-store"; - if (httpRequest.mode !== "no-store" && httpRequest.mode !== "reload") {} - if (response == null) { - if (httpRequest.mode === "only-if-cached") return makeNetworkError("only if cached"); - const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); - if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} - if (revalidatingFlag && forwardResponse.status === 304) {} - if (response == null) response = forwardResponse; - } - response.urlList = [...httpRequest.urlList]; - if (httpRequest.headersList.contains("range")) response.rangeRequested = true; - response.requestIncludesCredentials = includeCredentials; - if (response.status === 407) { - if (request$1.window === "no-window") return makeNetworkError(); - if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); - return makeNetworkError("proxy authentication required"); - } - if (response.status === 421 && !isNewConnectionFetch && (request$1.body == null || request$1.body.source != null)) { - if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); - fetchParams.controller.connection.destroy(); - response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); - } - if (isAuthenticationFetch) {} - return response; - } - async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert$3(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy(err) { - if (!this.destroyed) { - this.destroyed = true; - this.abort?.(err ?? new DOMException$3("The operation was aborted.", "AbortError")); - } - } - }; - const request$1 = fetchParams.request; - let response = null; - const timingInfo = fetchParams.timingInfo; - const httpCache = null; - if (httpCache == null) request$1.cache = "no-store"; - const newConnection = forceNewConnection ? "yes" : "no"; - if (request$1.mode === "websocket") {} - let requestBody = null; - if (request$1.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); - else if (request$1.body != null) { - const processBodyChunk = async function* (bytes) { - if (isCancelled(fetchParams)) return; - yield bytes; - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); - }; - const processEndOfBody = () => { - if (isCancelled(fetchParams)) return; - if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); - }; - const processBodyError = (e) => { - if (isCancelled(fetchParams)) return; - if (e.name === "AbortError") fetchParams.controller.abort(); - else fetchParams.controller.terminate(e); - }; - requestBody = async function* () { - try { - for await (const bytes of request$1.body.stream) yield* processBodyChunk(bytes); - processEndOfBody(); - } catch (err) { - processBodyError(err); - } - }(); - } - try { - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); - if (socket) response = makeResponse({ - status, - statusText, - headersList, - socket - }); - else { - const iterator = body[Symbol.asyncIterator](); - fetchParams.controller.next = () => iterator.next(); - response = makeResponse({ - status, - statusText, - headersList - }); - } - } catch (err) { - if (err.name === "AbortError") { - fetchParams.controller.connection.destroy(); - return makeAppropriateNetworkError(fetchParams, err); - } - return makeNetworkError(err); - } - const pullAlgorithm = () => { - fetchParams.controller.resume(); - }; - const cancelAlgorithm = (reason) => { - fetchParams.controller.abort(reason); - }; - if (!ReadableStream) ReadableStream = __require("stream/web").ReadableStream; - const stream$2 = new ReadableStream({ - async start(controller) { - fetchParams.controller.controller = controller; - }, - async pull(controller) { - await pullAlgorithm(controller); - }, - async cancel(reason) { - await cancelAlgorithm(reason); - } - }, { - highWaterMark: 0, - size() { - return 1; - } - }); - response.body = { stream: stream$2 }; - fetchParams.controller.on("terminated", onAborted); - fetchParams.controller.resume = async () => { - while (true) { - let bytes; - let isFailure; - try { - const { done, value } = await fetchParams.controller.next(); - if (isAborted(fetchParams)) break; - bytes = done ? void 0 : value; - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; - else { - bytes = err; - isFailure = true; - } - } - if (bytes === void 0) { - readableStreamClose(fetchParams.controller.controller); - finalizeResponse(fetchParams, response); - return; - } - timingInfo.decodedBodySize += bytes?.byteLength ?? 0; - if (isFailure) { - fetchParams.controller.terminate(bytes); - return; - } - fetchParams.controller.controller.enqueue(new Uint8Array(bytes)); - if (isErrored(stream$2)) { - fetchParams.controller.terminate(); - return; - } - if (!fetchParams.controller.controller.desiredSize) return; - } - }; - function onAborted(reason) { - if (isAborted(fetchParams)) { - response.aborted = true; - if (isReadable(stream$2)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); - } else if (isReadable(stream$2)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); - fetchParams.controller.connection.destroy(); - } - return response; - async function dispatch({ body }) { - const url = requestCurrentURL(request$1); - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher; - return new Promise((resolve, reject) => agent.dispatch({ - path: url.pathname + url.search, - origin: url.origin, - method: request$1.method, - body: fetchParams.controller.dispatcher.isMockActive ? request$1.body && (request$1.body.source || request$1.body.stream) : body, - headers: request$1.headersList.entries, - maxRedirections: 0, - upgrade: request$1.mode === "websocket" ? "websocket" : void 0 - }, { - body: null, - abort: null, - onConnect(abort$1) { - const { connection } = fetchParams.controller; - if (connection.destroyed) abort$1(new DOMException$3("The operation was aborted.", "AbortError")); - else { - fetchParams.controller.on("terminated", abort$1); - this.abort = connection.abort = abort$1; - } - }, - onHeaders(status, headersList, resume$1, statusText) { - if (status < 200) return; - let codings = []; - let location = ""; - const headers = new Headers$3(); - if (Array.isArray(headersList)) for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - if (key.toLowerCase() === "content-encoding") codings = val.toLowerCase().split(",").map((x) => x.trim()); - else if (key.toLowerCase() === "location") location = val; - headers[kHeadersList$2].append(key, val); - } - else { - const keys = Object.keys(headersList); - for (const key of keys) { - const val = headersList[key]; - if (key.toLowerCase() === "content-encoding") codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); - else if (key.toLowerCase() === "location") location = val; - headers[kHeadersList$2].append(key, val); - } - } - this.body = new Readable({ read: resume$1 }); - const decoders$1 = []; - const willFollow = request$1.redirect === "follow" && location && redirectStatusSet.has(status); - if (request$1.method !== "HEAD" && request$1.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) for (const coding of codings) if (coding === "x-gzip" || coding === "gzip") decoders$1.push(zlib.createGunzip({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })); - else if (coding === "deflate") decoders$1.push(zlib.createInflate()); - else if (coding === "br") decoders$1.push(zlib.createBrotliDecompress()); - else { - decoders$1.length = 0; - break; - } - resolve({ - status, - statusText, - headersList: headers[kHeadersList$2], - body: decoders$1.length ? pipeline(this.body, ...decoders$1, () => {}) : this.body.on("error", () => {}) - }); - return true; - }, - onData(chunk) { - if (fetchParams.controller.dump) return; - const bytes = chunk; - timingInfo.encodedBodySize += bytes.byteLength; - return this.body.push(bytes); - }, - onComplete() { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - fetchParams.controller.ended = true; - this.body.push(null); - }, - onError(error$1) { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - this.body?.destroy(error$1); - fetchParams.controller.terminate(error$1); - reject(error$1); - }, - onUpgrade(status, headersList, socket) { - if (status !== 101) return; - const headers = new Headers$3(); - for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - headers[kHeadersList$2].append(key, val); - } - resolve({ - status, - statusText: STATUS_CODES[status], - headersList: headers[kHeadersList$2], - socket - }); - return true; - } - })); - } - } - module.exports = { - fetch, - Fetch, - fetching: fetching$2, - finalizeAndReportTiming - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js -var require_symbols$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js"(exports, module) { - module.exports = { - kState: Symbol("FileReader state"), - kResult: Symbol("FileReader result"), - kError: Symbol("FileReader error"), - kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), - kEvents: Symbol("FileReader events"), - kAborted: Symbol("FileReader aborted") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js -var require_progressevent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js"(exports, module) { - const { webidl: webidl$6 } = require_webidl(); - const kState$3 = Symbol("ProgressEvent state"); - /** - * @see https://xhr.spec.whatwg.org/#progressevent - */ - var ProgressEvent$1 = class ProgressEvent$1 extends Event { - constructor(type, eventInitDict = {}) { - type = webidl$6.converters.DOMString(type); - eventInitDict = webidl$6.converters.ProgressEventInit(eventInitDict ?? {}); - super(type, eventInitDict); - this[kState$3] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - }; - } - get lengthComputable() { - webidl$6.brandCheck(this, ProgressEvent$1); - return this[kState$3].lengthComputable; - } - get loaded() { - webidl$6.brandCheck(this, ProgressEvent$1); - return this[kState$3].loaded; - } - get total() { - webidl$6.brandCheck(this, ProgressEvent$1); - return this[kState$3].total; - } - }; - webidl$6.converters.ProgressEventInit = webidl$6.dictionaryConverter([ - { - key: "lengthComputable", - converter: webidl$6.converters.boolean, - defaultValue: false - }, - { - key: "loaded", - converter: webidl$6.converters["unsigned long long"], - defaultValue: 0 - }, - { - key: "total", - converter: webidl$6.converters["unsigned long long"], - defaultValue: 0 - }, - { - key: "bubbles", - converter: webidl$6.converters.boolean, - defaultValue: false - }, - { - key: "cancelable", - converter: webidl$6.converters.boolean, - defaultValue: false - }, - { - key: "composed", - converter: webidl$6.converters.boolean, - defaultValue: false - } - ]); - module.exports = { ProgressEvent: ProgressEvent$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js -var require_encoding = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js"(exports, module) { - /** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ - function getEncoding$1(label) { - if (!label) return "failure"; - switch (label.trim().toLowerCase()) { - case "unicode-1-1-utf-8": - case "unicode11utf8": - case "unicode20utf8": - case "utf-8": - case "utf8": - case "x-unicode20utf8": return "UTF-8"; - case "866": - case "cp866": - case "csibm866": - case "ibm866": return "IBM866"; - case "csisolatin2": - case "iso-8859-2": - case "iso-ir-101": - case "iso8859-2": - case "iso88592": - case "iso_8859-2": - case "iso_8859-2:1987": - case "l2": - case "latin2": return "ISO-8859-2"; - case "csisolatin3": - case "iso-8859-3": - case "iso-ir-109": - case "iso8859-3": - case "iso88593": - case "iso_8859-3": - case "iso_8859-3:1988": - case "l3": - case "latin3": return "ISO-8859-3"; - case "csisolatin4": - case "iso-8859-4": - case "iso-ir-110": - case "iso8859-4": - case "iso88594": - case "iso_8859-4": - case "iso_8859-4:1988": - case "l4": - case "latin4": return "ISO-8859-4"; - case "csisolatincyrillic": - case "cyrillic": - case "iso-8859-5": - case "iso-ir-144": - case "iso8859-5": - case "iso88595": - case "iso_8859-5": - case "iso_8859-5:1988": return "ISO-8859-5"; - case "arabic": - case "asmo-708": - case "csiso88596e": - case "csiso88596i": - case "csisolatinarabic": - case "ecma-114": - case "iso-8859-6": - case "iso-8859-6-e": - case "iso-8859-6-i": - case "iso-ir-127": - case "iso8859-6": - case "iso88596": - case "iso_8859-6": - case "iso_8859-6:1987": return "ISO-8859-6"; - case "csisolatingreek": - case "ecma-118": - case "elot_928": - case "greek": - case "greek8": - case "iso-8859-7": - case "iso-ir-126": - case "iso8859-7": - case "iso88597": - case "iso_8859-7": - case "iso_8859-7:1987": - case "sun_eu_greek": return "ISO-8859-7"; - case "csiso88598e": - case "csisolatinhebrew": - case "hebrew": - case "iso-8859-8": - case "iso-8859-8-e": - case "iso-ir-138": - case "iso8859-8": - case "iso88598": - case "iso_8859-8": - case "iso_8859-8:1988": - case "visual": return "ISO-8859-8"; - case "csiso88598i": - case "iso-8859-8-i": - case "logical": return "ISO-8859-8-I"; - case "csisolatin6": - case "iso-8859-10": - case "iso-ir-157": - case "iso8859-10": - case "iso885910": - case "l6": - case "latin6": return "ISO-8859-10"; - case "iso-8859-13": - case "iso8859-13": - case "iso885913": return "ISO-8859-13"; - case "iso-8859-14": - case "iso8859-14": - case "iso885914": return "ISO-8859-14"; - case "csisolatin9": - case "iso-8859-15": - case "iso8859-15": - case "iso885915": - case "iso_8859-15": - case "l9": return "ISO-8859-15"; - case "iso-8859-16": return "ISO-8859-16"; - case "cskoi8r": - case "koi": - case "koi8": - case "koi8-r": - case "koi8_r": return "KOI8-R"; - case "koi8-ru": - case "koi8-u": return "KOI8-U"; - case "csmacintosh": - case "mac": - case "macintosh": - case "x-mac-roman": return "macintosh"; - case "iso-8859-11": - case "iso8859-11": - case "iso885911": - case "tis-620": - case "windows-874": return "windows-874"; - case "cp1250": - case "windows-1250": - case "x-cp1250": return "windows-1250"; - case "cp1251": - case "windows-1251": - case "x-cp1251": return "windows-1251"; - case "ansi_x3.4-1968": - case "ascii": - case "cp1252": - case "cp819": - case "csisolatin1": - case "ibm819": - case "iso-8859-1": - case "iso-ir-100": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "iso_8859-1:1987": - case "l1": - case "latin1": - case "us-ascii": - case "windows-1252": - case "x-cp1252": return "windows-1252"; - case "cp1253": - case "windows-1253": - case "x-cp1253": return "windows-1253"; - case "cp1254": - case "csisolatin5": - case "iso-8859-9": - case "iso-ir-148": - case "iso8859-9": - case "iso88599": - case "iso_8859-9": - case "iso_8859-9:1989": - case "l5": - case "latin5": - case "windows-1254": - case "x-cp1254": return "windows-1254"; - case "cp1255": - case "windows-1255": - case "x-cp1255": return "windows-1255"; - case "cp1256": - case "windows-1256": - case "x-cp1256": return "windows-1256"; - case "cp1257": - case "windows-1257": - case "x-cp1257": return "windows-1257"; - case "cp1258": - case "windows-1258": - case "x-cp1258": return "windows-1258"; - case "x-mac-cyrillic": - case "x-mac-ukrainian": return "x-mac-cyrillic"; - case "chinese": - case "csgb2312": - case "csiso58gb231280": - case "gb2312": - case "gb_2312": - case "gb_2312-80": - case "gbk": - case "iso-ir-58": - case "x-gbk": return "GBK"; - case "gb18030": return "gb18030"; - case "big5": - case "big5-hkscs": - case "cn-big5": - case "csbig5": - case "x-x-big5": return "Big5"; - case "cseucpkdfmtjapanese": - case "euc-jp": - case "x-euc-jp": return "EUC-JP"; - case "csiso2022jp": - case "iso-2022-jp": return "ISO-2022-JP"; - case "csshiftjis": - case "ms932": - case "ms_kanji": - case "shift-jis": - case "shift_jis": - case "sjis": - case "windows-31j": - case "x-sjis": return "Shift_JIS"; - case "cseuckr": - case "csksc56011987": - case "euc-kr": - case "iso-ir-149": - case "korean": - case "ks_c_5601-1987": - case "ks_c_5601-1989": - case "ksc5601": - case "ksc_5601": - case "windows-949": return "EUC-KR"; - case "csiso2022kr": - case "hz-gb-2312": - case "iso-2022-cn": - case "iso-2022-cn-ext": - case "iso-2022-kr": - case "replacement": return "replacement"; - case "unicodefffe": - case "utf-16be": return "UTF-16BE"; - case "csunicode": - case "iso-10646-ucs-2": - case "ucs-2": - case "unicode": - case "unicodefeff": - case "utf-16": - case "utf-16le": return "UTF-16LE"; - case "x-user-defined": return "x-user-defined"; - default: return "failure"; - } - } - module.exports = { getEncoding: getEncoding$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/util.js -var require_util$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/util.js"(exports, module) { - const { kState: kState$2, kError: kError$1, kResult: kResult$1, kAborted: kAborted$1, kLastProgressEventFired } = require_symbols$2(); - const { ProgressEvent } = require_progressevent(); - const { getEncoding } = require_encoding(); - const { DOMException: DOMException$2 } = require_constants$3(); - const { serializeAMimeType, parseMIMEType } = require_dataURL(); - const { types: types$1 } = __require("util"); - const { StringDecoder } = __require("string_decoder"); - const { btoa } = __require("buffer"); - /** @type {PropertyDescriptor} */ - const staticPropertyDescriptors$3 = { - enumerable: true, - writable: false, - configurable: false - }; - /** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ - function readOperation$1(fr, blob, type, encodingName) { - if (fr[kState$2] === "loading") throw new DOMException$2("Invalid state", "InvalidStateError"); - fr[kState$2] = "loading"; - fr[kResult$1] = null; - fr[kError$1] = null; - /** @type {import('stream/web').ReadableStream} */ - const stream$2 = blob.stream(); - const reader = stream$2.getReader(); - /** @type {Uint8Array[]} */ - const bytes = []; - let chunkPromise = reader.read(); - let isFirstChunk = true; - (async () => { - while (!fr[kAborted$1]) try { - const { done, value } = await chunkPromise; - if (isFirstChunk && !fr[kAborted$1]) queueMicrotask(() => { - fireAProgressEvent$1("loadstart", fr); - }); - isFirstChunk = false; - if (!done && types$1.isUint8Array(value)) { - bytes.push(value); - if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted$1]) { - fr[kLastProgressEventFired] = Date.now(); - queueMicrotask(() => { - fireAProgressEvent$1("progress", fr); - }); - } - chunkPromise = reader.read(); - } else if (done) { - queueMicrotask(() => { - fr[kState$2] = "done"; - try { - const result = packageData(bytes, type, blob.type, encodingName); - if (fr[kAborted$1]) return; - fr[kResult$1] = result; - fireAProgressEvent$1("load", fr); - } catch (error$1) { - fr[kError$1] = error$1; - fireAProgressEvent$1("error", fr); - } - if (fr[kState$2] !== "loading") fireAProgressEvent$1("loadend", fr); - }); - break; - } - } catch (error$1) { - if (fr[kAborted$1]) return; - queueMicrotask(() => { - fr[kState$2] = "done"; - fr[kError$1] = error$1; - fireAProgressEvent$1("error", fr); - if (fr[kState$2] !== "loading") fireAProgressEvent$1("loadend", fr); - }); - break; - } - })(); - } - /** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ - function fireAProgressEvent$1(e, reader) { - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }); - reader.dispatchEvent(event); - } - /** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ - function packageData(bytes, type, mimeType, encodingName) { - switch (type) { - case "DataURL": { - let dataURL = "data:"; - const parsed = parseMIMEType(mimeType || "application/octet-stream"); - if (parsed !== "failure") dataURL += serializeAMimeType(parsed); - dataURL += ";base64,"; - const decoder = new StringDecoder("latin1"); - for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); - dataURL += btoa(decoder.end()); - return dataURL; - } - case "Text": { - let encoding = "failure"; - if (encodingName) encoding = getEncoding(encodingName); - if (encoding === "failure" && mimeType) { - const type$1 = parseMIMEType(mimeType); - if (type$1 !== "failure") encoding = getEncoding(type$1.parameters.get("charset")); - } - if (encoding === "failure") encoding = "UTF-8"; - return decode(bytes, encoding); - } - case "ArrayBuffer": { - const sequence = combineByteSequences(bytes); - return sequence.buffer; - } - case "BinaryString": { - let binaryString = ""; - const decoder = new StringDecoder("latin1"); - for (const chunk of bytes) binaryString += decoder.write(chunk); - binaryString += decoder.end(); - return binaryString; - } - } - } - /** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ - function decode(ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue); - const BOMEncoding = BOMSniffing(bytes); - let slice = 0; - if (BOMEncoding !== null) { - encoding = BOMEncoding; - slice = BOMEncoding === "UTF-8" ? 3 : 2; - } - const sliced = bytes.slice(slice); - return new TextDecoder(encoding).decode(sliced); - } - /** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ - function BOMSniffing(ioQueue) { - const [a, b, c] = ioQueue; - if (a === 239 && b === 187 && c === 191) return "UTF-8"; - else if (a === 254 && b === 255) return "UTF-16BE"; - else if (a === 255 && b === 254) return "UTF-16LE"; - return null; - } - /** - * @param {Uint8Array[]} sequences - */ - function combineByteSequences(sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength; - }, 0); - let offset = 0; - return sequences.reduce((a, b) => { - a.set(b, offset); - offset += b.byteLength; - return a; - }, new Uint8Array(size)); - } - module.exports = { - staticPropertyDescriptors: staticPropertyDescriptors$3, - readOperation: readOperation$1, - fireAProgressEvent: fireAProgressEvent$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js -var require_filereader = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js"(exports, module) { - const { staticPropertyDescriptors: staticPropertyDescriptors$2, readOperation, fireAProgressEvent } = require_util$3(); - const { kState: kState$1, kError, kResult, kEvents, kAborted } = require_symbols$2(); - const { webidl: webidl$5 } = require_webidl(); - const { kEnumerableProperty: kEnumerableProperty$4 } = require_util$6(); - var FileReader = class FileReader extends EventTarget { - constructor() { - super(); - this[kState$1] = "empty"; - this[kResult] = null; - this[kError] = null; - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - }; - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer(blob) { - webidl$5.brandCheck(this, FileReader); - webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsArrayBuffer" }); - blob = webidl$5.converters.Blob(blob, { strict: false }); - readOperation(this, blob, "ArrayBuffer"); - } - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString(blob) { - webidl$5.brandCheck(this, FileReader); - webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsBinaryString" }); - blob = webidl$5.converters.Blob(blob, { strict: false }); - readOperation(this, blob, "BinaryString"); - } - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText(blob, encoding = void 0) { - webidl$5.brandCheck(this, FileReader); - webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsText" }); - blob = webidl$5.converters.Blob(blob, { strict: false }); - if (encoding !== void 0) encoding = webidl$5.converters.DOMString(encoding); - readOperation(this, blob, "Text", encoding); - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL(blob) { - webidl$5.brandCheck(this, FileReader); - webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsDataURL" }); - blob = webidl$5.converters.Blob(blob, { strict: false }); - readOperation(this, blob, "DataURL"); - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort() { - if (this[kState$1] === "empty" || this[kState$1] === "done") { - this[kResult] = null; - return; - } - if (this[kState$1] === "loading") { - this[kState$1] = "done"; - this[kResult] = null; - } - this[kAborted] = true; - fireAProgressEvent("abort", this); - if (this[kState$1] !== "loading") fireAProgressEvent("loadend", this); - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState() { - webidl$5.brandCheck(this, FileReader); - switch (this[kState$1]) { - case "empty": return this.EMPTY; - case "loading": return this.LOADING; - case "done": return this.DONE; - } - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result() { - webidl$5.brandCheck(this, FileReader); - return this[kResult]; - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error() { - webidl$5.brandCheck(this, FileReader); - return this[kError]; - } - get onloadend() { - webidl$5.brandCheck(this, FileReader); - return this[kEvents].loadend; - } - set onloadend(fn) { - webidl$5.brandCheck(this, FileReader); - if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); - if (typeof fn === "function") { - this[kEvents].loadend = fn; - this.addEventListener("loadend", fn); - } else this[kEvents].loadend = null; - } - get onerror() { - webidl$5.brandCheck(this, FileReader); - return this[kEvents].error; - } - set onerror(fn) { - webidl$5.brandCheck(this, FileReader); - if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); - if (typeof fn === "function") { - this[kEvents].error = fn; - this.addEventListener("error", fn); - } else this[kEvents].error = null; - } - get onloadstart() { - webidl$5.brandCheck(this, FileReader); - return this[kEvents].loadstart; - } - set onloadstart(fn) { - webidl$5.brandCheck(this, FileReader); - if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); - if (typeof fn === "function") { - this[kEvents].loadstart = fn; - this.addEventListener("loadstart", fn); - } else this[kEvents].loadstart = null; - } - get onprogress() { - webidl$5.brandCheck(this, FileReader); - return this[kEvents].progress; - } - set onprogress(fn) { - webidl$5.brandCheck(this, FileReader); - if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); - if (typeof fn === "function") { - this[kEvents].progress = fn; - this.addEventListener("progress", fn); - } else this[kEvents].progress = null; - } - get onload() { - webidl$5.brandCheck(this, FileReader); - return this[kEvents].load; - } - set onload(fn) { - webidl$5.brandCheck(this, FileReader); - if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); - if (typeof fn === "function") { - this[kEvents].load = fn; - this.addEventListener("load", fn); - } else this[kEvents].load = null; - } - get onabort() { - webidl$5.brandCheck(this, FileReader); - return this[kEvents].abort; - } - set onabort(fn) { - webidl$5.brandCheck(this, FileReader); - if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); - if (typeof fn === "function") { - this[kEvents].abort = fn; - this.addEventListener("abort", fn); - } else this[kEvents].abort = null; - } - }; - FileReader.EMPTY = FileReader.prototype.EMPTY = 0; - FileReader.LOADING = FileReader.prototype.LOADING = 1; - FileReader.DONE = FileReader.prototype.DONE = 2; - Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors$2, - LOADING: staticPropertyDescriptors$2, - DONE: staticPropertyDescriptors$2, - readAsArrayBuffer: kEnumerableProperty$4, - readAsBinaryString: kEnumerableProperty$4, - readAsText: kEnumerableProperty$4, - readAsDataURL: kEnumerableProperty$4, - abort: kEnumerableProperty$4, - readyState: kEnumerableProperty$4, - result: kEnumerableProperty$4, - error: kEnumerableProperty$4, - onloadstart: kEnumerableProperty$4, - onprogress: kEnumerableProperty$4, - onload: kEnumerableProperty$4, - onabort: kEnumerableProperty$4, - onerror: kEnumerableProperty$4, - onloadend: kEnumerableProperty$4, - [Symbol.toStringTag]: { - value: "FileReader", - writable: false, - enumerable: false, - configurable: true - } - }); - Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors$2, - LOADING: staticPropertyDescriptors$2, - DONE: staticPropertyDescriptors$2 - }); - module.exports = { FileReader }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/symbols.js -var require_symbols$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/symbols.js"(exports, module) { - module.exports = { kConstruct: require_symbols$4().kConstruct }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/util.js -var require_util$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/util.js"(exports, module) { - const assert$2 = __require("assert"); - const { URLSerializer: URLSerializer$1 } = require_dataURL(); - const { isValidHeaderName } = require_util$5(); - /** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ - function urlEquals$1(A, B, excludeFragment = false) { - const serializedA = URLSerializer$1(A, excludeFragment); - const serializedB = URLSerializer$1(B, excludeFragment); - return serializedA === serializedB; - } - /** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ - function fieldValues(header) { - assert$2(header !== null); - const values = []; - for (let value of header.split(",")) { - value = value.trim(); - if (!value.length) continue; - else if (!isValidHeaderName(value)) continue; - values.push(value); - } - return values; - } - module.exports = { - urlEquals: urlEquals$1, - fieldValues - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cache.js -var require_cache = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cache.js"(exports, module) { - const { kConstruct: kConstruct$1 } = require_symbols$1(); - const { urlEquals, fieldValues: getFieldValues } = require_util$2(); - const { kEnumerableProperty: kEnumerableProperty$3, isDisturbed } = require_util$6(); - const { kHeadersList: kHeadersList$1 } = require_symbols$4(); - const { webidl: webidl$4 } = require_webidl(); - const { Response, cloneResponse } = require_response(); - const { Request } = require_request(); - const { kState, kHeaders, kGuard, kRealm } = require_symbols$3(); - const { fetching: fetching$1 } = require_fetch(); - const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$5(); - const assert$1 = __require("assert"); - const { getGlobalDispatcher: getGlobalDispatcher$3 } = require_global(); - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - var Cache$1 = class Cache$1 { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList; - constructor() { - if (arguments[0] !== kConstruct$1) webidl$4.illegalConstructor(); - this.#relevantRequestResponseList = arguments[1]; - } - async match(request$1, options = {}) { - webidl$4.brandCheck(this, Cache$1); - webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.match" }); - request$1 = webidl$4.converters.RequestInfo(request$1); - options = webidl$4.converters.CacheQueryOptions(options); - const p = await this.matchAll(request$1, options); - if (p.length === 0) return; - return p[0]; - } - async matchAll(request$1 = void 0, options = {}) { - webidl$4.brandCheck(this, Cache$1); - if (request$1 !== void 0) request$1 = webidl$4.converters.RequestInfo(request$1); - options = webidl$4.converters.CacheQueryOptions(options); - let r = null; - if (request$1 !== void 0) { - if (request$1 instanceof Request) { - r = request$1[kState]; - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$1 === "string") r = new Request(request$1)[kState]; - } - const responses = []; - if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); - else { - const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) responses.push(requestResponse[1]); - } - const responseList = []; - for (const response of responses) { - const responseObject = new Response(response.body?.source ?? null); - const body = responseObject[kState].body; - responseObject[kState] = response; - responseObject[kState].body = body; - responseObject[kHeaders][kHeadersList$1] = response.headersList; - responseObject[kHeaders][kGuard] = "immutable"; - responseList.push(responseObject); - } - return Object.freeze(responseList); - } - async add(request$1) { - webidl$4.brandCheck(this, Cache$1); - webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.add" }); - request$1 = webidl$4.converters.RequestInfo(request$1); - const requests = [request$1]; - const responseArrayPromise = this.addAll(requests); - return await responseArrayPromise; - } - async addAll(requests) { - webidl$4.brandCheck(this, Cache$1); - webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.addAll" }); - requests = webidl$4.converters["sequence"](requests); - const responsePromises = []; - const requestList = []; - for (const request$1 of requests) { - if (typeof request$1 === "string") continue; - const r = request$1[kState]; - if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl$4.errors.exception({ - header: "Cache.addAll", - message: "Expected http/s scheme when method is not GET." - }); - } - /** @type {ReturnType[]} */ - const fetchControllers = []; - for (const request$1 of requests) { - const r = new Request(request$1)[kState]; - if (!urlIsHttpHttpsScheme(r.url)) throw webidl$4.errors.exception({ - header: "Cache.addAll", - message: "Expected http/s scheme." - }); - r.initiator = "fetch"; - r.destination = "subresource"; - requestList.push(r); - const responsePromise = createDeferredPromise(); - fetchControllers.push(fetching$1({ - request: r, - dispatcher: getGlobalDispatcher$3(), - processResponse(response) { - if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl$4.errors.exception({ - header: "Cache.addAll", - message: "Received an invalid status code or the request failed." - })); - else if (response.headersList.contains("vary")) { - const fieldValues$1 = getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues$1) if (fieldValue === "*") { - responsePromise.reject(webidl$4.errors.exception({ - header: "Cache.addAll", - message: "invalid vary field value" - })); - for (const controller of fetchControllers) controller.abort(); - return; - } - } - }, - processResponseEndOfBody(response) { - if (response.aborted) { - responsePromise.reject(new DOMException("aborted", "AbortError")); - return; - } - responsePromise.resolve(response); - } - })); - responsePromises.push(responsePromise.promise); - } - const p = Promise.all(responsePromises); - const responses = await p; - const operations = []; - let index = 0; - for (const response of responses) { - /** @type {CacheBatchOperation} */ - const operation = { - type: "put", - request: requestList[index], - response - }; - operations.push(operation); - index++; - } - const cacheJobPromise = createDeferredPromise(); - let errorData = null; - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(void 0); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - async put(request$1, response) { - webidl$4.brandCheck(this, Cache$1); - webidl$4.argumentLengthCheck(arguments, 2, { header: "Cache.put" }); - request$1 = webidl$4.converters.RequestInfo(request$1); - response = webidl$4.converters.Response(response); - let innerRequest = null; - if (request$1 instanceof Request) innerRequest = request$1[kState]; - else innerRequest = new Request(request$1)[kState]; - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl$4.errors.exception({ - header: "Cache.put", - message: "Expected an http/s scheme when method is not GET" - }); - const innerResponse = response[kState]; - if (innerResponse.status === 206) throw webidl$4.errors.exception({ - header: "Cache.put", - message: "Got 206 status" - }); - if (innerResponse.headersList.contains("vary")) { - const fieldValues$1 = getFieldValues(innerResponse.headersList.get("vary")); - for (const fieldValue of fieldValues$1) if (fieldValue === "*") throw webidl$4.errors.exception({ - header: "Cache.put", - message: "Got * vary field value" - }); - } - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl$4.errors.exception({ - header: "Cache.put", - message: "Response body is locked or disturbed" - }); - const clonedResponse = cloneResponse(innerResponse); - const bodyReadPromise = createDeferredPromise(); - if (innerResponse.body != null) { - const stream$2 = innerResponse.body.stream; - const reader = stream$2.getReader(); - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); - } else bodyReadPromise.resolve(void 0); - /** @type {CacheBatchOperation[]} */ - const operations = []; - /** @type {CacheBatchOperation} */ - const operation = { - type: "put", - request: innerRequest, - response: clonedResponse - }; - operations.push(operation); - const bytes = await bodyReadPromise.promise; - if (clonedResponse.body != null) clonedResponse.body.source = bytes; - const cacheJobPromise = createDeferredPromise(); - let errorData = null; - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - async delete(request$1, options = {}) { - webidl$4.brandCheck(this, Cache$1); - webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); - request$1 = webidl$4.converters.RequestInfo(request$1); - options = webidl$4.converters.CacheQueryOptions(options); - /** - * @type {Request} - */ - let r = null; - if (request$1 instanceof Request) { - r = request$1[kState]; - if (r.method !== "GET" && !options.ignoreMethod) return false; - } else { - assert$1(typeof request$1 === "string"); - r = new Request(request$1)[kState]; - } - /** @type {CacheBatchOperation[]} */ - const operations = []; - /** @type {CacheBatchOperation} */ - const operation = { - type: "delete", - request: r, - options - }; - operations.push(operation); - const cacheJobPromise = createDeferredPromise(); - let errorData = null; - let requestResponses; - try { - requestResponses = this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {readonly Request[]} - */ - async keys(request$1 = void 0, options = {}) { - webidl$4.brandCheck(this, Cache$1); - if (request$1 !== void 0) request$1 = webidl$4.converters.RequestInfo(request$1); - options = webidl$4.converters.CacheQueryOptions(options); - let r = null; - if (request$1 !== void 0) { - if (request$1 instanceof Request) { - r = request$1[kState]; - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$1 === "string") r = new Request(request$1)[kState]; - } - const promise = createDeferredPromise(); - const requests = []; - if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); - else { - const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) requests.push(requestResponse[0]); - } - queueMicrotask(() => { - const requestList = []; - for (const request$2 of requests) { - const requestObject = new Request("https://a"); - requestObject[kState] = request$2; - requestObject[kHeaders][kHeadersList$1] = request$2.headersList; - requestObject[kHeaders][kGuard] = "immutable"; - requestObject[kRealm] = request$2.client; - requestList.push(requestObject); - } - promise.resolve(Object.freeze(requestList)); - }); - return promise.promise; - } - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations(operations) { - const cache = this.#relevantRequestResponseList; - const backupCache = [...cache]; - const addedItems = []; - const resultList = []; - try { - for (const operation of operations) { - if (operation.type !== "delete" && operation.type !== "put") throw webidl$4.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "operation type does not match \"delete\" or \"put\"" - }); - if (operation.type === "delete" && operation.response != null) throw webidl$4.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "delete operation should not have an associated response" - }); - if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); - let requestResponses; - if (operation.type === "delete") { - requestResponses = this.#queryCache(operation.request, operation.options); - if (requestResponses.length === 0) return []; - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse); - assert$1(idx !== -1); - cache.splice(idx, 1); - } - } else if (operation.type === "put") { - if (operation.response == null) throw webidl$4.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "put operation should have an associated response" - }); - const r = operation.request; - if (!urlIsHttpHttpsScheme(r.url)) throw webidl$4.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "expected http or https scheme" - }); - if (r.method !== "GET") throw webidl$4.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "not get method" - }); - if (operation.options != null) throw webidl$4.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "options must not be defined" - }); - requestResponses = this.#queryCache(operation.request); - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse); - assert$1(idx !== -1); - cache.splice(idx, 1); - } - cache.push([operation.request, operation.response]); - addedItems.push([operation.request, operation.response]); - } - resultList.push([operation.request, operation.response]); - } - return resultList; - } catch (e) { - this.#relevantRequestResponseList.length = 0; - this.#relevantRequestResponseList = backupCache; - throw e; - } - } - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache(requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = []; - const storage = targetStorage ?? this.#relevantRequestResponseList; - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse; - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); - } - return resultList; - } - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem(requestQuery, request$1, response = null, options) { - const queryURL = new URL(requestQuery.url); - const cachedURL = new URL(request$1.url); - if (options?.ignoreSearch) { - cachedURL.search = ""; - queryURL.search = ""; - } - if (!urlEquals(queryURL, cachedURL, true)) return false; - if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; - const fieldValues$1 = getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues$1) { - if (fieldValue === "*") return false; - const requestValue = request$1.headersList.get(fieldValue); - const queryValue = requestQuery.headersList.get(fieldValue); - if (requestValue !== queryValue) return false; - } - return true; - } - }; - Object.defineProperties(Cache$1.prototype, { - [Symbol.toStringTag]: { - value: "Cache", - configurable: true - }, - match: kEnumerableProperty$3, - matchAll: kEnumerableProperty$3, - add: kEnumerableProperty$3, - addAll: kEnumerableProperty$3, - put: kEnumerableProperty$3, - delete: kEnumerableProperty$3, - keys: kEnumerableProperty$3 - }); - const cacheQueryOptionConverters = [ - { - key: "ignoreSearch", - converter: webidl$4.converters.boolean, - defaultValue: false - }, - { - key: "ignoreMethod", - converter: webidl$4.converters.boolean, - defaultValue: false - }, - { - key: "ignoreVary", - converter: webidl$4.converters.boolean, - defaultValue: false - } - ]; - webidl$4.converters.CacheQueryOptions = webidl$4.dictionaryConverter(cacheQueryOptionConverters); - webidl$4.converters.MultiCacheQueryOptions = webidl$4.dictionaryConverter([...cacheQueryOptionConverters, { - key: "cacheName", - converter: webidl$4.converters.DOMString - }]); - webidl$4.converters.Response = webidl$4.interfaceConverter(Response); - webidl$4.converters["sequence"] = webidl$4.sequenceConverter(webidl$4.converters.RequestInfo); - module.exports = { Cache: Cache$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js -var require_cachestorage = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js"(exports, module) { - const { kConstruct } = require_symbols$1(); - const { Cache } = require_cache(); - const { webidl: webidl$3 } = require_webidl(); - const { kEnumerableProperty: kEnumerableProperty$2 } = require_util$6(); - var CacheStorage = class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has(cacheName) { - webidl$3.brandCheck(this, CacheStorage); - webidl$3.argumentLengthCheck(arguments, 1, { header: "CacheStorage.has" }); - cacheName = webidl$3.converters.DOMString(cacheName); - return this.#caches.has(cacheName); - } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open(cacheName) { - webidl$3.brandCheck(this, CacheStorage); - webidl$3.argumentLengthCheck(arguments, 1, { header: "CacheStorage.open" }); - cacheName = webidl$3.converters.DOMString(cacheName); - if (this.#caches.has(cacheName)) { - const cache$1 = this.#caches.get(cacheName); - return new Cache(kConstruct, cache$1); - } - const cache = []; - this.#caches.set(cacheName, cache); - return new Cache(kConstruct, cache); - } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete(cacheName) { - webidl$3.brandCheck(this, CacheStorage); - webidl$3.argumentLengthCheck(arguments, 1, { header: "CacheStorage.delete" }); - cacheName = webidl$3.converters.DOMString(cacheName); - return this.#caches.delete(cacheName); - } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {string[]} - */ - async keys() { - webidl$3.brandCheck(this, CacheStorage); - const keys = this.#caches.keys(); - return [...keys]; - } - }; - Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: "CacheStorage", - configurable: true - }, - match: kEnumerableProperty$2, - has: kEnumerableProperty$2, - open: kEnumerableProperty$2, - delete: kEnumerableProperty$2, - keys: kEnumerableProperty$2 - }); - module.exports = { CacheStorage }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/constants.js -var require_constants$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/constants.js"(exports, module) { - const maxAttributeValueSize$1 = 1024; - const maxNameValuePairSize$1 = 4096; - module.exports = { - maxAttributeValueSize: maxAttributeValueSize$1, - maxNameValuePairSize: maxNameValuePairSize$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/util.js -var require_util$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/util.js"(exports, module) { - /** - * @param {string} value - * @returns {boolean} - */ - function isCTLExcludingHtab$1(value) { - if (value.length === 0) return false; - for (const char of value) { - const code = char.charCodeAt(0); - if (code >= 0 || code <= 8 || code >= 10 || code <= 31 || code === 127) return false; - } - } - /** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ - function validateCookieName(name) { - for (const char of name) { - const code = char.charCodeAt(0); - if (code <= 32 || code > 127 || char === "(" || char === ")" || char === ">" || char === "<" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === "\"" || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}") throw new Error("Invalid cookie name"); - } - } - /** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ - function validateCookieValue(value) { - for (const char of value) { - const code = char.charCodeAt(0); - if (code < 33 || code === 34 || code === 44 || code === 59 || code === 92 || code > 126) throw new Error("Invalid header value"); - } - } - /** - * path-value = - * @param {string} path - */ - function validateCookiePath(path$5) { - for (const char of path$5) { - const code = char.charCodeAt(0); - if (code < 33 || char === ";") throw new Error("Invalid cookie path"); - } - } - /** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ - function validateCookieDomain(domain) { - if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); - } - /** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ - function toIMFDate(date) { - if (typeof date === "number") date = new Date(date); - const days = [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ]; - const months = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ]; - const dayName = days[date.getUTCDay()]; - const day = date.getUTCDate().toString().padStart(2, "0"); - const month = months[date.getUTCMonth()]; - const year = date.getUTCFullYear(); - const hour = date.getUTCHours().toString().padStart(2, "0"); - const minute = date.getUTCMinutes().toString().padStart(2, "0"); - const second = date.getUTCSeconds().toString().padStart(2, "0"); - return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; - } - /** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ - function validateCookieMaxAge(maxAge) { - if (maxAge < 0) throw new Error("Invalid cookie max-age"); - } - /** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ - function stringify$1(cookie) { - if (cookie.name.length === 0) return null; - validateCookieName(cookie.name); - validateCookieValue(cookie.value); - const out = [`${cookie.name}=${cookie.value}`]; - if (cookie.name.startsWith("__Secure-")) cookie.secure = true; - if (cookie.name.startsWith("__Host-")) { - cookie.secure = true; - cookie.domain = null; - cookie.path = "/"; - } - if (cookie.secure) out.push("Secure"); - if (cookie.httpOnly) out.push("HttpOnly"); - if (typeof cookie.maxAge === "number") { - validateCookieMaxAge(cookie.maxAge); - out.push(`Max-Age=${cookie.maxAge}`); - } - if (cookie.domain) { - validateCookieDomain(cookie.domain); - out.push(`Domain=${cookie.domain}`); - } - if (cookie.path) { - validateCookiePath(cookie.path); - out.push(`Path=${cookie.path}`); - } - if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); - if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); - for (const part of cookie.unparsed) { - if (!part.includes("=")) throw new Error("Invalid unparsed"); - const [key, ...value] = part.split("="); - out.push(`${key.trim()}=${value.join("=")}`); - } - return out.join("; "); - } - module.exports = { - isCTLExcludingHtab: isCTLExcludingHtab$1, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify: stringify$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/parse.js -var require_parse = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/parse.js"(exports, module) { - const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$1(); - const { isCTLExcludingHtab } = require_util$1(); - const { collectASequenceOfCodePointsFast } = require_dataURL(); - const assert = __require("assert"); - /** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ - function parseSetCookie$1(header) { - if (isCTLExcludingHtab(header)) return null; - let nameValuePair = ""; - let unparsedAttributes = ""; - let name = ""; - let value = ""; - if (header.includes(";")) { - const position = { position: 0 }; - nameValuePair = collectASequenceOfCodePointsFast(";", header, position); - unparsedAttributes = header.slice(position.position); - } else nameValuePair = header; - if (!nameValuePair.includes("=")) value = nameValuePair; - else { - const position = { position: 0 }; - name = collectASequenceOfCodePointsFast("=", nameValuePair, position); - value = nameValuePair.slice(position.position + 1); - } - name = name.trim(); - value = value.trim(); - if (name.length + value.length > maxNameValuePairSize) return null; - return { - name, - value, - ...parseUnparsedAttributes(unparsedAttributes) - }; - } - /** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ - function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { - if (unparsedAttributes.length === 0) return cookieAttributeList; - assert(unparsedAttributes[0] === ";"); - unparsedAttributes = unparsedAttributes.slice(1); - let cookieAv = ""; - if (unparsedAttributes.includes(";")) { - cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); - unparsedAttributes = unparsedAttributes.slice(cookieAv.length); - } else { - cookieAv = unparsedAttributes; - unparsedAttributes = ""; - } - let attributeName = ""; - let attributeValue = ""; - if (cookieAv.includes("=")) { - const position = { position: 0 }; - attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); - attributeValue = cookieAv.slice(position.position + 1); - } else attributeName = cookieAv; - attributeName = attributeName.trim(); - attributeValue = attributeValue.trim(); - if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - const attributeNameLowercase = attributeName.toLowerCase(); - if (attributeNameLowercase === "expires") { - const expiryTime = new Date(attributeValue); - cookieAttributeList.expires = expiryTime; - } else if (attributeNameLowercase === "max-age") { - const charCode = attributeValue.charCodeAt(0); - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - const deltaSeconds = Number(attributeValue); - cookieAttributeList.maxAge = deltaSeconds; - } else if (attributeNameLowercase === "domain") { - let cookieDomain = attributeValue; - if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); - cookieDomain = cookieDomain.toLowerCase(); - cookieAttributeList.domain = cookieDomain; - } else if (attributeNameLowercase === "path") { - let cookiePath = ""; - if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; - else cookiePath = attributeValue; - cookieAttributeList.path = cookiePath; - } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; - else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; - else if (attributeNameLowercase === "samesite") { - let enforcement = "Default"; - const attributeValueLowercase = attributeValue.toLowerCase(); - if (attributeValueLowercase.includes("none")) enforcement = "None"; - if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; - if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; - cookieAttributeList.sameSite = enforcement; - } else { - cookieAttributeList.unparsed ??= []; - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); - } - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - } - module.exports = { - parseSetCookie: parseSetCookie$1, - parseUnparsedAttributes - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/index.js -var require_cookies = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/index.js"(exports, module) { - const { parseSetCookie } = require_parse(); - const { stringify } = require_util$1(); - const { webidl: webidl$2 } = require_webidl(); - const { Headers: Headers$2 } = require_headers(); - /** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - /** - * @param {Headers} headers - * @returns {Record} - */ - function getCookies(headers) { - webidl$2.argumentLengthCheck(arguments, 1, { header: "getCookies" }); - webidl$2.brandCheck(headers, Headers$2, { strict: false }); - const cookie = headers.get("cookie"); - const out = {}; - if (!cookie) return out; - for (const piece of cookie.split(";")) { - const [name, ...value] = piece.split("="); - out[name.trim()] = value.join("="); - } - return out; - } - /** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ - function deleteCookie(headers, name, attributes) { - webidl$2.argumentLengthCheck(arguments, 2, { header: "deleteCookie" }); - webidl$2.brandCheck(headers, Headers$2, { strict: false }); - name = webidl$2.converters.DOMString(name); - attributes = webidl$2.converters.DeleteCookieAttributes(attributes); - setCookie(headers, { - name, - value: "", - expires: new Date(0), - ...attributes - }); - } - /** - * @param {Headers} headers - * @returns {Cookie[]} - */ - function getSetCookies(headers) { - webidl$2.argumentLengthCheck(arguments, 1, { header: "getSetCookies" }); - webidl$2.brandCheck(headers, Headers$2, { strict: false }); - const cookies = headers.getSetCookie(); - if (!cookies) return []; - return cookies.map((pair) => parseSetCookie(pair)); - } - /** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ - function setCookie(headers, cookie) { - webidl$2.argumentLengthCheck(arguments, 2, { header: "setCookie" }); - webidl$2.brandCheck(headers, Headers$2, { strict: false }); - cookie = webidl$2.converters.Cookie(cookie); - const str = stringify(cookie); - if (str) headers.append("Set-Cookie", stringify(cookie)); - } - webidl$2.converters.DeleteCookieAttributes = webidl$2.dictionaryConverter([{ - converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), - key: "path", - defaultValue: null - }, { - converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), - key: "domain", - defaultValue: null - }]); - webidl$2.converters.Cookie = webidl$2.dictionaryConverter([ - { - converter: webidl$2.converters.DOMString, - key: "name" - }, - { - converter: webidl$2.converters.DOMString, - key: "value" - }, - { - converter: webidl$2.nullableConverter((value) => { - if (typeof value === "number") return webidl$2.converters["unsigned long long"](value); - return new Date(value); - }), - key: "expires", - defaultValue: null - }, - { - converter: webidl$2.nullableConverter(webidl$2.converters["long long"]), - key: "maxAge", - defaultValue: null - }, - { - converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), - key: "domain", - defaultValue: null - }, - { - converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), - key: "path", - defaultValue: null - }, - { - converter: webidl$2.nullableConverter(webidl$2.converters.boolean), - key: "secure", - defaultValue: null - }, - { - converter: webidl$2.nullableConverter(webidl$2.converters.boolean), - key: "httpOnly", - defaultValue: null - }, - { - converter: webidl$2.converters.USVString, - key: "sameSite", - allowedValues: [ - "Strict", - "Lax", - "None" - ] - }, - { - converter: webidl$2.sequenceConverter(webidl$2.converters.DOMString), - key: "unparsed", - defaultValue: [] - } - ]); - module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/constants.js -var require_constants = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/constants.js"(exports, module) { - const uid$1 = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; - /** @type {PropertyDescriptor} */ - const staticPropertyDescriptors$1 = { - enumerable: true, - writable: false, - configurable: false - }; - const states$4 = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 - }; - const opcodes$3 = { - CONTINUATION: 0, - TEXT: 1, - BINARY: 2, - CLOSE: 8, - PING: 9, - PONG: 10 - }; - const maxUnsigned16Bit$1 = 2 ** 16 - 1; - const parserStates$1 = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 - }; - const emptyBuffer$2 = Buffer.allocUnsafe(0); - module.exports = { - uid: uid$1, - staticPropertyDescriptors: staticPropertyDescriptors$1, - states: states$4, - opcodes: opcodes$3, - maxUnsigned16Bit: maxUnsigned16Bit$1, - parserStates: parserStates$1, - emptyBuffer: emptyBuffer$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js -var require_symbols = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js"(exports, module) { - module.exports = { - kWebSocketURL: Symbol("url"), - kReadyState: Symbol("ready state"), - kController: Symbol("controller"), - kResponse: Symbol("response"), - kBinaryType: Symbol("binary type"), - kSentClose: Symbol("sent close"), - kReceivedClose: Symbol("received close"), - kByteParser: Symbol("byte parser") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/events.js -var require_events = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/events.js"(exports, module) { - const { webidl: webidl$1 } = require_webidl(); - const { kEnumerableProperty: kEnumerableProperty$1 } = require_util$6(); - const { MessagePort } = __require("worker_threads"); - /** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ - var MessageEvent$1 = class MessageEvent$1 extends Event { - #eventInit; - constructor(type, eventInitDict = {}) { - webidl$1.argumentLengthCheck(arguments, 1, { header: "MessageEvent constructor" }); - type = webidl$1.converters.DOMString(type); - eventInitDict = webidl$1.converters.MessageEventInit(eventInitDict); - super(type, eventInitDict); - this.#eventInit = eventInitDict; - } - get data() { - webidl$1.brandCheck(this, MessageEvent$1); - return this.#eventInit.data; - } - get origin() { - webidl$1.brandCheck(this, MessageEvent$1); - return this.#eventInit.origin; - } - get lastEventId() { - webidl$1.brandCheck(this, MessageEvent$1); - return this.#eventInit.lastEventId; - } - get source() { - webidl$1.brandCheck(this, MessageEvent$1); - return this.#eventInit.source; - } - get ports() { - webidl$1.brandCheck(this, MessageEvent$1); - if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); - return this.#eventInit.ports; - } - initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { - webidl$1.brandCheck(this, MessageEvent$1); - webidl$1.argumentLengthCheck(arguments, 1, { header: "MessageEvent.initMessageEvent" }); - return new MessageEvent$1(type, { - bubbles, - cancelable, - data, - origin, - lastEventId, - source, - ports - }); - } - }; - /** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ - var CloseEvent$1 = class CloseEvent$1 extends Event { - #eventInit; - constructor(type, eventInitDict = {}) { - webidl$1.argumentLengthCheck(arguments, 1, { header: "CloseEvent constructor" }); - type = webidl$1.converters.DOMString(type); - eventInitDict = webidl$1.converters.CloseEventInit(eventInitDict); - super(type, eventInitDict); - this.#eventInit = eventInitDict; - } - get wasClean() { - webidl$1.brandCheck(this, CloseEvent$1); - return this.#eventInit.wasClean; - } - get code() { - webidl$1.brandCheck(this, CloseEvent$1); - return this.#eventInit.code; - } - get reason() { - webidl$1.brandCheck(this, CloseEvent$1); - return this.#eventInit.reason; - } - }; - var ErrorEvent$1 = class ErrorEvent$1 extends Event { - #eventInit; - constructor(type, eventInitDict) { - webidl$1.argumentLengthCheck(arguments, 1, { header: "ErrorEvent constructor" }); - super(type, eventInitDict); - type = webidl$1.converters.DOMString(type); - eventInitDict = webidl$1.converters.ErrorEventInit(eventInitDict ?? {}); - this.#eventInit = eventInitDict; - } - get message() { - webidl$1.brandCheck(this, ErrorEvent$1); - return this.#eventInit.message; - } - get filename() { - webidl$1.brandCheck(this, ErrorEvent$1); - return this.#eventInit.filename; - } - get lineno() { - webidl$1.brandCheck(this, ErrorEvent$1); - return this.#eventInit.lineno; - } - get colno() { - webidl$1.brandCheck(this, ErrorEvent$1); - return this.#eventInit.colno; - } - get error() { - webidl$1.brandCheck(this, ErrorEvent$1); - return this.#eventInit.error; - } - }; - Object.defineProperties(MessageEvent$1.prototype, { - [Symbol.toStringTag]: { - value: "MessageEvent", - configurable: true - }, - data: kEnumerableProperty$1, - origin: kEnumerableProperty$1, - lastEventId: kEnumerableProperty$1, - source: kEnumerableProperty$1, - ports: kEnumerableProperty$1, - initMessageEvent: kEnumerableProperty$1 - }); - Object.defineProperties(CloseEvent$1.prototype, { - [Symbol.toStringTag]: { - value: "CloseEvent", - configurable: true - }, - reason: kEnumerableProperty$1, - code: kEnumerableProperty$1, - wasClean: kEnumerableProperty$1 - }); - Object.defineProperties(ErrorEvent$1.prototype, { - [Symbol.toStringTag]: { - value: "ErrorEvent", - configurable: true - }, - message: kEnumerableProperty$1, - filename: kEnumerableProperty$1, - lineno: kEnumerableProperty$1, - colno: kEnumerableProperty$1, - error: kEnumerableProperty$1 - }); - webidl$1.converters.MessagePort = webidl$1.interfaceConverter(MessagePort); - webidl$1.converters["sequence"] = webidl$1.sequenceConverter(webidl$1.converters.MessagePort); - const eventInit = [ - { - key: "bubbles", - converter: webidl$1.converters.boolean, - defaultValue: false - }, - { - key: "cancelable", - converter: webidl$1.converters.boolean, - defaultValue: false - }, - { - key: "composed", - converter: webidl$1.converters.boolean, - defaultValue: false - } - ]; - webidl$1.converters.MessageEventInit = webidl$1.dictionaryConverter([ - ...eventInit, - { - key: "data", - converter: webidl$1.converters.any, - defaultValue: null - }, - { - key: "origin", - converter: webidl$1.converters.USVString, - defaultValue: "" - }, - { - key: "lastEventId", - converter: webidl$1.converters.DOMString, - defaultValue: "" - }, - { - key: "source", - converter: webidl$1.nullableConverter(webidl$1.converters.MessagePort), - defaultValue: null - }, - { - key: "ports", - converter: webidl$1.converters["sequence"], - get defaultValue() { - return []; - } - } - ]); - webidl$1.converters.CloseEventInit = webidl$1.dictionaryConverter([ - ...eventInit, - { - key: "wasClean", - converter: webidl$1.converters.boolean, - defaultValue: false - }, - { - key: "code", - converter: webidl$1.converters["unsigned short"], - defaultValue: 0 - }, - { - key: "reason", - converter: webidl$1.converters.USVString, - defaultValue: "" - } - ]); - webidl$1.converters.ErrorEventInit = webidl$1.dictionaryConverter([ - ...eventInit, - { - key: "message", - converter: webidl$1.converters.DOMString, - defaultValue: "" - }, - { - key: "filename", - converter: webidl$1.converters.USVString, - defaultValue: "" - }, - { - key: "lineno", - converter: webidl$1.converters["unsigned long"], - defaultValue: 0 - }, - { - key: "colno", - converter: webidl$1.converters["unsigned long"], - defaultValue: 0 - }, - { - key: "error", - converter: webidl$1.converters.any - } - ]); - module.exports = { - MessageEvent: MessageEvent$1, - CloseEvent: CloseEvent$1, - ErrorEvent: ErrorEvent$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/util.js -var require_util = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/util.js"(exports, module) { - const { kReadyState: kReadyState$3, kController: kController$1, kResponse: kResponse$2, kBinaryType: kBinaryType$1, kWebSocketURL: kWebSocketURL$1 } = require_symbols(); - const { states: states$3, opcodes: opcodes$2 } = require_constants(); - const { MessageEvent, ErrorEvent } = require_events(); - /** - * @param {import('./websocket').WebSocket} ws - */ - function isEstablished$1(ws) { - return ws[kReadyState$3] === states$3.OPEN; - } - /** - * @param {import('./websocket').WebSocket} ws - */ - function isClosing$1(ws) { - return ws[kReadyState$3] === states$3.CLOSING; - } - /** - * @param {import('./websocket').WebSocket} ws - */ - function isClosed(ws) { - return ws[kReadyState$3] === states$3.CLOSED; - } - /** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {EventInit | undefined} eventInitDict - */ - function fireEvent$2(e, target, eventConstructor = Event, eventInitDict) { - const event = new eventConstructor(e, eventInitDict); - target.dispatchEvent(event); - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ - function websocketMessageReceived$1(ws, type, data) { - if (ws[kReadyState$3] !== states$3.OPEN) return; - let dataForEvent; - if (type === opcodes$2.TEXT) try { - dataForEvent = new TextDecoder("utf-8", { fatal: true }).decode(data); - } catch { - failWebsocketConnection$3(ws, "Received invalid UTF-8 in text frame."); - return; - } - else if (type === opcodes$2.BINARY) if (ws[kBinaryType$1] === "blob") dataForEvent = new Blob([data]); - else dataForEvent = new Uint8Array(data).buffer; - fireEvent$2("message", ws, MessageEvent, { - origin: ws[kWebSocketURL$1].origin, - data: dataForEvent - }); - } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ - function isValidSubprotocol$1(protocol) { - if (protocol.length === 0) return false; - for (const char of protocol) { - const code = char.charCodeAt(0); - if (code < 33 || code > 126 || char === "(" || char === ")" || char === "<" || char === ">" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === "\"" || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}" || code === 32 || code === 9) return false; - } - return true; - } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ - function isValidStatusCode$1(code) { - if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; - return code >= 3e3 && code <= 4999; - } - /** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ - function failWebsocketConnection$3(ws, reason) { - const { [kController$1]: controller, [kResponse$2]: response } = ws; - controller.abort(); - if (response?.socket && !response.socket.destroyed) response.socket.destroy(); - if (reason) fireEvent$2("error", ws, ErrorEvent, { error: new Error(reason) }); - } - module.exports = { - isEstablished: isEstablished$1, - isClosing: isClosing$1, - isClosed, - fireEvent: fireEvent$2, - isValidSubprotocol: isValidSubprotocol$1, - isValidStatusCode: isValidStatusCode$1, - failWebsocketConnection: failWebsocketConnection$3, - websocketMessageReceived: websocketMessageReceived$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/connection.js -var require_connection = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/connection.js"(exports, module) { - const diagnosticsChannel$1 = __require("diagnostics_channel"); - const { uid, states: states$2 } = require_constants(); - const { kReadyState: kReadyState$2, kSentClose: kSentClose$2, kByteParser: kByteParser$1, kReceivedClose: kReceivedClose$1 } = require_symbols(); - const { fireEvent: fireEvent$1, failWebsocketConnection: failWebsocketConnection$2 } = require_util(); - const { CloseEvent } = require_events(); - const { makeRequest } = require_request(); - const { fetching } = require_fetch(); - const { Headers: Headers$1 } = require_headers(); - const { getGlobalDispatcher: getGlobalDispatcher$2 } = require_global(); - const { kHeadersList } = require_symbols$4(); - const channels$1 = {}; - channels$1.open = diagnosticsChannel$1.channel("undici:websocket:open"); - channels$1.close = diagnosticsChannel$1.channel("undici:websocket:close"); - channels$1.socketError = diagnosticsChannel$1.channel("undici:websocket:socket_error"); - /** @type {import('crypto')} */ - let crypto$1; - try { - crypto$1 = __require("crypto"); - } catch {} - /** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any) => void} onEstablish - * @param {Partial} options - */ - function establishWebSocketConnection$1(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; - const request$1 = makeRequest({ - urlList: [requestURL], - serviceWorkers: "none", - referrer: "no-referrer", - mode: "websocket", - credentials: "include", - cache: "no-store", - redirect: "error" - }); - if (options.headers) { - const headersList = new Headers$1(options.headers)[kHeadersList]; - request$1.headersList = headersList; - } - const keyValue = crypto$1.randomBytes(16).toString("base64"); - request$1.headersList.append("sec-websocket-key", keyValue); - request$1.headersList.append("sec-websocket-version", "13"); - for (const protocol of protocols) request$1.headersList.append("sec-websocket-protocol", protocol); - const permessageDeflate = ""; - const controller = fetching({ - request: request$1, - useParallelQueue: true, - dispatcher: options.dispatcher ?? getGlobalDispatcher$2(), - processResponse(response) { - if (response.type === "error" || response.status !== 101) { - failWebsocketConnection$2(ws, "Received network error or non-101 status code."); - return; - } - if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { - failWebsocketConnection$2(ws, "Server did not respond with sent protocols."); - return; - } - if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { - failWebsocketConnection$2(ws, "Server did not set Upgrade header to \"websocket\"."); - return; - } - if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { - failWebsocketConnection$2(ws, "Server did not set Connection header to \"upgrade\"."); - return; - } - const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto$1.createHash("sha1").update(keyValue + uid).digest("base64"); - if (secWSAccept !== digest) { - failWebsocketConnection$2(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); - return; - } - const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); - if (secExtension !== null && secExtension !== permessageDeflate) { - failWebsocketConnection$2(ws, "Received different permessage-deflate than the one set."); - return; - } - const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); - if (secProtocol !== null && secProtocol !== request$1.headersList.get("Sec-WebSocket-Protocol")) { - failWebsocketConnection$2(ws, "Protocol was not set in the opening handshake."); - return; - } - response.socket.on("data", onSocketData); - response.socket.on("close", onSocketClose); - response.socket.on("error", onSocketError); - if (channels$1.open.hasSubscribers) channels$1.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }); - onEstablish(response); - } - }); - return controller; - } - /** - * @param {Buffer} chunk - */ - function onSocketData(chunk) { - if (!this.ws[kByteParser$1].write(chunk)) this.pause(); - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ - function onSocketClose() { - const { ws } = this; - const wasClean = ws[kSentClose$2] && ws[kReceivedClose$1]; - let code = 1005; - let reason = ""; - const result = ws[kByteParser$1].closingInfo; - if (result) { - code = result.code ?? 1005; - reason = result.reason; - } else if (!ws[kSentClose$2]) code = 1006; - ws[kReadyState$2] = states$2.CLOSED; - fireEvent$1("close", ws, CloseEvent, { - wasClean, - code, - reason - }); - if (channels$1.close.hasSubscribers) channels$1.close.publish({ - websocket: ws, - code, - reason - }); - } - function onSocketError(error$1) { - const { ws } = this; - ws[kReadyState$2] = states$2.CLOSING; - if (channels$1.socketError.hasSubscribers) channels$1.socketError.publish(error$1); - this.destroy(); - } - module.exports = { establishWebSocketConnection: establishWebSocketConnection$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/frame.js -var require_frame = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/frame.js"(exports, module) { - const { maxUnsigned16Bit } = require_constants(); - /** @type {import('crypto')} */ - let crypto; - try { - crypto = __require("crypto"); - } catch {} - var WebsocketFrameSend$2 = class { - /** - * @param {Buffer|undefined} data - */ - constructor(data) { - this.frameData = data; - this.maskKey = crypto.randomBytes(4); - } - createFrame(opcode) { - const bodyLength$1 = this.frameData?.byteLength ?? 0; - /** @type {number} */ - let payloadLength = bodyLength$1; - let offset = 6; - if (bodyLength$1 > maxUnsigned16Bit) { - offset += 8; - payloadLength = 127; - } else if (bodyLength$1 > 125) { - offset += 2; - payloadLength = 126; - } - const buffer = Buffer.allocUnsafe(bodyLength$1 + offset); - buffer[0] = buffer[1] = 0; - buffer[0] |= 128; - buffer[0] = (buffer[0] & 240) + opcode; - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = this.maskKey[0]; - buffer[offset - 3] = this.maskKey[1]; - buffer[offset - 2] = this.maskKey[2]; - buffer[offset - 1] = this.maskKey[3]; - buffer[1] = payloadLength; - if (payloadLength === 126) buffer.writeUInt16BE(bodyLength$1, 2); - else if (payloadLength === 127) { - buffer[2] = buffer[3] = 0; - buffer.writeUIntBE(bodyLength$1, 4, 6); - } - buffer[1] |= 128; - for (let i$1 = 0; i$1 < bodyLength$1; i$1++) buffer[offset + i$1] = this.frameData[i$1] ^ this.maskKey[i$1 % 4]; - return buffer; - } - }; - module.exports = { WebsocketFrameSend: WebsocketFrameSend$2 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js -var require_receiver = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js"(exports, module) { - const { Writable } = __require("stream"); - const diagnosticsChannel = __require("diagnostics_channel"); - const { parserStates, opcodes: opcodes$1, states: states$1, emptyBuffer: emptyBuffer$1 } = require_constants(); - const { kReadyState: kReadyState$1, kSentClose: kSentClose$1, kResponse: kResponse$1, kReceivedClose } = require_symbols(); - const { isValidStatusCode, failWebsocketConnection: failWebsocketConnection$1, websocketMessageReceived } = require_util(); - const { WebsocketFrameSend: WebsocketFrameSend$1 } = require_frame(); - const channels = {}; - channels.ping = diagnosticsChannel.channel("undici:websocket:ping"); - channels.pong = diagnosticsChannel.channel("undici:websocket:pong"); - var ByteParser$1 = class extends Writable { - #buffers = []; - #byteOffset = 0; - #state = parserStates.INFO; - #info = {}; - #fragments = []; - constructor(ws) { - super(); - this.ws = ws; - } - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write(chunk, _, callback) { - this.#buffers.push(chunk); - this.#byteOffset += chunk.length; - this.run(callback); - } - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run(callback) { - while (true) { - if (this.#state === parserStates.INFO) { - if (this.#byteOffset < 2) return callback(); - const buffer = this.consume(2); - this.#info.fin = (buffer[0] & 128) !== 0; - this.#info.opcode = buffer[0] & 15; - this.#info.originalOpcode ??= this.#info.opcode; - this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes$1.CONTINUATION; - if (this.#info.fragmented && this.#info.opcode !== opcodes$1.BINARY && this.#info.opcode !== opcodes$1.TEXT) { - failWebsocketConnection$1(this.ws, "Invalid frame type was fragmented."); - return; - } - const payloadLength = buffer[1] & 127; - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength; - this.#state = parserStates.READ_DATA; - } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; - else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; - if (this.#info.fragmented && payloadLength > 125) { - failWebsocketConnection$1(this.ws, "Fragmented frame exceeded 125 bytes."); - return; - } else if ((this.#info.opcode === opcodes$1.PING || this.#info.opcode === opcodes$1.PONG || this.#info.opcode === opcodes$1.CLOSE) && payloadLength > 125) { - failWebsocketConnection$1(this.ws, "Payload length for control frame exceeded 125 bytes."); - return; - } else if (this.#info.opcode === opcodes$1.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection$1(this.ws, "Received close frame with a 1-byte body."); - return; - } - const body = this.consume(payloadLength); - this.#info.closeInfo = this.parseCloseBody(false, body); - if (!this.ws[kSentClose$1]) { - const body$1 = Buffer.allocUnsafe(2); - body$1.writeUInt16BE(this.#info.closeInfo.code, 0); - const closeFrame = new WebsocketFrameSend$1(body$1); - this.ws[kResponse$1].socket.write(closeFrame.createFrame(opcodes$1.CLOSE), (err) => { - if (!err) this.ws[kSentClose$1] = true; - }); - } - this.ws[kReadyState$1] = states$1.CLOSING; - this.ws[kReceivedClose] = true; - this.end(); - return; - } else if (this.#info.opcode === opcodes$1.PING) { - const body = this.consume(payloadLength); - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend$1(body); - this.ws[kResponse$1].socket.write(frame.createFrame(opcodes$1.PONG)); - if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); - } - this.#state = parserStates.INFO; - if (this.#byteOffset > 0) continue; - else { - callback(); - return; - } - } else if (this.#info.opcode === opcodes$1.PONG) { - const body = this.consume(payloadLength); - if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); - if (this.#byteOffset > 0) continue; - else { - callback(); - return; - } - } - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) return callback(); - const buffer = this.consume(2); - this.#info.payloadLength = buffer.readUInt16BE(0); - this.#state = parserStates.READ_DATA; - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) return callback(); - const buffer = this.consume(8); - const upper = buffer.readUInt32BE(0); - if (upper > 2 ** 31 - 1) { - failWebsocketConnection$1(this.ws, "Received payload length > 2^31 bytes."); - return; - } - const lower = buffer.readUInt32BE(4); - this.#info.payloadLength = (upper << 8) + lower; - this.#state = parserStates.READ_DATA; - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) return callback(); - else if (this.#byteOffset >= this.#info.payloadLength) { - const body = this.consume(this.#info.payloadLength); - this.#fragments.push(body); - if (!this.#info.fragmented || this.#info.fin && this.#info.opcode === opcodes$1.CONTINUATION) { - const fullMessage = Buffer.concat(this.#fragments); - websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage); - this.#info = {}; - this.#fragments.length = 0; - } - this.#state = parserStates.INFO; - } - } - if (this.#byteOffset > 0) continue; - else { - callback(); - break; - } - } - } - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer|null} - */ - consume(n) { - if (n > this.#byteOffset) return null; - else if (n === 0) return emptyBuffer$1; - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length; - return this.#buffers.shift(); - } - const buffer = Buffer.allocUnsafe(n); - let offset = 0; - while (offset !== n) { - const next = this.#buffers[0]; - const { length } = next; - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset); - break; - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset); - this.#buffers[0] = next.subarray(n - offset); - break; - } else { - buffer.set(this.#buffers.shift(), offset); - offset += next.length; - } - } - this.#byteOffset -= n; - return buffer; - } - parseCloseBody(onlyCode, data) { - /** @type {number|undefined} */ - let code; - if (data.length >= 2) code = data.readUInt16BE(0); - if (onlyCode) { - if (!isValidStatusCode(code)) return null; - return { code }; - } - /** @type {Buffer} */ - let reason = data.subarray(2); - if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); - if (code !== void 0 && !isValidStatusCode(code)) return null; - try { - reason = new TextDecoder("utf-8", { fatal: true }).decode(reason); - } catch { - return null; - } - return { - code, - reason - }; - } - get closingInfo() { - return this.#info.closeInfo; - } - }; - module.exports = { ByteParser: ByteParser$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js -var require_websocket = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js"(exports, module) { - const { webidl } = require_webidl(); - const { DOMException: DOMException$1 } = require_constants$3(); - const { URLSerializer } = require_dataURL(); - const { getGlobalOrigin } = require_global$1(); - const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require_constants(); - const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); - const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require_util(); - const { establishWebSocketConnection } = require_connection(); - const { WebsocketFrameSend } = require_frame(); - const { ByteParser } = require_receiver(); - const { kEnumerableProperty, isBlobLike } = require_util$6(); - const { getGlobalDispatcher: getGlobalDispatcher$1 } = require_global(); - const { types } = __require("util"); - let experimentalWarned = false; - var WebSocket = class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - }; - #bufferedAmount = 0; - #protocol = ""; - #extensions = ""; - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor(url, protocols = []) { - super(); - webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); - if (!experimentalWarned) { - experimentalWarned = true; - process.emitWarning("WebSockets are experimental, expect them to change at any time.", { code: "UNDICI-WS" }); - } - const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); - protocols = options.protocols; - const baseURL = getGlobalOrigin(); - let urlRecord; - try { - urlRecord = new URL(url, baseURL); - } catch (e) { - throw new DOMException$1(e, "SyntaxError"); - } - if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; - else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; - if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException$1(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); - if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException$1("Got fragment", "SyntaxError"); - if (typeof protocols === "string") protocols = [protocols]; - if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException$1("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException$1("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - this[kWebSocketURL] = new URL(urlRecord.href); - this[kController] = establishWebSocketConnection(urlRecord, protocols, this, (response) => this.#onConnectionEstablished(response), options); - this[kReadyState] = WebSocket.CONNECTING; - this[kBinaryType] = "blob"; - } - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close(code = void 0, reason = void 0) { - webidl.brandCheck(this, WebSocket); - if (code !== void 0) code = webidl.converters["unsigned short"](code, { clamp: true }); - if (reason !== void 0) reason = webidl.converters.USVString(reason); - if (code !== void 0) { - if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException$1("invalid code", "InvalidAccessError"); - } - let reasonByteLength = 0; - if (reason !== void 0) { - reasonByteLength = Buffer.byteLength(reason); - if (reasonByteLength > 123) throw new DOMException$1(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); - } - if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) {} else if (!isEstablished(this)) { - failWebsocketConnection(this, "Connection was closed before it was established."); - this[kReadyState] = WebSocket.CLOSING; - } else if (!isClosing(this)) { - const frame = new WebsocketFrameSend(); - if (code !== void 0 && reason === void 0) { - frame.frameData = Buffer.allocUnsafe(2); - frame.frameData.writeUInt16BE(code, 0); - } else if (code !== void 0 && reason !== void 0) { - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); - frame.frameData.writeUInt16BE(code, 0); - frame.frameData.write(reason, 2, "utf-8"); - } else frame.frameData = emptyBuffer; - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket; - socket.write(frame.createFrame(opcodes.CLOSE), (err) => { - if (!err) this[kSentClose] = true; - }); - this[kReadyState] = states.CLOSING; - } else this[kReadyState] = WebSocket.CLOSING; - } - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send(data) { - webidl.brandCheck(this, WebSocket); - webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket.send" }); - data = webidl.converters.WebSocketSendData(data); - if (this[kReadyState] === WebSocket.CONNECTING) throw new DOMException$1("Sent before connected.", "InvalidStateError"); - if (!isEstablished(this) || isClosing(this)) return; - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket; - if (typeof data === "string") { - const value = Buffer.from(data); - const frame = new WebsocketFrameSend(value); - const buffer = frame.createFrame(opcodes.TEXT); - this.#bufferedAmount += value.byteLength; - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength; - }); - } else if (types.isArrayBuffer(data)) { - const value = Buffer.from(data); - const frame = new WebsocketFrameSend(value); - const buffer = frame.createFrame(opcodes.BINARY); - this.#bufferedAmount += value.byteLength; - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength; - }); - } else if (ArrayBuffer.isView(data)) { - const ab = Buffer.from(data, data.byteOffset, data.byteLength); - const frame = new WebsocketFrameSend(ab); - const buffer = frame.createFrame(opcodes.BINARY); - this.#bufferedAmount += ab.byteLength; - socket.write(buffer, () => { - this.#bufferedAmount -= ab.byteLength; - }); - } else if (isBlobLike(data)) { - const frame = new WebsocketFrameSend(); - data.arrayBuffer().then((ab) => { - const value = Buffer.from(ab); - frame.frameData = value; - const buffer = frame.createFrame(opcodes.BINARY); - this.#bufferedAmount += value.byteLength; - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength; - }); - }); - } - } - get readyState() { - webidl.brandCheck(this, WebSocket); - return this[kReadyState]; - } - get bufferedAmount() { - webidl.brandCheck(this, WebSocket); - return this.#bufferedAmount; - } - get url() { - webidl.brandCheck(this, WebSocket); - return URLSerializer(this[kWebSocketURL]); - } - get extensions() { - webidl.brandCheck(this, WebSocket); - return this.#extensions; - } - get protocol() { - webidl.brandCheck(this, WebSocket); - return this.#protocol; - } - get onopen() { - webidl.brandCheck(this, WebSocket); - return this.#events.open; - } - set onopen(fn) { - webidl.brandCheck(this, WebSocket); - if (this.#events.open) this.removeEventListener("open", this.#events.open); - if (typeof fn === "function") { - this.#events.open = fn; - this.addEventListener("open", fn); - } else this.#events.open = null; - } - get onerror() { - webidl.brandCheck(this, WebSocket); - return this.#events.error; - } - set onerror(fn) { - webidl.brandCheck(this, WebSocket); - if (this.#events.error) this.removeEventListener("error", this.#events.error); - if (typeof fn === "function") { - this.#events.error = fn; - this.addEventListener("error", fn); - } else this.#events.error = null; - } - get onclose() { - webidl.brandCheck(this, WebSocket); - return this.#events.close; - } - set onclose(fn) { - webidl.brandCheck(this, WebSocket); - if (this.#events.close) this.removeEventListener("close", this.#events.close); - if (typeof fn === "function") { - this.#events.close = fn; - this.addEventListener("close", fn); - } else this.#events.close = null; - } - get onmessage() { - webidl.brandCheck(this, WebSocket); - return this.#events.message; - } - set onmessage(fn) { - webidl.brandCheck(this, WebSocket); - if (this.#events.message) this.removeEventListener("message", this.#events.message); - if (typeof fn === "function") { - this.#events.message = fn; - this.addEventListener("message", fn); - } else this.#events.message = null; - } - get binaryType() { - webidl.brandCheck(this, WebSocket); - return this[kBinaryType]; - } - set binaryType(type) { - webidl.brandCheck(this, WebSocket); - if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; - else this[kBinaryType] = type; - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished(response) { - this[kResponse] = response; - const parser = new ByteParser(this); - parser.on("drain", function onParserDrain() { - this.ws[kResponse].socket.resume(); - }); - response.socket.ws = this; - this[kByteParser] = parser; - this[kReadyState] = states.OPEN; - const extensions = response.headersList.get("sec-websocket-extensions"); - if (extensions !== null) this.#extensions = extensions; - const protocol = response.headersList.get("sec-websocket-protocol"); - if (protocol !== null) this.#protocol = protocol; - fireEvent("open", this); - } - }; - WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; - WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; - WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; - WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; - Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: "WebSocket", - writable: false, - enumerable: false, - configurable: true - } - }); - Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors - }); - webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); - webidl.converters["DOMString or sequence"] = function(V) { - if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); - return webidl.converters.DOMString(V); - }; - webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: "protocols", - converter: webidl.converters["DOMString or sequence"], - get defaultValue() { - return []; - } - }, - { - key: "dispatcher", - converter: (V) => V, - get defaultValue() { - return getGlobalDispatcher$1(); - } - }, - { - key: "headers", - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } - ]); - webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { - if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); - return { protocols: webidl.converters["DOMString or sequence"](V) }; - }; - webidl.converters.WebSocketSendData = function(V) { - if (webidl.util.Type(V) === "Object") { - if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); - if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) return webidl.converters.BufferSource(V); - } - return webidl.converters.USVString(V); - }; - module.exports = { WebSocket }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/index.js -var require_undici = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/index.js"(exports, module) { - const Client = require_client(); - const Dispatcher = require_dispatcher(); - const errors = require_errors(); - const Pool = require_pool(); - const BalancedPool = require_balanced_pool(); - const Agent = require_agent(); - const util = require_util$6(); - const { InvalidArgumentError } = errors; - const api = require_api(); - const buildConnector = require_connect(); - const MockClient = require_mock_client(); - const MockAgent = require_mock_agent(); - const MockPool = require_mock_pool(); - const mockErrors = require_mock_errors(); - const ProxyAgent = require_proxy_agent(); - const RetryHandler = require_RetryHandler(); - const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); - const DecoratorHandler = require_DecoratorHandler(); - const RedirectHandler = require_RedirectHandler(); - const createRedirectInterceptor = require_redirectInterceptor(); - let hasCrypto; - try { - __require("crypto"); - hasCrypto = true; - } catch { - hasCrypto = false; - } - Object.assign(Dispatcher.prototype, api); - module.exports.Dispatcher = Dispatcher; - module.exports.Client = Client; - module.exports.Pool = Pool; - module.exports.BalancedPool = BalancedPool; - module.exports.Agent = Agent; - module.exports.ProxyAgent = ProxyAgent; - module.exports.RetryHandler = RetryHandler; - module.exports.DecoratorHandler = DecoratorHandler; - module.exports.RedirectHandler = RedirectHandler; - module.exports.createRedirectInterceptor = createRedirectInterceptor; - module.exports.buildConnector = buildConnector; - module.exports.errors = errors; - function makeDispatcher(fn) { - return (url, opts, handler) => { - if (typeof opts === "function") { - handler = opts; - opts = null; - } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); - if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); - if (opts && opts.path != null) { - if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); - let path$5 = opts.path; - if (!opts.path.startsWith("/")) path$5 = `/${path$5}`; - url = new URL(util.parseOrigin(url).origin + path$5); - } else { - if (!opts) opts = typeof url === "object" ? url : {}; - url = util.parseURL(url); - } - const { agent, dispatcher = getGlobalDispatcher() } = opts; - if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? "PUT" : "GET") - }, handler); - }; - } - module.exports.setGlobalDispatcher = setGlobalDispatcher; - module.exports.getGlobalDispatcher = getGlobalDispatcher; - if (util.nodeMajor > 16 || util.nodeMajor === 16 && util.nodeMinor >= 8) { - let fetchImpl = null; - module.exports.fetch = async function fetch$1(resource) { - if (!fetchImpl) fetchImpl = require_fetch().fetch; - try { - return await fetchImpl(...arguments); - } catch (err) { - if (typeof err === "object") Error.captureStackTrace(err, this); - throw err; - } - }; - module.exports.Headers = require_headers().Headers; - module.exports.Response = require_response().Response; - module.exports.Request = require_request().Request; - module.exports.FormData = require_formdata().FormData; - module.exports.File = require_file().File; - module.exports.FileReader = require_filereader().FileReader; - const { setGlobalOrigin: setGlobalOrigin$1, getGlobalOrigin: getGlobalOrigin$5 } = require_global$1(); - module.exports.setGlobalOrigin = setGlobalOrigin$1; - module.exports.getGlobalOrigin = getGlobalOrigin$5; - const { CacheStorage: CacheStorage$1 } = require_cachestorage(); - const { kConstruct: kConstruct$5 } = require_symbols$1(); - module.exports.caches = new CacheStorage$1(kConstruct$5); - } - if (util.nodeMajor >= 16) { - const { deleteCookie: deleteCookie$1, getCookies: getCookies$1, getSetCookies: getSetCookies$1, setCookie: setCookie$1 } = require_cookies(); - module.exports.deleteCookie = deleteCookie$1; - module.exports.getCookies = getCookies$1; - module.exports.getSetCookies = getSetCookies$1; - module.exports.setCookie = setCookie$1; - const { parseMIMEType: parseMIMEType$4, serializeAMimeType: serializeAMimeType$5 } = require_dataURL(); - module.exports.parseMIMEType = parseMIMEType$4; - module.exports.serializeAMimeType = serializeAMimeType$5; - } - if (util.nodeMajor >= 18 && hasCrypto) { - const { WebSocket: WebSocket$1 } = require_websocket(); - module.exports.WebSocket = WebSocket$1; - } - module.exports.request = makeDispatcher(api.request); - module.exports.stream = makeDispatcher(api.stream); - module.exports.pipeline = makeDispatcher(api.pipeline); - module.exports.connect = makeDispatcher(api.connect); - module.exports.upgrade = makeDispatcher(api.upgrade); - module.exports.MockClient = MockClient; - module.exports.MockPool = MockPool; - module.exports.MockAgent = MockAgent; - module.exports.mockErrors = mockErrors; -} }); - -//#endregion -//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js -var require_lib = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js"(exports) { - var __createBinding$7 = exports && exports.__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$7 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$7 = exports && exports.__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$7(result, mod, k); - } - __setModuleDefault$7(result, mod); - return result; - }; - var __awaiter$9 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; - const http = __importStar$7(__require("http")); - const https = __importStar$7(__require("https")); - const pm = __importStar$7(require_proxy()); - const tunnel = __importStar$7(require_tunnel()); - const undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes$1) { - HttpCodes$1[HttpCodes$1["OK"] = 200] = "OK"; - HttpCodes$1[HttpCodes$1["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes$1[HttpCodes$1["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes$1[HttpCodes$1["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes$1[HttpCodes$1["SeeOther"] = 303] = "SeeOther"; - HttpCodes$1[HttpCodes$1["NotModified"] = 304] = "NotModified"; - HttpCodes$1[HttpCodes$1["UseProxy"] = 305] = "UseProxy"; - HttpCodes$1[HttpCodes$1["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes$1[HttpCodes$1["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes$1[HttpCodes$1["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes$1[HttpCodes$1["BadRequest"] = 400] = "BadRequest"; - HttpCodes$1[HttpCodes$1["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes$1[HttpCodes$1["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes$1[HttpCodes$1["Forbidden"] = 403] = "Forbidden"; - HttpCodes$1[HttpCodes$1["NotFound"] = 404] = "NotFound"; - HttpCodes$1[HttpCodes$1["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes$1[HttpCodes$1["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes$1[HttpCodes$1["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes$1[HttpCodes$1["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes$1[HttpCodes$1["Conflict"] = 409] = "Conflict"; - HttpCodes$1[HttpCodes$1["Gone"] = 410] = "Gone"; - HttpCodes$1[HttpCodes$1["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes$1[HttpCodes$1["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes$1[HttpCodes$1["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes$1[HttpCodes$1["BadGateway"] = 502] = "BadGateway"; - HttpCodes$1[HttpCodes$1["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes$1[HttpCodes$1["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers$7) { - Headers$7["Accept"] = "accept"; - Headers$7["ContentType"] = "content-type"; - })(Headers || (exports.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes$1) { - MediaTypes$1["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports.MediaTypes = MediaTypes = {})); - /** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports.getProxyUrl = getProxyUrl; - const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - const RetryableHttpVerbs = [ - "OPTIONS", - "GET", - "DELETE", - "HEAD" - ]; - const ExponentialBackoffCeiling = 10; - const ExponentialBackoffTimeSlice = 5; - var HttpClientError = class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } - }; - exports.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter$9(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter$9(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter$9(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter$9(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports.isHttps = isHttps; - var HttpClient = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) this._ignoreSslError = requestOptions.ignoreSslError; - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) this._allowRedirects = requestOptions.allowRedirects; - if (requestOptions.allowRedirectDowngrade != null) this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - if (requestOptions.maxRedirects != null) this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - if (requestOptions.keepAlive != null) this._keepAlive = requestOptions.keepAlive; - if (requestOptions.allowRetries != null) this._allowRetries = requestOptions.allowRetries; - if (requestOptions.maxRetries != null) this._maxRetries = requestOptions.maxRetries; - } - } - options(requestUrl, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream$2, additionalHeaders) { - return __awaiter$9(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream$2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter$9(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter$9(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter$9(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter$9(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter$9(this, void 0, void 0, function* () { - if (this._disposed) throw new Error("Client has already been disposed."); - const parsedUrl = new URL(requestUrl); - let info$1 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info$1, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - if (authenticationHandler) return authenticationHandler.handleAuthentication(this, info$1, data); - else return response; - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) break; - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) if (header.toLowerCase() === "authorization") delete headers[header]; - } - info$1 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info$1, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) return response; - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) this._agent.destroy(); - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info$1, data) { - return __awaiter$9(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) reject(err); - else if (!res) reject(new Error("Unknown error")); - else resolve(res); - } - this.requestRawWithCallback(info$1, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info$1, data, onResult) { - if (typeof data === "string") { - if (!info$1.options.headers) info$1.options.headers = {}; - info$1.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info$1.httpModule.request(info$1.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) socket.end(); - handleResult(new Error(`Request timeout: ${info$1.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") req.write(data, "utf8"); - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else req.end(); - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) return; - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info$1 = {}; - info$1.parsedUrl = requestUrl; - const usingSsl = info$1.parsedUrl.protocol === "https:"; - info$1.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info$1.options = {}; - info$1.options.host = info$1.parsedUrl.hostname; - info$1.options.port = info$1.parsedUrl.port ? parseInt(info$1.parsedUrl.port) : defaultPort; - info$1.options.path = (info$1.parsedUrl.pathname || "") + (info$1.parsedUrl.search || ""); - info$1.options.method = method; - info$1.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) info$1.options.headers["user-agent"] = this.userAgent; - info$1.options.agent = this._getAgent(info$1.parsedUrl); - if (this.handlers) for (const handler of this.handlers) handler.prepareRequest(info$1.options); - return info$1; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) agent = this._proxyAgent; - if (!useProxy) agent = this._agent; - if (agent) return agent; - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { - host: proxyUrl.hostname, - port: proxyUrl.port - }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - else tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { - keepAlive: this._keepAlive, - maxSockets - }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) proxyAgent = this._proxyAgentDispatcher; - if (proxyAgent) return proxyAgent; - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ - uri: proxyUrl.href, - pipelining: !this._keepAlive ? 0 : 1 - }, (proxyUrl.username || proxyUrl.password) && { token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { rejectUnauthorized: false }); - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter$9(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter$9(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter$9(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) resolve(response); - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) return a; - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) obj = JSON.parse(contents, dateTimeDeserializer); - else obj = JSON.parse(contents); - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) {} - if (statusCode > 299) { - let msg; - if (obj && obj.message) msg = obj.message; - else if (contents && contents.length > 0) msg = contents; - else msg = `Failed request: (${statusCode})`; - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else resolve(response); - })); - }); - } - }; - exports.HttpClient = HttpClient; - const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); -} }); - -//#endregion -//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js -var require_auth = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js"(exports) { - var __awaiter$8 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) throw Error("The request has no headers"); - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter$8(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - prepareRequest(options) { - if (!options.headers) throw Error("The request has no headers"); - options.headers["Authorization"] = `Bearer ${this.token}`; - } - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter$8(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - prepareRequest(options) { - if (!options.headers) throw Error("The request has no headers"); - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter$8(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js -var require_oidc_utils = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js"(exports) { - var __awaiter$7 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.OidcClient = void 0; - const http_client_1 = require_lib(); - const auth_1 = require_auth(); - const core_1 = require_core(); - var OidcClient = class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); - return runtimeUrl; - } - static getCall(id_token_url) { - var _a$1; - return __awaiter$7(this, void 0, void 0, function* () { - const httpclient = OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error$1) => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error$1.statusCode}\n - Error Message: ${error$1.message}`); - }); - const id_token = (_a$1 = res.result) === null || _a$1 === void 0 ? void 0 : _a$1.value; - if (!id_token) throw new Error("Response json body do not have ID Token field"); - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter$7(this, void 0, void 0, function* () { - try { - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, core_1.debug)(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - (0, core_1.setSecret)(id_token); - return id_token; - } catch (error$1) { - throw new Error(`Error message: ${error$1.message}`); - } - }); - } - }; - exports.OidcClient = OidcClient; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js -var require_summary = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js"(exports) { - var __awaiter$6 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; - const os_1$1 = __require("os"); - const fs_1 = __require("fs"); - const { access, appendFile, writeFile } = fs_1.promises; - exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; - var Summary = class { - constructor() { - this._buffer = ""; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter$6(this, void 0, void 0, function* () { - if (this._filePath) return this._filePath; - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a$1) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); - if (!content) return `<${tag}${htmlAttrs}>`; - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter$6(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter$6(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1$1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows.map((row) => { - const cells = row.map((cell) => { - if (typeof cell === "string") return this.wrap("td", cell); - const { header, data, colspan, rowspan } = cell; - const tag = header ? "th" : "td"; - const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); - return this.wrap(tag, data, attrs); - }).join(""); - return this.wrap("tr", cells); - }).join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src$1, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); - const element = this.wrap("img", null, Object.assign({ - src: src$1, - alt - }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = [ - "h1", - "h2", - "h3", - "h4", - "h5", - "h6" - ].includes(tag) ? tag : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); - } - }; - const _summary = new Summary(); - /** - * @deprecated use `core.summary` - */ - exports.markdownSummary = _summary; - exports.summary = _summary; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js -var require_path_utils = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js"(exports) { - var __createBinding$6 = exports && exports.__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$6 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$6 = exports && exports.__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$6(result, mod, k); - } - __setModuleDefault$6(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - const path$4 = __importStar$6(__require("path")); - /** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ - function toPosixPath(pth) { - return pth.replace(/[\\]/g, "/"); - } - exports.toPosixPath = toPosixPath; - /** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ - function toWin32Path(pth) { - return pth.replace(/[/]/g, "\\"); - } - exports.toWin32Path = toWin32Path; - /** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ - function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path$4.sep); - } - exports.toPlatformPath = toPlatformPath; -} }); - -//#endregion -//#region node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js -var require_io_util = __commonJS({ "node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js"(exports) { - var __createBinding$5 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$5 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$5 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$5(result, mod, k); - } - __setModuleDefault$5(result, mod); - return result; - }; - var __awaiter$5 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; - const fs = __importStar$5(__require("fs")); - const path$3 = __importStar$5(__require("path")); - _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; - exports.IS_WINDOWS = process.platform === "win32"; - exports.UV_FS_O_EXLOCK = 268435456; - exports.READONLY = fs.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter$5(this, void 0, void 0, function* () { - try { - yield exports.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") return false; - throw err; - } - return true; - }); - } - exports.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter$5(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports.isDirectory = isDirectory; - /** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); - if (exports.IS_WINDOWS) return p.startsWith("\\") || /^[A-Z]:/i.test(p); - return p.startsWith("/"); - } - exports.isRooted = isRooted; - /** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ - function tryGetExecutablePath(filePath, extensions) { - return __awaiter$5(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - const upperExt = path$3.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; - } else if (isUnixExecutable(stats)) return filePath; - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - try { - const directory = path$3.dirname(filePath); - const upperName = path$3.basename(filePath).toUpperCase(); - for (const actualName of yield exports.readdir(directory)) if (upperName === actualName.toUpperCase()) { - filePath = path$3.join(directory, actualName); - break; - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else if (isUnixExecutable(stats)) return filePath; - } - } - return ""; - }); - } - exports.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a$1; - return (_a$1 = process.env["COMSPEC"]) !== null && _a$1 !== void 0 ? _a$1 : `cmd.exe`; - } - exports.getCmdPath = getCmdPath; -} }); - -//#endregion -//#region node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js -var require_io = __commonJS({ "node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js"(exports) { - var __createBinding$4 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$4 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$4 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$4(result, mod, k); - } - __setModuleDefault$4(result, mod); - return result; - }; - var __awaiter$4 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; - const assert_1 = __require("assert"); - const path$2 = __importStar$4(__require("path")); - const ioUtil$1 = __importStar$4(require_io_util()); - /** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ - function cp(source, dest, options = {}) { - return __awaiter$4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil$1.exists(dest)) ? yield ioUtil$1.stat(dest) : null; - if (destStat && destStat.isFile() && !force) return; - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path$2.join(dest, path$2.basename(source)) : dest; - if (!(yield ioUtil$1.exists(source))) throw new Error(`no such file or directory: ${source}`); - const sourceStat = yield ioUtil$1.stat(source); - if (sourceStat.isDirectory()) if (!recursive) throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - else yield cpDirRecursive(source, newDest, 0, force); - else { - if (path$2.relative(source, newDest) === "") throw new Error(`'${newDest}' and '${source}' are the same file`); - yield copyFile(source, newDest, force); - } - }); - } - exports.cp = cp; - /** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ - function mv(source, dest, options = {}) { - return __awaiter$4(this, void 0, void 0, function* () { - if (yield ioUtil$1.exists(dest)) { - let destExists = true; - if (yield ioUtil$1.isDirectory(dest)) { - dest = path$2.join(dest, path$2.basename(source)); - destExists = yield ioUtil$1.exists(dest); - } - if (destExists) if (options.force == null || options.force) yield rmRF(dest); - else throw new Error("Destination already exists"); - } - yield mkdirP(path$2.dirname(dest)); - yield ioUtil$1.rename(source, dest); - }); - } - exports.mv = mv; - /** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ - function rmRF(inputPath) { - return __awaiter$4(this, void 0, void 0, function* () { - if (ioUtil$1.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) throw new Error("File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows"); - } - try { - yield ioUtil$1.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports.rmRF = rmRF; - /** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ - function mkdirP(fsPath) { - return __awaiter$4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil$1.mkdir(fsPath, { recursive: true }); - }); - } - exports.mkdirP = mkdirP; - /** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ - function which(tool, check) { - return __awaiter$4(this, void 0, void 0, function* () { - if (!tool) throw new Error("parameter 'tool' is required"); - if (check) { - const result = yield which(tool, false); - if (!result) if (ioUtil$1.IS_WINDOWS) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) return matches[0]; - return ""; - }); - } - exports.which = which; - /** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ - function findInPath(tool) { - return __awaiter$4(this, void 0, void 0, function* () { - if (!tool) throw new Error("parameter 'tool' is required"); - const extensions = []; - if (ioUtil$1.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path$2.delimiter)) if (extension) extensions.push(extension); - } - if (ioUtil$1.isRooted(tool)) { - const filePath = yield ioUtil$1.tryGetExecutablePath(tool, extensions); - if (filePath) return [filePath]; - return []; - } - if (tool.includes(path$2.sep)) return []; - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path$2.delimiter)) if (p) directories.push(p); - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil$1.tryGetExecutablePath(path$2.join(directory, tool), extensions); - if (filePath) matches.push(filePath); - } - return matches; - }); - } - exports.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { - force, - recursive, - copySourceDirectory - }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter$4(this, void 0, void 0, function* () { - if (currentDepth >= 255) return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil$1.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil$1.lstat(srcFile); - if (srcFileStat.isDirectory()) yield cpDirRecursive(srcFile, destFile, currentDepth, force); - else yield copyFile(srcFile, destFile, force); - } - yield ioUtil$1.chmod(destDir, (yield ioUtil$1.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter$4(this, void 0, void 0, function* () { - if ((yield ioUtil$1.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil$1.lstat(destFile); - yield ioUtil$1.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil$1.chmod(destFile, "0666"); - yield ioUtil$1.unlink(destFile); - } - } - const symlinkFull = yield ioUtil$1.readlink(srcFile); - yield ioUtil$1.symlink(symlinkFull, destFile, ioUtil$1.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil$1.exists(destFile)) || force) yield ioUtil$1.copyFile(srcFile, destFile); - }); - } -} }); - -//#endregion -//#region node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js -var require_toolrunner = __commonJS({ "node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js"(exports) { - var __createBinding$3 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$3 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$3(result, mod, k); - } - __setModuleDefault$3(result, mod); - return result; - }; - var __awaiter$3 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.argStringToArray = exports.ToolRunner = void 0; - const os$1 = __importStar$3(__require("os")); - const events = __importStar$3(__require("events")); - const child = __importStar$3(__require("child_process")); - const path$1 = __importStar$3(__require("path")); - const io = __importStar$3(require_io()); - const ioUtil = __importStar$3(require_io_util()); - const timers_1 = __require("timers"); - const IS_WINDOWS = process.platform === "win32"; - var ToolRunner = class extends events.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) throw new Error("Parameter 'toolPath' cannot be null or empty."); - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) this.options.listeners.debug(message); - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? "" : "[command]"; - if (IS_WINDOWS) if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) cmd += ` ${a}`; - } else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) cmd += ` ${a}`; - } else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - else { - cmd += toolPath; - for (const a of args) cmd += ` ${a}`; - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(os$1.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - s = s.substring(n + os$1.EOL.length); - n = s.indexOf(os$1.EOL); - } - return s; - } catch (err) { - this._debug(`error processing line. Failed with error ${err}`); - return ""; - } - } - _getSpawnFileName() { - if (IS_WINDOWS) { - if (this._isCmdFile()) return process.env["COMSPEC"] || "cmd.exe"; - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += " "; - argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); - } - argline += "\""; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); - } - _windowsQuoteCmdArg(arg) { - if (!this._isCmdFile()) return this._uvQuoteCmdArg(arg); - if (!arg) return "\"\""; - const cmdSpecialChars = [ - " ", - " ", - "&", - "(", - ")", - "[", - "]", - "{", - "}", - "^", - "=", - ";", - "!", - "'", - "+", - ",", - "`", - "~", - "|", - "<", - ">", - "\"" - ]; - let needsQuotes = false; - for (const char of arg) if (cmdSpecialChars.some((x) => x === char)) { - needsQuotes = true; - break; - } - if (!needsQuotes) return arg; - let reverse = "\""; - let quoteHit = true; - for (let i$1 = arg.length; i$1 > 0; i$1--) { - reverse += arg[i$1 - 1]; - if (quoteHit && arg[i$1 - 1] === "\\") reverse += "\\"; - else if (arg[i$1 - 1] === "\"") { - quoteHit = true; - reverse += "\""; - } else quoteHit = false; - } - reverse += "\""; - return reverse.split("").reverse().join(""); - } - _uvQuoteCmdArg(arg) { - if (!arg) return "\"\""; - if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes("\"")) return arg; - if (!arg.includes("\"") && !arg.includes("\\")) return `"${arg}"`; - let reverse = "\""; - let quoteHit = true; - for (let i$1 = arg.length; i$1 > 0; i$1--) { - reverse += arg[i$1 - 1]; - if (quoteHit && arg[i$1 - 1] === "\\") reverse += "\\"; - else if (arg[i$1 - 1] === "\"") { - quoteHit = true; - reverse += "\\"; - } else quoteHit = false; - } - reverse += "\""; - return reverse.split("").reverse().join(""); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 1e4 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) result.argv0 = `"${toolPath}"`; - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter$3(this, void 0, void 0, function* () { - if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) this.toolPath = path$1.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter$3(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug("arguments:"); - for (const arg of this.args) this._debug(` ${arg}`); - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os$1.EOL); - const state = new ExecState(optionsNonNull, this.toolPath); - state.on("debug", (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - const fileName = this._getSpawnFileName(); - const cp$1 = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ""; - if (cp$1.stdout) cp$1.stdout.on("data", (data) => { - if (this.options.listeners && this.options.listeners.stdout) this.options.listeners.stdout(data); - if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(data); - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) this.options.listeners.stdline(line); - }); - }); - let errbuffer = ""; - if (cp$1.stderr) cp$1.stderr.on("data", (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) this.options.listeners.stderr(data); - if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) this.options.listeners.errline(line); - }); - }); - cp$1.on("error", (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp$1.on("exit", (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp$1.on("close", (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on("done", (error$1, exitCode) => { - if (stdbuffer.length > 0) this.emit("stdline", stdbuffer); - if (errbuffer.length > 0) this.emit("errline", errbuffer); - cp$1.removeAllListeners(); - if (error$1) reject(error$1); - else resolve(exitCode); - }); - if (this.options.input) { - if (!cp$1.stdin) throw new Error("child process missing stdin"); - cp$1.stdin.end(this.options.input); - } - })); - }); - } - }; - exports.ToolRunner = ToolRunner; - /** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ - function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ""; - function append(c) { - if (escaped && c !== "\"") arg += "\\"; - arg += c; - escaped = false; - } - for (let i$1 = 0; i$1 < argString.length; i$1++) { - const c = argString.charAt(i$1); - if (c === "\"") { - if (!escaped) inQuotes = !inQuotes; - else append(c); - continue; - } - if (c === "\\" && escaped) { - append(c); - continue; - } - if (c === "\\" && inQuotes) { - escaped = true; - continue; - } - if (c === " " && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ""; - } - continue; - } - append(c); - } - if (arg.length > 0) args.push(arg.trim()); - return args; - } - exports.argStringToArray = argStringToArray; - var ExecState = class ExecState extends events.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; - this.processError = ""; - this.processExitCode = 0; - this.processExited = false; - this.processStderr = false; - this.delay = 1e4; - this.done = false; - this.timeout = null; - if (!toolPath) throw new Error("toolPath must not be empty"); - this.options = options; - this.toolPath = toolPath; - if (options.delay) this.delay = options.delay; - } - CheckComplete() { - if (this.done) return; - if (this.processClosed) this._setResult(); - else if (this.processExited) this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); - } - _debug(message) { - this.emit("debug", message); - } - _setResult() { - let error$1; - if (this.processExited) { - if (this.processError) error$1 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) error$1 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - else if (this.processStderr && this.options.failOnStdErr) error$1 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit("done", error$1, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) return; - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js -var require_exec = __commonJS({ "node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js"(exports) { - var __createBinding$2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$2 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$2(result, mod, k); - } - __setModuleDefault$2(result, mod); - return result; - }; - var __awaiter$2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getExecOutput = exports.exec = void 0; - const string_decoder_1 = __require("string_decoder"); - const tr = __importStar$2(require_toolrunner()); - /** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ - function exec$1(commandLine, args, options) { - return __awaiter$2(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); - } - exports.exec = exec$1; - /** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ - function getExecOutput(commandLine, args, options) { - var _a$1, _b; - return __awaiter$2(this, void 0, void 0, function* () { - let stdout = ""; - let stderr = ""; - const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); - const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a$1 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a$1 === void 0 ? void 0 : _a$1.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) originalStdErrListener(data); - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) originalStdoutListener(data); - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { - stdout: stdOutListener, - stderr: stdErrListener - }); - const exitCode = yield exec$1(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); - } - exports.getExecOutput = getExecOutput; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js -var require_platform = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js"(exports) { - var __createBinding$1 = exports && exports.__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$1 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$1 = exports && exports.__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$1(result, mod, k); - } - __setModuleDefault$1(result, mod); - return result; - }; - var __awaiter$1 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; - const os_1 = __importDefault(__require("os")); - const exec = __importStar$1(require_exec()); - const getWindowsInfo = () => __awaiter$1(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"", void 0, { silent: true }); - const { stdout: name } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"", void 0, { silent: true }); - return { - name: name.trim(), - version: version.trim() - }; - }); - const getMacOsInfo = () => __awaiter$1(void 0, void 0, void 0, function* () { - var _a$1, _b, _c, _d; - const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); - const version = (_b = (_a$1 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a$1 === void 0 ? void 0 : _a$1[1]) !== null && _b !== void 0 ? _b : ""; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; - return { - name, - version - }; - }); - const getLinuxInfo = () => __awaiter$1(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput("lsb_release", [ - "-i", - "-r", - "-s" - ], { silent: true }); - const [name, version] = stdout.trim().split("\n"); - return { - name, - version - }; - }); - exports.platform = os_1.default.platform(); - exports.arch = os_1.default.arch(); - exports.isWindows = exports.platform === "win32"; - exports.isMacOS = exports.platform === "darwin"; - exports.isLinux = exports.platform === "linux"; - function getDetails() { - return __awaiter$1(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, yield exports.isWindows ? getWindowsInfo() : exports.isMacOS ? getMacOsInfo() : getLinuxInfo()), { - platform: exports.platform, - arch: exports.arch, - isWindows: exports.isWindows, - isMacOS: exports.isMacOS, - isLinux: exports.isLinux - }); - }); - } - exports.getDetails = getDetails; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js"(exports) { - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; - const command_1 = require_command(); - const file_command_1 = require_file_command(); - const utils_1 = require_utils$1(); - const os = __importStar(__require("os")); - const path = __importStar(__require("path")); - const oidc_utils_1 = require_oidc_utils(); - /** - * The code to exit an action - */ - var ExitCode; - (function(ExitCode$1) { - /** - * A code indicating that the action was successful - */ - ExitCode$1[ExitCode$1["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode$1[ExitCode$1["Failure"] = 1] = "Failure"; - })(ExitCode || (exports.ExitCode = ExitCode = {})); - /** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ - function exportVariable(name, val) { - const convertedVal = (0, utils_1.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); - (0, command_1.issueCommand)("set-env", { name }, convertedVal); - } - exports.exportVariable = exportVariable; - /** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ - function setSecret(secret) { - (0, command_1.issueCommand)("add-mask", {}, secret); - } - exports.setSecret = setSecret; - /** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) (0, file_command_1.issueFileCommand)("PATH", inputPath); - else (0, command_1.issueCommand)("add-path", {}, inputPath); - process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; - } - exports.addPath = addPath; - /** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ - function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) throw new Error(`Input required and not supplied: ${name}`); - if (options && options.trimWhitespace === false) return val; - return val.trim(); - } - exports.getInput = getInput; - /** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ - function getMultilineInput(name, options) { - const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); - if (options && options.trimWhitespace === false) return inputs; - return inputs.map((input) => input.trim()); - } - exports.getMultilineInput = getMultilineInput; - /** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ - function getBooleanInput(name, options) { - const trueValue = [ - "true", - "True", - "TRUE" - ]; - const falseValue = [ - "false", - "False", - "FALSE" - ]; - const val = getInput(name, options); - if (trueValue.includes(val)) return true; - if (falseValue.includes(val)) return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``); - } - exports.getBooleanInput = getBooleanInput; - /** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ - function setOutput(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); - process.stdout.write(os.EOL); - (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); - } - exports.setOutput = setOutput; - /** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ - function setCommandEcho(enabled) { - (0, command_1.issue)("echo", enabled ? "on" : "off"); - } - exports.setCommandEcho = setCommandEcho; - /** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ - function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); - } - exports.setFailed = setFailed; - /** - * Gets whether Actions Step Debug is on or not - */ - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - exports.isDebug = isDebug; - /** - * Writes debug message to user log - * @param message debug message - */ - function debug$1(message) { - (0, command_1.issueCommand)("debug", {}, message); - } - exports.debug = debug$1; - /** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function error(message, properties = {}) { - (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports.error = error; - /** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function warning(message, properties = {}) { - (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports.warning = warning; - /** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function notice(message, properties = {}) { - (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports.notice = notice; - /** - * Writes info to log with console.log. - * @param message info message - */ - function info(message) { - process.stdout.write(message + os.EOL); - } - exports.info = info; - /** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ - function startGroup(name) { - (0, command_1.issue)("group", name); - } - exports.startGroup = startGroup; - /** - * End an output group. - */ - function endGroup() { - (0, command_1.issue)("endgroup"); - } - exports.endGroup = endGroup; - /** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ - function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); - } - return result; - }); - } - exports.group = group; - /** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); - (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); - } - exports.saveState = saveState; - /** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - exports.getState = getState; - function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); - } - exports.getIDToken = getIDToken; - /** - * Summary exports - */ - var summary_1 = require_summary(); - Object.defineProperty(exports, "summary", { - enumerable: true, - get: function() { - return summary_1.summary; - } - }); - /** - * @deprecated use core.summary - */ - var summary_2 = require_summary(); - Object.defineProperty(exports, "markdownSummary", { - enumerable: true, - get: function() { - return summary_2.markdownSummary; - } - }); - /** - * Path exports - */ - var path_utils_1 = require_path_utils(); - Object.defineProperty(exports, "toPosixPath", { - enumerable: true, - get: function() { - return path_utils_1.toPosixPath; - } - }); - Object.defineProperty(exports, "toWin32Path", { - enumerable: true, - get: function() { - return path_utils_1.toWin32Path; - } - }); - Object.defineProperty(exports, "toPlatformPath", { - enumerable: true, - get: function() { - return path_utils_1.toPlatformPath; - } - }); - /** - * Platform utilities exports - */ - exports.platform = __importStar(require_platform()); -} }); -var import_core = __toESM(require_core(), 1); - -//#endregion -//#region node_modules/.deno/semver@6.3.1/node_modules/semver/semver.js -var require_semver = __commonJS({ "node_modules/.deno/semver@6.3.1/node_modules/semver/semver.js"(exports, module) { - exports = module.exports = SemVer; - var debug; - /* istanbul ignore next */ - if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) debug = function() { - var args = Array.prototype.slice.call(arguments, 0); - args.unshift("SEMVER"); - console.log.apply(console, args); - }; - else debug = function() {}; - exports.SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - var re = exports.re = []; - var safeRe = exports.safeRe = []; - var src = exports.src = []; - var t = exports.tokens = {}; - var R = 0; - function tok(n) { - t[n] = R++; - } - var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; - var safeRegexReplacements = [ - ["\\s", 1], - ["\\d", MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] - ]; - function makeSafeRe(value) { - for (var i$1 = 0; i$1 < safeRegexReplacements.length; i$1++) { - var token = safeRegexReplacements[i$1][0]; - var max = safeRegexReplacements[i$1][1]; - value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); - } - return value; - } - tok("NUMERICIDENTIFIER"); - src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; - tok("NUMERICIDENTIFIERLOOSE"); - src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; - tok("NONNUMERICIDENTIFIER"); - src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; - tok("MAINVERSION"); - src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; - tok("MAINVERSIONLOOSE"); - src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; - tok("PRERELEASEIDENTIFIER"); - src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; - tok("PRERELEASEIDENTIFIERLOOSE"); - src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; - tok("PRERELEASE"); - src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; - tok("PRERELEASELOOSE"); - src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; - tok("BUILDIDENTIFIER"); - src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; - tok("BUILD"); - src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; - tok("FULL"); - tok("FULLPLAIN"); - src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; - src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; - tok("LOOSEPLAIN"); - src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; - tok("LOOSE"); - src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; - tok("GTLT"); - src[t.GTLT] = "((?:<|>)?=?)"; - tok("XRANGEIDENTIFIERLOOSE"); - src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; - tok("XRANGEIDENTIFIER"); - src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; - tok("XRANGEPLAIN"); - src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; - tok("XRANGEPLAINLOOSE"); - src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; - tok("XRANGE"); - src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; - tok("XRANGELOOSE"); - src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; - tok("COERCE"); - src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; - tok("COERCERTL"); - re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); - safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); - tok("LONETILDE"); - src[t.LONETILDE] = "(?:~>?)"; - tok("TILDETRIM"); - src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; - re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); - safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); - var tildeTrimReplace = "$1~"; - tok("TILDE"); - src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; - tok("TILDELOOSE"); - src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; - tok("LONECARET"); - src[t.LONECARET] = "(?:\\^)"; - tok("CARETTRIM"); - src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; - re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); - safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); - var caretTrimReplace = "$1^"; - tok("CARET"); - src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; - tok("CARETLOOSE"); - src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; - tok("COMPARATORLOOSE"); - src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; - tok("COMPARATOR"); - src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; - tok("COMPARATORTRIM"); - src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; - re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); - safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); - var comparatorTrimReplace = "$1$2$3"; - tok("HYPHENRANGE"); - src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; - tok("HYPHENRANGELOOSE"); - src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; - tok("STAR"); - src[t.STAR] = "(<|>)?=?\\s*\\*"; - for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) { - re[i] = new RegExp(src[i]); - safeRe[i] = new RegExp(makeSafeRe(src[i])); - } - } - exports.parse = parse; - function parse(version, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (version instanceof SemVer) return version; - if (typeof version !== "string") return null; - if (version.length > MAX_LENGTH) return null; - var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; - if (!r.test(version)) return null; - try { - return new SemVer(version, options); - } catch (er) { - return null; - } - } - exports.valid = valid; - function valid(version, options) { - var v = parse(version, options); - return v ? v.version : null; - } - exports.clean = clean; - function clean(version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ""), options); - return s ? s.version : null; - } - exports.SemVer = SemVer; - function SemVer(version, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (version instanceof SemVer) if (version.loose === options.loose) return version; - else version = version.version; - else if (typeof version !== "string") throw new TypeError("Invalid Version: " + version); - if (version.length > MAX_LENGTH) throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); - if (!(this instanceof SemVer)) return new SemVer(version, options); - debug("SemVer", version, options); - this.options = options; - this.loose = !!options.loose; - var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); - if (!m) throw new TypeError("Invalid Version: " + version); - this.raw = version; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version"); - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version"); - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version"); - if (!m[4]) this.prerelease = []; - else this.prerelease = m[4].split(".").map(function(id) { - if (/^[0-9]+$/.test(id)) { - var num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) return num; - } - return id; - }); - this.build = m[5] ? m[5].split(".") : []; - this.format(); - } - SemVer.prototype.format = function() { - this.version = this.major + "." + this.minor + "." + this.patch; - if (this.prerelease.length) this.version += "-" + this.prerelease.join("."); - return this.version; - }; - SemVer.prototype.toString = function() { - return this.version; - }; - SemVer.prototype.compare = function(other) { - debug("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - return this.compareMain(other) || this.comparePre(other); - }; - SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); - }; - SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - if (this.prerelease.length && !other.prerelease.length) return -1; - else if (!this.prerelease.length && other.prerelease.length) return 1; - else if (!this.prerelease.length && !other.prerelease.length) return 0; - var i$1 = 0; - do { - var a = this.prerelease[i$1]; - var b = other.prerelease[i$1]; - debug("prerelease compare", i$1, a, b); - if (a === void 0 && b === void 0) return 0; - else if (b === void 0) return 1; - else if (a === void 0) return -1; - else if (a === b) continue; - else return compareIdentifiers(a, b); - } while (++i$1); - }; - SemVer.prototype.compareBuild = function(other) { - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - var i$1 = 0; - do { - var a = this.build[i$1]; - var b = other.build[i$1]; - debug("prerelease compare", i$1, a, b); - if (a === void 0 && b === void 0) return 0; - else if (b === void 0) return 1; - else if (a === void 0) return -1; - else if (a === b) continue; - else return compareIdentifiers(a, b); - } while (++i$1); - }; - SemVer.prototype.inc = function(release, identifier) { - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier); - this.inc("pre", identifier); - break; - case "prerelease": - if (this.prerelease.length === 0) this.inc("patch", identifier); - this.inc("pre", identifier); - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) this.patch++; - this.prerelease = []; - break; - case "pre": - if (this.prerelease.length === 0) this.prerelease = [0]; - else { - var i$1 = this.prerelease.length; - while (--i$1 >= 0) if (typeof this.prerelease[i$1] === "number") { - this.prerelease[i$1]++; - i$1 = -2; - } - if (i$1 === -1) this.prerelease.push(0); - } - if (identifier) if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; - } else this.prerelease = [identifier, 0]; - break; - default: throw new Error("invalid increment argument: " + release); - } - this.format(); - this.raw = this.version; - return this; - }; - exports.inc = inc; - function inc(version, release, loose, identifier) { - if (typeof loose === "string") { - identifier = loose; - loose = void 0; - } - try { - return new SemVer(version, loose).inc(release, identifier).version; - } catch (er) { - return null; - } - } - exports.diff = diff; - function diff(version1, version2) { - if (eq(version1, version2)) return null; - else { - var v1 = parse(version1); - var v2 = parse(version2); - var prefix = ""; - if (v1.prerelease.length || v2.prerelease.length) { - prefix = "pre"; - var defaultResult = "prerelease"; - } - for (var key in v1) if (key === "major" || key === "minor" || key === "patch") { - if (v1[key] !== v2[key]) return prefix + key; - } - return defaultResult; - } - } - exports.compareIdentifiers = compareIdentifiers; - var numeric = /^[0-9]+$/; - function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; - } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - } - exports.rcompareIdentifiers = rcompareIdentifiers; - function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); - } - exports.major = major; - function major(a, loose) { - return new SemVer(a, loose).major; - } - exports.minor = minor; - function minor(a, loose) { - return new SemVer(a, loose).minor; - } - exports.patch = patch; - function patch(a, loose) { - return new SemVer(a, loose).patch; - } - exports.compare = compare; - function compare(a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)); - } - exports.compareLoose = compareLoose; - function compareLoose(a, b) { - return compare(a, b, true); - } - exports.compareBuild = compareBuild; - function compareBuild(a, b, loose) { - var versionA = new SemVer(a, loose); - var versionB = new SemVer(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); - } - exports.rcompare = rcompare; - function rcompare(a, b, loose) { - return compare(b, a, loose); - } - exports.sort = sort; - function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compareBuild(a, b, loose); - }); - } - exports.rsort = rsort; - function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.compareBuild(b, a, loose); - }); - } - exports.gt = gt; - function gt(a, b, loose) { - return compare(a, b, loose) > 0; - } - exports.lt = lt; - function lt(a, b, loose) { - return compare(a, b, loose) < 0; - } - exports.eq = eq; - function eq(a, b, loose) { - return compare(a, b, loose) === 0; - } - exports.neq = neq; - function neq(a, b, loose) { - return compare(a, b, loose) !== 0; - } - exports.gte = gte; - function gte(a, b, loose) { - return compare(a, b, loose) >= 0; - } - exports.lte = lte; - function lte(a, b, loose) { - return compare(a, b, loose) <= 0; - } - exports.cmp = cmp; - function cmp(a, op, b, loose) { - switch (op) { - case "===": - if (typeof a === "object") a = a.version; - if (typeof b === "object") b = b.version; - return a === b; - case "!==": - if (typeof a === "object") a = a.version; - if (typeof b === "object") b = b.version; - return a !== b; - case "": - case "=": - case "==": return eq(a, b, loose); - case "!=": return neq(a, b, loose); - case ">": return gt(a, b, loose); - case ">=": return gte(a, b, loose); - case "<": return lt(a, b, loose); - case "<=": return lte(a, b, loose); - default: throw new TypeError("Invalid operator: " + op); - } - } - exports.Comparator = Comparator; - function Comparator(comp, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp; - else comp = comp.value; - if (!(this instanceof Comparator)) return new Comparator(comp, options); - comp = comp.trim().split(/\s+/).join(" "); - debug("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) this.value = ""; - else this.value = this.operator + this.semver.version; - debug("comp", this); - } - var ANY = {}; - Comparator.prototype.parse = function(comp) { - var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var m = comp.match(r); - if (!m) throw new TypeError("Invalid comparator: " + comp); - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") this.operator = ""; - if (!m[2]) this.semver = ANY; - else this.semver = new SemVer(m[2], this.options.loose); - }; - Comparator.prototype.toString = function() { - return this.value; - }; - Comparator.prototype.test = function(version) { - debug("Comparator.test", version, this.options.loose); - if (this.semver === ANY || version === ANY) return true; - if (typeof version === "string") try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - return cmp(version, this.operator, this.semver, this.options); - }; - Comparator.prototype.intersects = function(comp, options) { - if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required"); - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - var rangeTmp; - if (this.operator === "") { - if (this.value === "") return true; - rangeTmp = new Range(comp.value, options); - return satisfies(this.value, rangeTmp, options); - } else if (comp.operator === "") { - if (comp.value === "") return true; - rangeTmp = new Range(this.value, options); - return satisfies(comp.semver, rangeTmp, options); - } - var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); - var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); - var sameSemVer = this.semver.version === comp.semver.version; - var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); - var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); - var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); - return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; - }; - exports.Range = Range; - function Range(range, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; - else return new Range(range.raw, options); - if (range instanceof Comparator) return new Range(range.value, options); - if (!(this instanceof Range)) return new Range(range, options); - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().split(/\s+/).join(" "); - this.set = this.raw.split("||").map(function(range$1) { - return this.parseRange(range$1.trim()); - }, this).filter(function(c) { - return c.length; - }); - if (!this.set.length) throw new TypeError("Invalid SemVer Range: " + this.raw); - this.format(); - } - Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(" ").trim(); - }).join("||").trim(); - return this.range; - }; - Range.prototype.toString = function() { - return this.range; - }; - Range.prototype.parseRange = function(range) { - var loose = this.options.loose; - var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug("hyphen replace", range); - range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); - debug("comparator trim", range, safeRe[t.COMPARATORTRIM]); - range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); - range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); - range = range.split(/\s+/).join(" "); - var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var set = range.split(" ").map(function(comp) { - return parseComparator(comp, this.options); - }, this).join(" ").split(/\s+/); - if (this.options.loose) set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - set = set.map(function(comp) { - return new Comparator(comp, this.options); - }, this); - return set; - }; - Range.prototype.intersects = function(range, options) { - if (!(range instanceof Range)) throw new TypeError("a Range is required"); - return this.set.some(function(thisComparators) { - return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { - return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { - return rangeComparators.every(function(rangeComparator) { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); - }; - function isSatisfiable(comparators, options) { - var result = true; - var remainingComparators = comparators.slice(); - var testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every(function(otherComparator) { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); - } - return result; - } - exports.toComparators = toComparators; - function toComparators(range, options) { - return new Range(range, options).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(" ").trim().split(" "); - }); - } - function parseComparator(comp, options) { - debug("comp", comp, options); - comp = replaceCarets(comp, options); - debug("caret", comp); - comp = replaceTildes(comp, options); - debug("tildes", comp); - comp = replaceXRanges(comp, options); - debug("xrange", comp); - comp = replaceStars(comp, options); - debug("stars", comp); - return comp; - } - function isX(id) { - return !id || id.toLowerCase() === "x" || id === "*"; - } - function replaceTildes(comp, options) { - return comp.trim().split(/\s+/).map(function(comp$1) { - return replaceTilde(comp$1, options); - }).join(" "); - } - function replaceTilde(comp, options) { - var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug("tilde", comp, _, M, m, p, pr); - var ret; - if (isX(M)) ret = ""; - else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; - else if (isX(p)) ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; - else if (pr) { - debug("replaceTilde pr", pr); - ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; - } else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; - debug("tilde return", ret); - return ret; - }); - } - function replaceCarets(comp, options) { - return comp.trim().split(/\s+/).map(function(comp$1) { - return replaceCaret(comp$1, options); - }).join(" "); - } - function replaceCaret(comp, options) { - debug("caret", comp, options); - var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug("caret", comp, _, M, m, p, pr); - var ret; - if (isX(M)) ret = ""; - else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; - else if (isX(p)) if (M === "0") ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; - else ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; - else if (pr) { - debug("replaceCaret pr", pr); - if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); - else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; - else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; - } else { - debug("no pr"); - if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); - else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; - else ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; - } - debug("caret return", ret); - return ret; - }); - } - function replaceXRanges(comp, options) { - debug("replaceXRanges", comp, options); - return comp.split(/\s+/).map(function(comp$1) { - return replaceXRange(comp$1, options); - }).join(" "); - } - function replaceXRange(comp, options) { - comp = comp.trim(); - var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug("xRange", comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - if (gtlt === "=" && anyX) gtlt = ""; - pr = options.includePrerelease ? "-0" : ""; - if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0"; - else ret = "*"; - else if (gtlt && anyX) { - if (xm) m = 0; - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) M = +M + 1; - else m = +m + 1; - } - ret = gtlt + M + "." + m + "." + p + pr; - } else if (xm) ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; - else if (xp) ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; - debug("xRange return", ret); - return ret; - }); - } - function replaceStars(comp, options) { - debug("replaceStars", comp, options); - return comp.trim().replace(safeRe[t.STAR], ""); - } - function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { - if (isX(fM)) from = ""; - else if (isX(fm)) from = ">=" + fM + ".0.0"; - else if (isX(fp)) from = ">=" + fM + "." + fm + ".0"; - else from = ">=" + from; - if (isX(tM)) to = ""; - else if (isX(tm)) to = "<" + (+tM + 1) + ".0.0"; - else if (isX(tp)) to = "<" + tM + "." + (+tm + 1) + ".0"; - else if (tpr) to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; - else to = "<=" + to; - return (from + " " + to).trim(); - } - Range.prototype.test = function(version) { - if (!version) return false; - if (typeof version === "string") try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - for (var i$1 = 0; i$1 < this.set.length; i$1++) if (testSet(this.set[i$1], version, this.options)) return true; - return false; - }; - function testSet(set, version, options) { - for (var i$1 = 0; i$1 < set.length; i$1++) if (!set[i$1].test(version)) return false; - if (version.prerelease.length && !options.includePrerelease) { - for (i$1 = 0; i$1 < set.length; i$1++) { - debug(set[i$1].semver); - if (set[i$1].semver === ANY) continue; - if (set[i$1].semver.prerelease.length > 0) { - var allowed = set[i$1].semver; - if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; - } - } - return false; - } - return true; - } - exports.satisfies = satisfies; - function satisfies(version, range, options) { - try { - range = new Range(range, options); - } catch (er) { - return false; - } - return range.test(version); - } - exports.maxSatisfying = maxSatisfying; - function maxSatisfying(versions, range, options) { - var max = null; - var maxSV = null; - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach(function(v) { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer(max, options); - } - } - }); - return max; - } - exports.minSatisfying = minSatisfying; - function minSatisfying(versions, range, options) { - var min = null; - var minSV = null; - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach(function(v) { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer(min, options); - } - } - }); - return min; - } - exports.minVersion = minVersion; - function minVersion(range, loose) { - range = new Range(range, loose); - var minver = new SemVer("0.0.0"); - if (range.test(minver)) return minver; - minver = new SemVer("0.0.0-0"); - if (range.test(minver)) return minver; - minver = null; - for (var i$1 = 0; i$1 < range.set.length; ++i$1) { - var comparators = range.set[i$1]; - comparators.forEach(function(comparator) { - var compver = new SemVer(comparator.semver.version); - switch (comparator.operator) { - case ">": - if (compver.prerelease.length === 0) compver.patch++; - else compver.prerelease.push(0); - compver.raw = compver.format(); - case "": - case ">=": - if (!minver || gt(minver, compver)) minver = compver; - break; - case "<": - case "<=": break; - default: throw new Error("Unexpected operation: " + comparator.operator); - } - }); - } - if (minver && range.test(minver)) return minver; - return null; - } - exports.validRange = validRange; - function validRange(range, options) { - try { - return new Range(range, options).range || "*"; - } catch (er) { - return null; - } - } - exports.ltr = ltr; - function ltr(version, range, options) { - return outside(version, range, "<", options); - } - exports.gtr = gtr; - function gtr(version, range, options) { - return outside(version, range, ">", options); - } - exports.outside = outside; - function outside(version, range, hilo, options) { - version = new SemVer(version, options); - range = new Range(range, options); - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case ">": - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = ">"; - ecomp = ">="; - break; - case "<": - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = "<"; - ecomp = "<="; - break; - default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); - } - if (satisfies(version, range, options)) return false; - for (var i$1 = 0; i$1 < range.set.length; ++i$1) { - var comparators = range.set[i$1]; - var high = null; - var low = null; - comparators.forEach(function(comparator) { - if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0"); - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, options)) high = comparator; - else if (ltfn(comparator.semver, low.semver, options)) low = comparator; - }); - if (high.operator === comp || high.operator === ecomp) return false; - if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false; - else if (low.operator === ecomp && ltfn(version, low.semver)) return false; - } - return true; - } - exports.prerelease = prerelease; - function prerelease(version, options) { - var parsed = parse(version, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; - } - exports.intersects = intersects; - function intersects(r1, r2, options) { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2); - } - exports.coerce = coerce; - function coerce(version, options) { - if (version instanceof SemVer) return version; - if (typeof version === "number") version = String(version); - if (typeof version !== "string") return null; - options = options || {}; - var match = null; - if (!options.rtl) match = version.match(safeRe[t.COERCE]); - else { - var next; - while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; - safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; - } - safeRe[t.COERCERTL].lastIndex = -1; - } - if (match === null) return null; - return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); - } -} }); - -//#endregion -export { __commonJS, __require, __toESM, import_core, require_auth, require_core, require_exec, require_io, require_lib, require_semver }; \ No newline at end of file diff --git a/dist/semver-O4tt7wRT.mjs b/dist/semver-O4tt7wRT.mjs new file mode 100644 index 0000000..9402839 --- /dev/null +++ b/dist/semver-O4tt7wRT.mjs @@ -0,0 +1,19403 @@ +import { createRequire } from "node:module"; + +//#region \0rolldown/runtime.js +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res); +var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); +var __exportAll = (all, no_symbols) => { + let target = {}; + for (var name in all) { + __defProp(target, name, { + get: all[name], + enumerable: true + }); + } + if (!no_symbols) { + __defProp(target, Symbol.toStringTag, { value: "Module" }); + } + return target; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp.call(to, key) && key !== except) { + __defProp(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + } + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true +}) : target, mod)); +var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __require = /* @__PURE__ */ createRequire(import.meta.url); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/utils.js +var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toCommandValue = toCommandValue; + exports.toCommandProperties = toCommandProperties; + /** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ + function toCommandValue(input) { + if (input === null || input === void 0) return ""; + else if (typeof input === "string" || input instanceof String) return input; + return JSON.stringify(input); + } + /** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) return {}; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } +})); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/command.js +var require_command = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.issueCommand = issueCommand; + exports.issue = issue; + const os$3 = __importStar(__require("os")); + const utils_1 = require_utils$1(); + /** + * Issues a command to the GitHub Actions runner + * + * @param command - The command name to issue + * @param properties - Additional properties for the command (key-value pairs) + * @param message - The message to include with the command + * @remarks + * This function outputs a specially formatted string to stdout that the Actions + * runner interprets as a command. These commands can control workflow behavior, + * set outputs, create annotations, mask values, and more. + * + * Command Format: + * ::name key=value,key=value::message + * + * @example + * ```typescript + * // Issue a warning annotation + * issueCommand('warning', {}, 'This is a warning message'); + * // Output: ::warning::This is a warning message + * + * // Set an environment variable + * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); + * // Output: ::set-env name=MY_VAR::some value + * + * // Add a secret mask + * issueCommand('add-mask', {}, 'secretValue123'); + * // Output: ::add-mask::secretValue123 + * ``` + * + * @internal + * This is an internal utility function that powers the public API functions + * such as setSecret, warning, error, and exportVariable. + */ + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os$3.EOL); + } + function issue(name, message = "") { + issueCommand(name, {}, message); + } + const CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) command = "missing.command"; + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ","; + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } +})); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/file-command.js +var require_file_command = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.issueFileCommand = issueFileCommand; + exports.prepareKeyValueMessage = prepareKeyValueMessage; + const crypto = __importStar(__require("crypto")); + const fs$1 = __importStar(__require("fs")); + const os$2 = __importStar(__require("os")); + const utils_1 = require_utils$1(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); + if (!fs$1.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); + fs$1.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os$2.EOL}`, { encoding: "utf8" }); + } + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + return `${key}<<${delimiter}${os$2.EOL}${convertedValue}${os$2.EOL}${delimiter}`; + } +})); + +//#endregion +//#region node_modules/.deno/@actions+http-client@3.0.2/node_modules/@actions/http-client/lib/proxy.js +var require_proxy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getProxyUrl = getProxyUrl; + exports.checkBypass = checkBypass; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) return; + const proxyVar = (() => { + if (usingSsl) return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + else return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + })(); + if (proxyVar) try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); + } + else return; + } + function checkBypass(reqUrl) { + if (!reqUrl.hostname) return false; + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) return true; + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) return false; + let reqPort; + if (reqUrl.port) reqPort = Number(reqUrl.port); + else if (reqUrl.protocol === "http:") reqPort = 80; + else if (reqUrl.protocol === "https:") reqPort = 443; + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) return true; + return false; + } + function isLoopbackAddress(host) { + 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; + } + }; +})); + +//#endregion +//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + __require("net"); + var tls = __require("tls"); + var http$2 = __require("http"); + var https$1 = __require("https"); + var events$1 = __require("events"); + __require("assert"); + var util$2 = __require("util"); + exports.httpOverHttp = httpOverHttp; + exports.httpsOverHttp = httpsOverHttp; + exports.httpOverHttps = httpOverHttps; + exports.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http$2.request; + return agent; + } + function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http$2.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https$1.request; + return agent; + } + function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https$1.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http$2.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util$2.inherits(TunnelingAgent, events$1.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); + return; + } + self.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); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { host: options.host + ":" + options.port } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + socket.destroy(); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = /* @__PURE__ */ new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + }; + function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self.options, { + socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host + }); + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); + } + function toOptions(host, port, localAddress) { + if (typeof host === "string") return { + host, + port, + localAddress + }; + return host; + } + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) target[k] = overrides[k]; + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug = function() {}; + exports.debug = debug; +})); + +//#endregion +//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_tunnel$1(); +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/symbols.js +var require_symbols$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/errors.js +var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kUndiciError = Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + [kUndiciError] = true; + }; + const kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; + } + [kConnectTimeoutError] = true; + }; + const kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; + } + [kHeadersTimeoutError] = true; + }; + const kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; + } + [kHeadersOverflowError] = true; + }; + const kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; + } + [kBodyTimeoutError] = true; + }; + const kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; + } + [kResponseStatusCodeError] = true; + }; + const kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; + } + [kInvalidArgumentError] = true; + }; + const kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } + [kInvalidReturnValueError] = true; + }; + const kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; + } + [kAbortError] = true; + }; + const kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; + } + [kRequestAbortedError] = true; + }; + const kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } + [kInformationalError] = true; + }; + const kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestContentLengthMismatchError] === true; + } + [kRequestContentLengthMismatchError] = true; + }; + const kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseContentLengthMismatchError] === true; + } + [kResponseContentLengthMismatchError] = true; + }; + const kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; + } + [kClientDestroyedError] = true; + }; + const kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; + } + [kClientClosedError] = true; + }; + const kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; + } + [kSocketError] = true; + }; + const kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } + [kNotSupportedError] = true; + }; + const kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBalancedPoolMissingUpstreamError] === true; + } + [kBalancedPoolMissingUpstreamError] = true; + }; + const kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + [kHTTPParserError] = true; + }; + const kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + [kResponseExceededMaxSizeError] = true; + }; + const kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + [kRequestRetryError] = true; + }; + const kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + [kResponseError] = true; + }; + const kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { + cause, + ...options ?? {} + }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + [kSecureProxyConnectionError] = true; + }; + module.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/constants.js +var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** @type {Record} */ + const headerNameLowerCasedRecord = {}; + const wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/tree.js +var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { wellknownHeaderNames, headerNameLowerCasedRecord } = require_constants$4(); + var TstNode = class TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); + if ((this.code = key.charCodeAt(index)) > 127) throw new TypeError("key must be ascii string"); + if (key.length !== ++index) this.middle = new TstNode(key, value, index); + else this.value = value; + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) throw new TypeError("Unreachable"); + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) throw new TypeError("key must be ascii string"); + if (node.code === code) if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new TstNode(key, value, index); + break; + } + else if (node.code < code) if (node.left !== null) node = node.left; + else { + node.left = new TstNode(key, value, index); + break; + } + else if (node.right !== null) node = node.right; + else { + node.right = new TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) code |= 32; + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) return node; + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) this.node = new TstNode(key, value, 0); + else this.node.add(key, value); + } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + const tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module.exports = { + TernarySearchTree, + tree + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/util.js +var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$26 = __require("node:assert"); + const { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols$4(); + const { IncomingMessage } = __require("node:http"); + const stream = __require("node:stream"); + const net$2 = __require("node:net"); + const { Blob: Blob$3 } = __require("node:buffer"); + const nodeUtil$3 = __require("node:util"); + const { stringify } = __require("node:querystring"); + const { EventEmitter: EE$2 } = __require("node:events"); + const { InvalidArgumentError } = require_errors(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const { tree } = require_tree(); + const [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$26(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) body.on("data", function() { + assert$26(false); + }); + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE$2.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable(body); + else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) return new BodyAsyncIterable(body); + else return body; + } + function nop() {} + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) return false; + else if (object instanceof Blob$3) return true; + else if (typeof object !== "object") return false; + else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); + const stringified = stringify(queryParams); + if (stringified) url += "?" + stringified; + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + if (!url || typeof url !== "object") throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== "/") path = `/${path}`; + return new URL(`${origin}${path}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError("invalid url"); + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx = host.indexOf("]"); + assert$26(idx !== -1); + return host.substring(1, idx); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) return null; + assert$26(typeof host === "string"); + const servername = getHostname(host); + if (net$2.isIP(servername)) return ""; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) return 0; + else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) return; + if (typeof stream.destroy === "function") { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) stream.socket = null; + stream.destroy(err); + } else if (err) queueMicrotask(() => { + stream.emit("error", err); + }); + if (stream.destroyed !== true) stream[kDestroyed] = true; + } + const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + /** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) hasContentLength = true; + else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = n + 1; + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError("invalid onBodySent method"); + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError("invalid onUpgrade method"); + } else { + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError("invalid onComplete method"); + } + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + function isReadable(body) { + return !!(body && stream.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + /** @type {globalThis['ReadableStream']} */ + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + const hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + const hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + /** + * @param {string} val + */ + function toUSVString(val) { + return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil$3.toUSVString(val); + } + /** + * @param {string} val + */ + function isUSVString(val) { + return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; + } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: return false; + default: return c >= 33 && c <= 126; + } + } + /** + * @param {string} characters + */ + function isValidHTTPToken(characters) { + if (characters.length === 0) return false; + for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; + return true; + } + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + /** + * @param {string} characters + */ + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + function parseRangeHeader(range) { + if (range == null || range === "") return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + (obj[kListeners] ??= []).push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) obj.removeListener(name, listener); + obj[kListeners] = null; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert$26(request.aborted); + } catch (err) { + client.emit("error", err); + } + } + const kEnumerableProperty = Object.create(null); + kEnumerableProperty.enumerable = true; + const normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ], + wrapRequestBody + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const diagnosticsChannel = __require("node:diagnostics_channel"); + const util$1 = __require("node:util"); + const undiciDebugLog = util$1.debuglog("undici"); + const fetchDebuglog = util$1.debuglog("fetch"); + const websocketDebuglog = util$1.debuglog("websocket"); + let isClientSet = false; + const channels = { + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { request: { method, path, origin }, response: { statusCode } } = evt; + debuglog("received response to %s %s/%s - HTTP %d", method, origin, path, statusCode); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { request: { method, path, origin }, error } = evt; + debuglog("request to %s %s/%s errored - %s", method, origin, path, error.message); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { address: { address, port } } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog("closed connection to %s - %s %s", websocket.url, code, reason); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module.exports = { channels }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/request.js +var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, NotSupportedError } = require_errors(); + const assert$25 = __require("node:assert"); + const { isValidHTTPToken, isValidHeaderValue, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, buildURL, validateHandler, getServerName, normalizedMethodRecords } = require_util$7(); + const { channels } = require_diagnostics(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const invalidPathRegex = /[^\u0021-\u00ff]/; + const kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue, servername }, handler) { + if (typeof path !== "string") throw new InvalidArgumentError("path must be a string"); + else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path)) throw new InvalidArgumentError("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError("method must be a string"); + else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) throw new InvalidArgumentError("invalid request method"); + if (upgrade && typeof upgrade !== "string") throw new InvalidArgumentError("upgrade must be a string"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError("invalid expectContinue"); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) this.abort(err); + else this.error = err; + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError("headers array must be even"); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError("headers must be in key-value pair format"); + processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); + } + else if (headers != null) throw new InvalidArgumentError("headers must be an object or an array"); + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) channels.create.publish({ request: this }); + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) channels.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (this.error) abort(this.error); + else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (channels.headers.hasSubscribers) channels.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert$25(!this.aborted); + assert$25(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert$25(!this.aborted); + assert$25(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert$25(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) channels.trailers.publish({ + request: this, + trailers + }); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) channels.error.publish({ + request: this, + error + }); + if (this.aborted) return; + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError(`invalid ${key} header`); + else if (val === void 0) return; + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) throw new InvalidArgumentError("invalid header key"); + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) throw new InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError(`invalid ${key} header`); + else arr.push(`${val[i]}`); + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ""; + else val = `${val}`; + if (request.host === null && headerName === "host") { + if (typeof val !== "string") throw new InvalidArgumentError("invalid host header"); + request.host = val; + } else if (request.contentLength === null && headerName === "content-length") { + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) throw new InvalidArgumentError("invalid content-length header"); + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError("invalid connection header"); + if (value === "close") request.reset = true; + } else if (headerName === "expect") throw new NotSupportedError("expect header not supported"); + else request.headers.push(key, val); + } + module.exports = Request; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const EventEmitter = __require("node:events"); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) continue; + if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); + } + return new ComposedDispatcher(this, dispatch); + } + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module.exports = Dispatcher; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require_errors(); + const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols$4(); + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + var DispatcherBase = class extends Dispatcher { + constructor() { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) if (typeof this[kInterceptors][i] !== "function") throw new InvalidArgumentError("interceptor must be an function"); + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + if (!err) err = new ClientDestroyedError(); + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) dispatch = this[kInterceptors][i](dispatch); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + try { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError(); + if (this[kClosed]) throw new ClientClosedError(); + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + handler.onError(err); + return false; + } + } + }; + module.exports = DispatcherBase; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/util/timers.js +var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ + /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ + let fastNow = 0; + /** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ + const RESOLUTION_MS = 1e3; + /** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ + const TICK_MS = (RESOLUTION_MS >> 1) - 1; + /** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ + let fastNowTimeout; + /** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ + const kFastTimer = Symbol("kFastTimer"); + /** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ + const fastTimers = []; + /** + * These constants represent the various states of a FastTimer. + */ + /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ + const NOT_IN_LIST = -2; + /** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ + const TO_BE_CLEARED = -1; + /** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ + const PENDING = 0; + /** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ + const ACTIVE = 1; + /** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ + function onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ + fastNow += TICK_MS; + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ + let idx = 0; + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ + let len = fastTimers.length; + while (idx < len) { + /** + * @type {FastTimer} + */ + const timer = fastTimers[idx]; + if (timer._state === PENDING) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) fastTimers[idx] = fastTimers[len]; + } else ++idx; + } + fastTimers.length = len; + if (fastTimers.length !== 0) refreshTimeout(); + } + function refreshTimeout() { + if (fastNowTimeout) fastNowTimeout.refresh(); + else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + if (fastNowTimeout.unref) fastNowTimeout.unref(); + } + } + /** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); + this._state = PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + /** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ + module.exports = { + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + clearTimeout(timeout) { + if (timeout[kFastTimer]) + /** + * @type {FastTimer} + */ + timeout.clear(); + else clearTimeout(timeout); + }, + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + clearFastTimeout(timeout) { + timeout.clear(); + }, + now() { + return fastNow; + }, + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + kFastTimer + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/core/connect.js +var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const net$1 = __require("node:net"); + const assert$24 = __require("node:assert"); + const util = require_util$7(); + const { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + const timers = require_timers(); + function noop() {} + let tls; + let SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + else SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + const options = { + path: socketPath, + ...opts + }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) tls = __require("node:tls"); + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert$24(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + port, + host: hostname + }); + socket.on("session", function(session) { + sessionCache.set(sessionKey, session); + }); + } else { + assert$24(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net$1.connect({ + highWaterMark: 64 * 1024, + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { + timeout, + hostname, + port + }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + /** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ + const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + /** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ + function onConnectTimeout(socket, opts) { + if (socket == null) return; + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; + message += ` timeout: ${opts.timeout}ms)`; + util.destroy(socket, new ConnectTimeoutError(message)); + } + module.exports = buildConnector; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/llhttp/utils.js +var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") res[key] = value; + }); + return res; + } + exports.enumToMap = enumToMap; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/llhttp/constants.js +var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + const utils_1 = require_utils(); + (function(ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; + })(exports.ERROR || (exports.ERROR = {})); + (function(TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; + })(exports.TYPE || (exports.TYPE = {})); + (function(FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(exports.FLAGS || (exports.FLAGS = {})); + (function(LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + METHODS[METHODS["PRI"] = 34] = "PRI"; + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports.METHODS || (exports.METHODS = {})); + exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + METHODS.SOURCE + ]; + exports.METHODS_ICE = [METHODS.SOURCE]; + exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + METHODS.GET, + METHODS.POST + ]; + exports.METHOD_MAP = utils_1.enumToMap(METHODS); + exports.H_METHOD_MAP = {}; + Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + }); + (function(FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; + })(exports.FINISH || (exports.FINISH = {})); + exports.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports.ALPHA.push(String.fromCharCode(i)); + exports.ALPHA.push(String.fromCharCode(i + 32)); + } + exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); + exports.MARK = [ + "-", + "_", + ".", + "!", + "~", + "*", + "'", + "(", + ")" + ]; + exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ + "%", + ";", + ":", + "&", + "=", + "+", + "$", + "," + ]); + exports.STRICT_URL_CHAR = [ + "!", + "\"", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) exports.URL_CHAR.push(i); + exports.HEX = exports.NUM.concat([ + "a", + "b", + "c", + "d", + "e", + "f", + "A", + "B", + "C", + "D", + "E", + "F" + ]); + exports.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); + exports.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); + exports.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$2 } = __require("node:buffer"); + module.exports = Buffer$2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQA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YCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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QwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAw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RBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$1 } = __require("node:buffer"); + module.exports = Buffer$1.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsa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tBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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ARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASE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AAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/constants.js +var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const corsSafeListedMethods = [ + "GET", + "HEAD", + "POST" + ]; + const corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + const nullBodyStatus = [ + 101, + 204, + 205, + 304 + ]; + const redirectStatus = [ + 301, + 302, + 303, + 307, + 308 + ]; + const redirectStatusSet = new Set(redirectStatus); + /** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ + const badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ]; + const badPortsSet = new Set(badPorts); + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ + const referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + const referrerPolicySet = new Set(referrerPolicy); + const requestRedirect = [ + "follow", + "manual", + "error" + ]; + const safeMethods = [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ]; + const safeMethodsSet = new Set(safeMethods); + const requestMode = [ + "navigate", + "same-origin", + "no-cors", + "cors" + ]; + const requestCredentials = [ + "omit", + "same-origin", + "include" + ]; + const requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + /** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ + const requestBodyHeader = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + "content-length" + ]; + /** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ + const requestDuplex = ["half"]; + /** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ + const forbiddenMethods = [ + "CONNECT", + "TRACE", + "TRACK" + ]; + const forbiddenMethodsSet = new Set(forbiddenMethods); + const subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + const subresourceSet = new Set(subresource); + module.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/global.js +var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module.exports = { + getGlobalOrigin, + setGlobalOrigin + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$23 = __require("node:assert"); + const encoder = new TextEncoder(); + /** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ + const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + /** @param {URL} dataURL */ + function dataURLProcessor(dataURL) { + assert$23(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast(",", input, position); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) return "failure"; + position.position++; + let body = stringPercentDecode(input.slice(mimeTypeLength + 1)); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + body = forgivingBase64(isomorphicDecode(body)); + if (body === "failure") return "failure"; + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + return { + mimeType: mimeTypeRecord, + body + }; + } + /** + * @param {URL} url + * @param {boolean} excludeFragment + */ + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); + return serialized; + } + /** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + /** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + /** @param {string} input */ + function stringPercentDecode(input) { + return percentDecode(encoder.encode(input)); + } + /** + * @param {number} byte + */ + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + /** + * @param {number} byte + */ + function hexByteToNumber(byte) { + return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55; + } + /** @param {Uint8Array} input */ + function percentDecode(input) { + const length = input.length; + /** @type {Uint8Array} */ + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) output[j++] = byte; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; + else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + /** @param {string} input */ + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast("/", input, position); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position > input.length) return "failure"; + position.position++; + let subtype = collectASequenceOfCodePointsFast(";", input, position); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + parameters: /* @__PURE__ */ new Map(), + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints((char) => HTTP_WHITESPACE_REGEX.test(char), input, position); + let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") continue; + position.position++; + } + if (position.position > input.length) break; + let parameterValue = null; + if (input[position.position] === "\"") { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast(";", input, position); + } else { + parameterValue = collectASequenceOfCodePointsFast(";", input, position); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) continue; + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + return mimeType; + } + /** @param {string} data */ + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) --dataLength; + } + } + if (dataLength % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert$23(input[position.position] === "\""); + position.position++; + while (true) { + value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); + if (position.position >= input.length) break; + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert$23(quoteOrBackslash === "\""); + break; + } + } + if (extractValue) return value; + return input.slice(positionStart, position.position); + } + /** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ + function serializeAMimeType(mimeType) { + assert$23(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = "\"" + value; + value += "\""; + } + serialization += value; + } + return serialization; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + /** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ + function isomorphicDecode(input) { + const length = input.length; + if (65535 > length) return String.fromCharCode.apply(null, input); + let result = ""; + let i = 0; + let addition = 65535; + while (i < length) { + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + /** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": return "text/javascript"; + case "application/json": + case "text/json": return "application/json"; + case "image/svg+xml": return "image/svg+xml"; + case "text/xml": + case "application/xml": return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) return "application/json"; + if (mimeType.subtype.endsWith("+xml")) return "application/xml"; + return ""; + } + module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/webidl.js +var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { types: types$3, inspect } = __require("node:util"); + const { markAsUncloneable } = __require("node:worker_threads"); + const { toUSVString } = require_util$7(); + /** @type {import('../../../types/webidl').Webidl} */ + const webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return /* @__PURE__ */ new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": return "Undefined"; + case "boolean": return "Boolean"; + case "string": return "String"; + case "symbol": return "Symbol"; + case "number": return "Number"; + case "bigint": return "BigInt"; + case "function": + case "object": + if (V === null) return "Null"; + return "Object"; + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) x = 0; + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) return -1 * r; + return r; + }; + webidl.util.Stringify = function(V) { + switch (webidl.util.Type(V)) { + case "Symbol": return `Symbol(${V.description})`; + case "Object": return inspect(V); + case "String": return `"${V}"`; + default: return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + /** @type {Generator} */ + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + while (true) { + const { done, value } = method.next(); + if (done) break; + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + const result = {}; + if (!types$3.isProxy(O)) { + const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) if (Reflect.getOwnPropertyDescriptor(O, key)?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") return dict; + else if (type !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) value ??= defaultValue(); + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) return V; + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) return ""; + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + return Boolean(V); + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + return webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isAnyArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.resizable || V.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isTypedArray(V) || V.constructor.name !== T.name) throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isDataView(V)) throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name, opts) { + if (types$3.isAnyArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isTypedArray(V)) return webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isDataView(V)) return webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false + }); + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.ByteString); + webidl.converters["sequence>"] = webidl.sequenceConverter(webidl.converters["sequence"]); + webidl.converters["record"] = webidl.recordConverter(webidl.converters.ByteString, webidl.converters.ByteString); + module.exports = { webidl }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/util.js +var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$2 } = __require("node:stream"); + const zlib$1 = __require("node:zlib"); + const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$2(); + const { getGlobalOrigin } = require_global$1(); + const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + const { performance: performance$1 } = __require("node:perf_hooks"); + const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util$7(); + const assert$22 = __require("node:assert"); + const { isUint8Array } = __require("node:util/types"); + const { webidl } = require_webidl(); + let supportedHashes = []; + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + const possibleRelevantHashes = [ + "sha256", + "sha384", + "sha512" + ]; + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch {} + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) return null; + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) location.hash = requestFragment; + return location; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || code < 32) return false; + } + return true; + } + /** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + /** @returns {URL} */ + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) return "blocked"; + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; + } + return true; + } + /** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + const isValidHeaderName = isValidHTTPToken; + /** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + if (policy !== "") request.referrerPolicy = policy; + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) return; + if (request.responseTainting === "cors" || request.mode === "websocket") request.headersList.append("origin", serializedOrigin, true); + else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) serializedOrigin = null; + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) serializedOrigin = null; + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance$1.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { referrerPolicy: "strict-origin-when-cross-origin" }; + } + function clonePolicyContainer(policyContainer) { + return { referrerPolicy: policyContainer.referrerPolicy }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert$22(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) referrerSource = request.referrer; + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); + switch (policy) { + case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": return referrerURL; + case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; + return referrerOrigin; + } + default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ + function stripURLForReferrer(url, originOnly) { + assert$22(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; + return false; + } + } + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ + function bytesMatch(bytes, metadataList) { + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === void 0) return true; + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") return true; + if (parsedMetadata.length === 0) return true; + const metadata = filterMetadataListByAlgorithm(parsedMetadata, getStrongestMetadata(parsedMetadata)); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + if (compareBase64Mixed(actualValue, expectedValue)) return true; + } + return false; + } + const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ + function parseMetadata(metadata) { + /** @type {{ algo: string, hash: string }[]} */ + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); + } + if (empty === true) return "no metadata"; + return result; + } + /** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") return algorithm; + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") continue; + else if (metadata.algo[3] === "3") algorithm = "sha384"; + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; + metadataList.length = pos; + return metadataList; + } + /** + * Compares two base64 strings, allowing for base64url + * in the second string. + * + * @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; + return false; + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {} + /** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + return false; + } + function createDeferredPromise() { + let res; + let rej; + return { + promise: new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }), + resolve: res, + reject: rej + }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) throw new TypeError("Value is not JSON serializable"); + assert$22(typeof result === "string"); + return result; + } + const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + const index = this.#index; + const values = this.#target[kInternalIterator]; + if (index >= values.length) return { + value: void 0, + done: true + }; + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { + writable: true, + enumerable: true, + configurable: true + } + }); + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; + } + } + const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + /** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ + function isomorphicEncode(input) { + assert$22(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) return Buffer.concat(bytes, byteLength); + if (!isUint8Array(chunk)) throw new TypeError("Received non-Uint8Array chunk"); + bytes.push(chunk); + byteLength += chunk.length; + } + } + /** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ + function urlIsLocal(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + /** + * @param {string|URL} url + * @returns {boolean} + */ + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ + function urlIsHttpHttpsScheme(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) return "failure"; + const position = { position: 5 }; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 61) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeStart = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 45) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeEnd = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) return "failure"; + if (rangeEndValue === null && rangeStartValue === null) return "failure"; + if (rangeStartValue > rangeEndValue) return "failure"; + return { + rangeStartValue, + rangeEndValue + }; + } + /** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform$2 { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(this.#zlibOptions) : zlib$1.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + /** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) return "failure"; + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); + } + if (mimeType == null) return "failure"; + return mimeType; + } + /** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); + if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString(input, position); + if (position.position < input.length) continue; + } else { + assert$22(input.charCodeAt(position.position) === 44); + position.position++; + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) return null; + return gettingDecodingSplitting(value); + } + const textDecoder = new TextDecoder(); + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + return textDecoder.decode(buffer); + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + const environmentSettingsObject = new EnvironmentSettingsObject(); + module.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/symbols.js +var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/file.js +var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Blob: Blob$2, File } = __require("node:buffer"); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + var FileLike = class FileLike { + constructor(blobLike, fileName, options = {}) { + this[kState] = { + blobLike, + name: fileName, + type: options.type, + lastModified: options.lastModified ?? Date.now() + }; + } + stream(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob$2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module.exports = { + FileLike, + isFileLike + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isBlobLike, iteratorMixin } = require_util$6(); + const { kState } = require_symbols$3(); + const { kEnumerableProperty } = require_util$7(); + const { FileLike, isFileLike } = require_file(); + const { webidl } = require_webidl(); + const { File: NativeFile } = __require("node:buffer"); + const nodeUtil$2 = __require("node:util"); + /** @type {globalThis['File']} */ + const File = globalThis.File ?? NativeFile; + var FormData = class FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) return null; + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx !== -1) this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ]; + else this[kState].push(entry); + } + [nodeUtil$2.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [a[b.name], b.value]; + else a[b.name] = b.value; + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil$2.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + /** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ + function makeEntry(name, value, filename) { + if (typeof value === "string") {} else { + if (!isFileLike(value)) value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + if (filename !== void 0) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { + name, + value + }; + } + module.exports = { + FormData, + makeEntry + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isUSVString, bufferToLowerCasedHeaderName } = require_util$7(); + const { utf8DecodeBytes } = require_util$6(); + const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + const { isFileLike } = require_file(); + const { makeEntry } = require_formdata(); + const assert$21 = __require("node:assert"); + const { File: NodeFile } = __require("node:buffer"); + const File = globalThis.File ?? NodeFile; + const formDataNameBuffer = Buffer.from("form-data; name=\""); + const filenameBuffer = Buffer.from("; filename"); + const dd = Buffer.from("--"); + const ddcrlf = Buffer.from("--\r\n"); + /** + * @param {string} chars + */ + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) return false; + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) return false; + } + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ + function multipartFormDataParser(input, mimeType) { + assert$21(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) return "failure"; + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) position.position += 2; + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) trailing -= 2; + if (trailing !== input.length) input = input.subarray(0, trailing); + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else return "failure"; + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) return entryList; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") return "failure"; + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) return "failure"; + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) contentType = ""; + value = new File([body], filename, { type: contentType }); + } else value = utf8DecodeBytes(Buffer.from(body)); + assert$21(isUSVString(name)); + assert$21(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) return "failure"; + return { + name, + filename, + contentType, + encoding + }; + } + let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) return "failure"; + if (input[position.position] !== 58) return "failure"; + position.position++; + collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) return "failure"; + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (name === null) return "failure"; + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) return "failure"; + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) return "failure"; + } + break; + case "content-type": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataName(input, position) { + assert$21(input[position.position - 1] === 34); + /** @type {string | Buffer} */ + let name = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); + if (input[position.position] !== 34) return null; + else position.position++; + name = new TextDecoder().decode(name).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); + return name; + } + /** + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) ++start; + return input.subarray(position.position, position.position = start); + } + /** + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; + if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + /** + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer[position.position + i]) return false; + return true; + } + module.exports = { + multipartFormDataParser, + validateBoundary + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/body.js +var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require_util$6(); + const { FormData } = require_formdata(); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + const { Blob: Blob$1 } = __require("node:buffer"); + const assert$20 = __require("node:assert"); + const { isErrored, isDisturbed } = __require("node:stream"); + const { isArrayBuffer } = __require("node:util/types"); + const { serializeAMimeType } = require_data_url(); + const { multipartFormDataParser } = require_formdata_parser(); + let random; + try { + const crypto = __require("node:crypto"); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + const textEncoder = new TextEncoder(); + function noop() {} + const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + let streamRegistry; + if (hasFinalizationRegistry) streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) stream.cancel("Response object has been garbage collected").catch(noop); + }); + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) stream = object; + else if (isBlobLike(object)) stream = object.stream(); + else stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) controller.enqueue(buffer); + queueMicrotask(() => readableStreamClose(controller)); + }, + start() {}, + type: "bytes" + }); + assert$20(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => str.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]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) if (typeof value === "string") { + const chunk = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + const chunk = textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + source = object; + action = async function* () { + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) throw new TypeError("keepalive"); + if (util.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) length = Buffer.byteLength(source); + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) controller.enqueue(buffer); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + return [{ + stream, + source, + length + }, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + // istanbul ignore next + assert$20(!util.isDisturbed(object), "The body has already been consumed."); + // istanbul ignore next + assert$20(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(instance, body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) throw new DOMException("The operation was aborted.", "AbortError"); + } + function bodyMixinMethods(instance) { + return { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType(mimeType); + return new Blob$1([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") throw new TypeError("Failed to parse body as FormData."); + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value] of entries) fd.append(name, value); + return fd; + } + } + throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object)) throw new TypeError("Body is unusable: Body has already been read"); + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object[kState].body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + /** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} requestOrResponse + */ + function bodyMimeType(requestOrResponse) { + /** @type {import('./headers').HeadersList} */ + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") return null; + return mimeType; + } + module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$19 = __require("node:assert"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const timers = require_timers(); + const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require_errors(); + const { kUrl, kReset, kClient, kParser, kBlocking, kRunning, kPending, kSize, kWriting, kQueue, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kMaxRequests, kCounter, kMaxResponseSize, kOnError, kResume, kHTTPContext } = require_symbols$4(); + const constants = require_constants$3(); + const EMPTY_BUF = Buffer.alloc(0); + const FastBuffer = Buffer[Symbol.species]; + const addListener = util.addListener; + const removeAllListeners = util.removeAllListeners; + let extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm()); + } catch (e) { + /* istanbul ignore next */ + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); + } + return await WebAssembly.instantiate(mod, { env: { + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0; + }, + wasm_on_status: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert$19(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageComplete() || 0; + } + } }); + } + let llhttpInstance = null; + let llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + let currentParser = null; + let currentBufferRef = null; + let currentBufferSize = 0; + let currentBufferPtr = null; + const USE_NATIVE_TIMER = 0; + const USE_FAST_TIMER = 1; + const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER; + const TIMEOUT_BODY = 4 | USE_FAST_TIMER; + const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; + var Parser = class { + constructor(client, socket, { exports: exports$1 }) { + assert$19(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports$1; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + this.timeoutValue = delay; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) return; + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } + } + execute(data) { + assert$19(this.ptr != null); + assert$19(currentParser == null); + assert$19(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) llhttp.free(currentBufferPtr); + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); + else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + if (!request) return -1; + request.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") this.keepAlive += buf.toString(); + else if (headerName === "connection") this.connection += buf.toString(); + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) util.destroy(this.socket, new HeadersOverflowError()); + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert$19(upgrade); + assert$19(client[kSocket] === socket); + assert$19(!socket.destroyed); + assert$19(!this.paused); + assert$19((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(request.upgrade || request.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ + if (!request) return -1; + assert$19(!this.upgrade); + assert$19(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert$19(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request.method === "CONNECT") { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert$19((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) return -1; + if (request.method === "HEAD") return 1; + if (statusCode < 200) return 1; + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + assert$19(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) return constants.ERROR.PAUSED; + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return; + assert$19(statusCode >= 100); + assert$19((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert$19(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) setImmediate(() => client[kResume]()); + else client[kResume](); + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert$19(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) util.destroy(socket, new BodyTimeoutError()); + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert$19(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + assert$19(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) parser.readMore(); + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert$19(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$19(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) return true; + if (request) { + if (client[kRunning] > 0 && !request.idempotent) return true; + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) return true; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) extractBody = require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) headers.push("content-type", contentType); + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) headers.push("content-type", body.type); + if (body && typeof body.read === "function") body.read(0); + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) return; + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; + let header = `${method} ${path} HTTP/1.1\r\n`; + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if (channels.sendHeaders.hasSubscribers) channels.sendHeaders.publish({ + request, + headers: header, + socket + }); + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isStream(body)) writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isIterable(body)) writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else assert$19(false); + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + const onData = function(chunk) { + if (finished) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) return; + if (body.resume) body.resume(); + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) return; + finished = true; + assert$19(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util.destroy(body, err); + else util.destroy(body); + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) body.resume(); + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) setImmediate(() => onFinished(body.errored)); + else if (body.endEmitted ?? body.readableEnded) setImmediate(() => onFinished(null)); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$19(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + else if (util.isBuffer(body)) { + assert$19(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$19(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + if (!writer.write(chunk)) await waitForDrain(); + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert$19(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module.exports = connectH1; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$18 = __require("node:assert"); + const { pipeline: pipeline$2 } = __require("node:stream"); + const util = require_util$7(); + const { RequestContentLengthMismatchError, RequestAbortedError, SocketError, InformationalError } = require_errors(); + const { kUrl, kReset, kClient, kRunning, kPending, kQueue, kPendingIdx, kRunningIdx, kError, kSocket, kStrictContentLength, kOnError, kMaxConcurrentStreams, kHTTP2Session, kResume, kSize, kHTTPContext } = require_symbols$4(); + const kOpenStreams = Symbol("open streams"); + let extractBody; + let h2ExperimentalWarned = false; + /** @type {import('http2')} */ + let http2; + try { + http2 = __require("node:http2"); + } catch { + http2 = { constants: {} }; + } + const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kHTTP2Session] = null; + if (client.destroyed) { + assert$18(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) this[kHTTP2Session].destroy(err); + client[kPendingIdx] = client[kRunningIdx]; + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + function onHttp2SessionError(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + /** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ + function onHTTP2GoAway(code) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const session = client[kHTTP2Session]; + const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, /* @__PURE__ */ new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `,${val[i]}`; + else headers[key] = val[i]; + else headers[key] = val; + } + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) return; + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) util.destroy(stream, err); + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { + endStream: false, + signal + }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) contentLength = request.contentLength; + if (contentLength === 0 || !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert$18(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) stream.pause(); + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) stream.pause(); + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) request.onComplete([]); + if (session[kOpenStreams] === 0) session.unref(); + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body || contentLength === 0) writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isStream(body)) writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); + else if (util.isIterable(body)) writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else assert$18(false); + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert$18(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) socket[kReset] = true; + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline$2(body, h2stream, (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } + }); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$18(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) await waitForDrain(); + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module.exports = connectH2; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { kBodyUsed } = require_symbols$4(); + const assert$17 = __require("node:assert"); + const { InvalidArgumentError } = require_errors(); + const EE$1 = __require("node:events"); + const redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 + ]; + const kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$17(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$17(false); + }); + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE$1.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) this.request.abort(/* @__PURE__ */ new Error("max redirects")); + this.redirectionLimitReached = true; + this.abort(/* @__PURE__ */ new Error("max redirects")); + return; + } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) {} else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for (let i = 0; i < headers.length; i += 2) if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") return headers[i + 1]; + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return util.headerNameToString(header) === "host"; + if (removeContent && util.headerNameToString(header).startsWith("content-")) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else assert$17(headers == null, "headers must be an object or an array"); + return ret; + } + module.exports = RedirectHandler; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + }; + return dispatch(opts, redirectHandler); + }; + }; + } + module.exports = createRedirectInterceptor; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/client.js +var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$16 = __require("node:assert"); + const net = __require("node:net"); + const http$1 = __require("node:http"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const Request = require_request$1(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, InformationalError, ClientDestroyedError } = require_errors(); + const buildConnector = require_connect(); + const { kUrl, kServerName, kClient, kBusy, kConnect, kResuming, kRunning, kPending, kSize, kQueue, kConnected, kConnecting, kNeedDrain, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume } = require_symbols$4(); + const connectH1 = require_client_h1(); + const connectH2 = require_client_h2(); + let deprecatedInterceptorWarned = false; + const kClosedResolve = Symbol("kClosedResolve"); + const noop = () => {}; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + /** + * @type {import('../../types/client.js').default} + */ + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2 } = {}) { + super(); + if (keepAlive !== void 0) throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError("invalid maxHeaderSize"); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" }); + } + } else this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http$1.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r\n`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean(this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const request = new Request(opts.origin || this[kUrl].origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else this[kResume](true); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) this[kNeedDrain] = 2; + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) this[kClosedResolve] = resolve; + else resolve(null); + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else queueMicrotask(callback); + this[kResume](); + }); + } + }; + const createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert$16(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert$16(client[kSize] === 0); + } + } + /** + * @param {Client} client + * @returns + */ + async function connect(client) { + assert$16(!client[kConnecting]); + assert$16(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert$16(idx !== -1); + const ip = hostname.substring(1, idx); + assert$16(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) reject(err); + else resolve(socket); + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + assert$16(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert$16(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else onError(client, err); + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) return; + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert$16(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) client[kHTTPContext].resume(); + if (client[kBusy]) client[kNeedDrain] = 2; + else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else emitDrain(client); + continue; + } + if (client[kPending] === 0) return; + if (client[kRunning] >= (getPipelining(client) || 1)) return; + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) return; + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) return; + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) return; + if (client[kHTTPContext].busy(request)) return; + if (!request.aborted && client[kHTTPContext].write(request)) client[kPendingIdx]++; + else client[kQueue].splice(client[kPendingIdx], 1); + } + } + module.exports = Client; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kSize = 2048; + const kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; + return next; + } + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols$4(); + const kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module.exports = PoolStats; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const FixedQueue = require_fixed_queue(); + const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols$4(); + const PoolStats = require_pool_stats(); + const kClients = Symbol("clients"); + const kNeedDrain = Symbol("needDrain"); + const kQueue = Symbol("queue"); + const kClosedResolve = Symbol("closed resolve"); + const kOnDrain = Symbol("onDrain"); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kGetDispatcher = Symbol("get dispatcher"); + const kAddClient = Symbol("add client"); + const kRemoveClient = Symbol("remove client"); + const kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor() { + super(); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) break; + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) ret += pending; + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) ret += running; + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) ret += size; + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) await Promise.all(this[kClients].map((c) => c.close())); + else await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ + opts, + handler + }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) queueMicrotask(() => { + if (this[kNeedDrain]) this[kOnDrain](client[kUrl], [this, client]); + }); + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) this[kClients].splice(idx, 1); + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/pool.js +var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require_pool_base(); + const Client = require_client(); + const { InvalidArgumentError } = require_errors(); + const util = require_util$7(); + const { kUrl, kInterceptors } = require_symbols$4(); + const buildConnector = require_connect(); + const kOptions = Symbol("options"); + const kConnections = Symbol("connections"); + const kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { + super(); + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { + ...util.deepClone(options), + connect, + allowH2 + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connectionError", (origin, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) this[kClients].splice(idx, 1); + } + }); + } + [kGetDispatcher]() { + for (const client of this[kClients]) if (!client[kNeedDrain]) return client; + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module.exports = Pool; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require_errors(); + const { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); + const Pool = require_pool(); + const { kUrl, kInterceptors } = require_symbols$4(); + const { parseOrigin } = require_util$7(); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + const kCurrentWeight = Symbol("kCurrentWeight"); + const kIndex = Symbol("kIndex"); + const kWeight = Symbol("kWeight"); + const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + const kErrorPenalty = Symbol("kErrorPenalty"); + /** + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [upstreams]; + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) this.addUpstream(upstream); + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) client[kWeight] = this[kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + if (pool) this[kRemoveClient](pool); + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) throw new BalancedPoolMissingUpstreamError(); + if (!this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true)) return; + if (this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true)) return; + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module.exports = BalancedPool; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/agent.js +var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError } = require_errors(); + const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const DispatcherBase = require_dispatcher_base(); + const Pool = require_pool(); + const Client = require_client(); + const util = require_util$7(); + const createRedirectInterceptor = require_redirect_interceptor(); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kMaxRedirections = Symbol("maxRedirections"); + const kOnDrain = Symbol("onDrain"); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + super(); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (connect && typeof connect !== "function") connect = { ...connect }; + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { + ...util.deepClone(options), + connect + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) ret += client[kRunning]; + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) closePromises.push(client.close()); + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) destroyPromises.push(client.destroy(err)); + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module.exports = Agent; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const { URL: URL$1 } = __require("node:url"); + const Agent = require_agent(); + const Pool = require_pool(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + const buildConnector = require_connect(); + const Client = require_client(); + const kAgent = Symbol("proxy agent"); + const kClient = Symbol("proxy client"); + const kProxyHeaders = Symbol("proxy headers"); + const kRequestTls = Symbol("request tls settings"); + const kProxyTls = Symbol("proxy tls settings"); + const kConnectEndpoint = Symbol("connect endpoint function"); + const kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + const noop = () => {}; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) return new Client(origin, opts); + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) throw new InvalidArgumentError("Proxy URL is mandatory"); + this[kProxyHeaders] = headers; + if (factory) this.#client = factory(proxyUrl, { connect }); + else this.#client = new Client(proxyUrl, { connect }); + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { origin, path = "/", headers = {} } = opts; + opts.path = origin + path; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(origin); + headers.host = host; + } + opts.headers = { + ...this[kProxyHeaders], + ...headers + }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL$1) && !opts.uri) throw new InvalidArgumentError("Proxy uri is mandatory"); + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + const { proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { + uri: href, + protocol + }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin, options) => { + const { protocol } = new URL$1(origin); + if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + return agentFactory(origin, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts, callback) => { + let requestedPath = opts.host; + if (!opts.port) requestedPath += `:${defaultProtocolPort(opts.protocol)}`; + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host: opts.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts.servername; + this[kConnectEndpoint]({ + ...opts, + servername, + httpSocket: socket + }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); + else callback(err); + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch({ + ...opts, + headers + }, handler); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") return new URL$1(opts); + else if (opts instanceof URL$1) return opts; + else return new URL$1(opts.uri); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + /** + * @param {string[] | Record} headers + * @returns {Record} + */ + function buildHeaders(headers) { + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; + return headersPair; + } + return headers; + } + /** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ + function throwIfProxyAuthIsSent(headers) { + if (headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization")) throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + module.exports = ProxyAgent; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols$4(); + const ProxyAgent = require_proxy_agent(); + const Agent = require_agent(); + const DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + let experimentalWarned = false; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { code: "UNDICI-EHPA" }); + } + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY + }); + else this[kHttpProxyAgent] = this[kNoProxyAgent]; + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + return this.#getProxyAgentForUrl(url).dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) await this[kHttpProxyAgent].close(); + if (!this[kHttpsProxyAgent][kClosed]) await this[kHttpsProxyAgent].close(); + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) await this[kHttpProxyAgent].destroy(err); + if (!this[kHttpsProxyAgent][kDestroyed]) await this[kHttpsProxyAgent].destroy(err); + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; + if (protocol === "https:") return this[kHttpsProxyAgent]; + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true; + if (this.#noProxyValue === "*") return false; + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) continue; + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) return false; + } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) continue; + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) return false; + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module.exports = EnvHttpProxyAgent; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$15 = __require("node:assert"); + const { kRetryHandlerDefaultRetry } = require_symbols$4(); + const { RequestRetryError } = require_errors(); + const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = require_util$7(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + var RetryHandler = class RetryHandler { + constructor(opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts; + const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { + ...dispatchOpts, + body: wrapRequestBody(opts.body) + }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + minTimeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + methods: methods ?? [ + "GET", + "HEAD", + "OPTIONS", + "PUT", + "DELETE", + "TRACE" + ], + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); + } + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + } + onConnect(abort) { + if (this.aborted) abort(this.reason); + else this.abort = abort; + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) if (this.retryOpts.statusCodes.includes(statusCode) === false) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + else { + this.abort(new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort(new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const { start, size, end = size - 1 } = contentRange; + assert$15(this.start === start, "content-range mismatch"); + assert$15(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + const { start, size, end = size - 1 } = range; + assert$15(start != null && Number.isFinite(start), "content-range mismatch"); + assert$15(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + assert$15(Number.isFinite(this.start)); + assert$15(this.end == null || Number.isFinite(this.end), "invalid content-length"); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag.startsWith("W/")) this.etag = null; + return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; + this.retryOpts.retry(err, { + state: { counter: this.retryCount }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) headers["if-match"] = this.etag; + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } + } + }; + module.exports = RetryHandler; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module.exports = RetryAgent; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/readable.js +var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$14 = __require("node:assert"); + const { Readable: Readable$2 } = __require("node:stream"); + const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + const util = require_util$7(); + const { ReadableStreamFrom } = require_util$7(); + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("kAbort"); + const kContentType = Symbol("kContentType"); + const kContentLength = Symbol("kContentLength"); + const noop = () => {}; + var BodyReadable = class extends Readable$2 { + constructor({ resume, abort, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + if (err) this[kAbort](); + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) setImmediate(() => { + callback(err); + }); + else callback(err); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") this[kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + async text() { + return consume(this, "text"); + } + async json() { + return consume(this, "json"); + } + async blob() { + return consume(this, "blob"); + } + async bytes() { + return consume(this, "bytes"); + } + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + async formData() { + throw new NotSupportedError(); + } + get bodyUsed() { + return util.isDisturbed(this); + } + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert$14(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) throw new InvalidArgumentError("signal must be an AbortSignal"); + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) return null; + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) this.destroy(new AbortError()); + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) reject(signal.reason ?? new AbortError()); + else resolve(null); + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util.isDisturbed(self) || isLocked(self); + } + async function consume(stream, type) { + assert$14(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(/* @__PURE__ */ new TypeError("unusable")); + }); + else reject(rState.errored ?? /* @__PURE__ */ new TypeError("unusable")); + } else queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError()); + }); + consumeStart(stream[kConsume]); + }); + }); + } + function consumeStart(consume) { + if (consume.body === null) return; + const { _readableState: state } = consume.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume, chunk); + if (state.endEmitted) consumeEnd(this[kConsume]); + else consume.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + consume.stream.resume(); + while (consume.stream.read() != null); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + */ + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) return ""; + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) return new Uint8Array(0); + if (chunks.length === 1) return new Uint8Array(chunks[0]); + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume) { + const { type, body, resolve, stream, length } = consume; + try { + if (type === "text") resolve(chunksDecode(body, length)); + else if (type === "json") resolve(JSON.parse(chunksDecode(body, length))); + else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); + else if (type === "blob") resolve(new Blob(body, { type: stream[kContentType] })); + else if (type === "bytes") resolve(chunksConcat(body, length)); + consumeFinish(consume); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume, chunk) { + consume.length += chunk.length; + consume.body.push(chunk); + } + function consumeFinish(consume, err) { + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); + consume.type = null; + consume.stream = null; + consume.resolve = null; + consume.reject = null; + consume.length = 0; + consume.body = null; + } + module.exports = { + Readable: BodyReadable, + chunksDecode + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/util.js +var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$13 = __require("node:assert"); + const { ResponseStatusCodeError } = require_errors(); + const { chunksDecode } = require_readable(); + const CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert$13(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) payload = JSON.parse(chunksDecode(chunks, length)); + else if (isContentTypeText(contentType)) payload = chunksDecode(chunks, length); + } catch {} finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + const isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + const isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/api-request.js +var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$12 = __require("node:assert"); + const { Readable } = require_readable(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$4 } = __require("node:async_hooks"); + var RequestHandler = class extends AsyncResource$4 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + if (this.signal) if (this.signal.aborted) this.reason = this.signal.reason ?? new RequestAbortedError(); + else this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) util.destroy(this.res.on("error", util.nop), this.reason); + else if (this.abort) this.abort(this.reason); + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$12(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) res.on("close", this.removeAbortListener); + this.callback = null; + this.res = res; + if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = request; + module.exports.RequestHandler = RequestHandler; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { addAbortListener } = require_util$7(); + const { RequestAbortedError } = require_errors(); + const kListener = Symbol("kListener"); + const kSignal = Symbol("kSignal"); + function abort(self) { + if (self.abort) self.abort(self[kSignal]?.reason); + else self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); + removeSignal(self); + } + function addSignal(self, signal) { + self.reason = null; + self[kSignal] = null; + self[kListener] = null; + if (!signal) return; + if (signal.aborted) { + abort(self); + return; + } + self[kSignal] = signal; + self[kListener] = () => { + abort(self); + }; + addAbortListener(self[kSignal], self[kListener]); + } + function removeSignal(self) { + if (!self[kSignal]) return; + if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); + else self[kSignal].removeListener("abort", self[kListener]); + self[kSignal] = null; + self[kListener] = null; + } + module.exports = { + addSignal, + removeSignal + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/api-stream.js +var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$11 = __require("node:assert"); + const { finished: finished$1, PassThrough: PassThrough$1 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$3 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource$3 { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$11(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const contentType = (responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers)["content-type"]; + res = new PassThrough$1(); + this.callback = null; + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + } else { + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError("expected Writable"); + finished$1(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this; + this.res = null; + if (err || !res.readable) util.destroy(res, err); + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { + opaque, + trailers + }); + if (err) abort(); + }); + } + res.on("drain", resume); + this.res = res; + return (res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain) !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) return; + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = stream; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Readable: Readable$1, Duplex, PassThrough } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { AsyncResource: AsyncResource$2 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$10 = __require("node:assert"); + const kResume = Symbol("resume"); + var PipelineRequest = class extends Readable$1 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable$1 { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource$2 { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError("invalid handler"); + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) body.resume(); + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError(); + if (abort && err) abort(); + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert$10(!res, "pipeline cannot be retried"); + assert$10(!ret.destroyed); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ + statusCode, + headers + }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util.nop); + throw err; + } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); + body.on("data", (chunk) => { + const { ret, body } = this; + if (!ret.push(chunk) && body.pause) body.pause(); + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) util.destroy(ret, new RequestAbortedError()); + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } + } + module.exports = pipeline; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, SocketError } = require_errors(); + const { AsyncResource: AsyncResource$1 } = __require("node:async_hooks"); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$9 = __require("node:assert"); + var UpgradeHandler = class extends AsyncResource$1 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$9(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert$9(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = upgrade; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/api-connect.js +var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$8 = __require("node:assert"); + const { AsyncResource } = __require("node:async_hooks"); + const { InvalidArgumentError, SocketError } = require_errors(); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$8(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: "CONNECT" + }, connectHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = connect; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/api/index.js +var require_api = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports.request = require_api_request(); + module.exports.stream = require_api_stream(); + module.exports.pipeline = require_api_pipeline(); + module.exports.upgrade = require_api_upgrade(); + module.exports.connect = require_api_connect(); +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { UndiciError } = require_errors(); + const kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); + /** + * The request does not match any registered mock dispatches. + */ + var MockNotMatchedError = class MockNotMatchedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, MockNotMatchedError); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMockNotMatchedError] === true; + } + [kMockNotMatchedError] = true; + }; + module.exports = { MockNotMatchedError }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected") + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { MockNotMatchedError } = require_mock_errors(); + const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require_mock_symbols(); + const { buildURL } = require_util$7(); + const { STATUS_CODES: STATUS_CODES$1 } = __require("node:http"); + const { types: { isPromise } } = __require("node:util"); + function matchValue(match, value) { + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + })); + } + /** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; + return; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + /** @param {string[]} headers */ + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch, headers) { + if (typeof mockDispatch.headers === "function") { + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) if (!matchValue(matchHeaderValue, getHeaderByName(headers, matchHeaderName))) return false; + return true; + } + function safeUrl(path) { + if (typeof path !== "string") return path; + const pathSegments = path.split("?"); + if (pathSegments.length !== 2) return path; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path); + const methodMatch = matchValue(mockDispatch.method, method); + const bodyMatch = typeof mockDispatch.body !== "undefined" ? matchValue(mockDispatch.body, body) : true; + const headersMatch = matchHeaders(mockDispatch, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData(data) { + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === "object") return JSON.stringify(data); + else return data.toString(); + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`); + return matchedMockDispatches[0]; + } + function addMockDispatch(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData + } + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) return false; + return matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); + } + function buildKey(opts) { + const { path, method, body, headers, query } = opts; + return { + path, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); + } + return result; + } + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ + function getStatusText(statusCode) { + return STATUS_CODES$1[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) buffers.push(data); + return Buffer.concat(buffers).toString("utf8"); + } + /** + * Mock dispatch function used to simulate undici dispatches + */ + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch = getMockDispatch(this[kDispatches], key); + mockDispatch.timesInvoked++; + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch; + const { timesInvoked, times } = mockDispatch; + mockDispatch.consumed = !persist && timesInvoked >= times; + mockDispatch.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); + else handleReply(this[kDispatches]); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() {} + return true; + } + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; + } + else originalDispatch.call(this, opts, handler); + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) return true; + return false; + } + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName, + buildHeadersFromArray + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + const { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); + const { InvalidArgumentError } = require_errors(); + const { buildURL } = require_util$7(); + /** + * Defines the scope API for an interceptor reply + */ + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + /** + * Defines an interceptor for a Mock + */ + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") throw new InvalidArgumentError("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData({ statusCode, data, responseOptions }) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + return { + statusCode, + data, + headers: { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }, + trailers: { + ...this[kDefaultTrailers], + ...responseOptions.trailers + } + }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError("statusCode must be defined"); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError("responseOptions must be an object"); + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + if (typeof replyOptionsCallbackOrStatusCode === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError("reply options callback must return an object"); + const replyParameters = { + data: "", + responseOptions: {}, + ...resolvedData + }; + this.validateReplyParameters(replyParameters); + return { ...this.createMockScopeDispatchData(replyParameters) }; + }; + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)); + } + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + const dispatchData = this.createMockScopeDispatchData(replyParameters); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") throw new InvalidArgumentError("error must be defined"); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], { error })); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") throw new InvalidArgumentError("headers must be defined"); + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") throw new InvalidArgumentError("trailers must be defined"); + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module.exports.MockInterceptor = MockInterceptor; + module.exports.MockScope = MockScope; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify: promisify$1 } = __require("node:util"); + const Client = require_client(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ + var MockClient = class extends Client { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify$1(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockClient; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify } = __require("node:util"); + const Pool = require_pool(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ + var MockPool = class extends Pool { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockPool; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + const plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module.exports = class Pluralizer { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count, + noun + }; + } + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$1 } = __require("node:stream"); + const { Console } = __require("node:console"); + const PERSISTENT = process.versions.icu ? "✅" : "Y "; + const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; + /** + * Gets the output of `console.table(…)` as a string. + */ + module.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform$1({ transform(chunk, _enc, cb) { + cb(null, chunk); + } }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { colors: !disableColors && !process.env.CI } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kClients } = require_symbols$4(); + const Agent = require_agent(); + const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); + const MockClient = require_mock_client(); + const MockPool = require_mock_pool(); + const { matchValue, buildMockOptions } = require_mock_utils(); + const { InvalidArgumentError, UndiciError } = require_errors(); + const Dispatcher = require_dispatcher(); + const Pluralizer = require_pluralizer(); + const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + const agent = opts?.agent ? opts.agent : new Agent(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + return this[kAgent].dispatch(opts, handler); + } + async close() { + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); + } + disableNetConnect() { + this[kNetConnect] = false; + } + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, dispatcher); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const client = this[kClients].get(origin); + if (client) return client; + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope[kDispatches].map((dispatch) => ({ + ...dispatch, + origin + }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module.exports = MockAgent; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/global.js +var require_global = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + const { InvalidArgumentError } = require_errors(); + const Agent = require_agent(); + if (getGlobalDispatcher() === void 0) setGlobalDispatcher(new Agent()); + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError("Argument agent must implement Agent"); + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + module.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = class DecoratorHandler { + #handler; + constructor(handler) { + if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); + this.#handler = handler; + } + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + onError(...args) { + return this.#handler.onError?.(...args); + } + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + onData(...args) { + return this.#handler.onData?.(...args); + } + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); + } + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/interceptor/redirect.js +var require_redirect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + module.exports = (opts) => { + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch) => { + return function redirectInterceptor(opts, handler) { + const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts; + if (!maxRedirections) return dispatch(opts, handler); + return dispatch(baseOpts, new RedirectHandler(dispatch, maxRedirections, opts, handler)); + }; + }; + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/interceptor/retry.js +var require_retry = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RetryHandler = require_retry_handler(); + module.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch(opts, new RetryHandler({ + ...opts, + retryOptions: { + ...globalOpts, + ...opts.retryOptions + } + }, { + handler, + dispatch + })); + }; + }; + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/interceptor/dump.js +var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + constructor({ maxSize }, handler) { + super(handler); + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError("maxSize must be a number greater than 0"); + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; + } + onConnect(abort) { + this.#abort = abort; + this.#handler.onConnect(this.#customAbort.bind(this)); + } + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const contentLength = util.parseHeaders(rawHeaders)["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.#aborted) return true; + return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + onError(err) { + if (this.#dumped) return; + err = this.#reason ?? err; + this.#handler.onError(err); + } + onData(chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.#aborted) this.#handler.onError(this.#reason); + else this.#handler.onComplete([]); + } + return true; + } + onComplete(trailers) { + if (this.#dumped) return; + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + this.#handler.onComplete(trailers); + } + }; + function createDumpInterceptor({ maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + return dispatch(opts, new DumpHandler({ maxSize: dumpMaxSize }, handler)); + }; + }; + } + module.exports = createDumpInterceptor; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/interceptor/dns.js +var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isIP } = __require("node:net"); + const { lookup } = __require("node:dns"); + const DecoratorHandler = require_decorator_handler(); + const { InvalidArgumentError, InformationalError } = require_errors(); + const maxInt = Math.pow(2, 31) - 1; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + }); + else { + const ip = this.pick(origin, ips, newOpts.affinity); + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + } + } + #defaultLookup(origin, opts, cb) { + lookup(origin.hostname, { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first" + }, (err, addresses) => { + if (err) return cb(err); + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); + cb(null, results.values()); + }); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { + 4: null, + 6: null + } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") record.ttl = Math.min(record.ttl, this.#maxTTL); + else record.ttl = this.#maxTTL; + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + constructor(state, { origin, handler, dispatch }, opts) { + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onError(err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": + if (this.#state.dualStack) { + this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { + if (err) return this.#handler.onError(err); + const dispatchOpts = { + ...this.#opts, + origin: newOrigin + }; + this.#dispatch(dispatchOpts, this); + }); + return; + } + this.#handler.onError(err); + return; + case "ENOTFOUND": this.#state.deleteRecord(this.#origin); + default: + this.#handler.onError(err); + break; + } + } + }; + module.exports = (interceptorOpts) => { + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError("Invalid lookup. Must be a function"); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError("Invalid pick. Must be a function"); + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const instance = new DNSInstance({ + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }); + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) return handler.onError(err); + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers + } + }; + dispatch(dispatchOpts, instance.getHandler({ + origin, + dispatch, + handler + }, origDispatchOpts)); + }); + return true; + }; + }; + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/headers.js +var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$4(); + const { kEnumerableProperty } = require_util$7(); + const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = require_util$6(); + const { webidl } = require_webidl(); + const assert$7 = __require("node:assert"); + const util = __require("node:util"); + const kHeadersMap = Symbol("headers map"); + const kHeadersSortedMap = Symbol("headers map sorted"); + /** + * @param {number} code + */ + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill(headers, object) { + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + appendHeader(headers, header[0], header[1]); + } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); + } else throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (getHeadersGuard(headers) === "immutable") throw new TypeError("immutable"); + return getHeadersList(headers).append(name, value, false); + } + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + var HeadersList = class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]); + this[kHeadersSortedMap] = init[kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this[kHeadersMap] = new Map(init); + this[kHeadersSortedMap] = null; + } + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else this[kHeadersMap].set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") this.cookies = [value]; + this[kHeadersMap].set(lowercaseName, { + name, + value + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this[kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") this.cookies = null; + this[kHeadersMap].delete(name); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this[kHeadersMap]) yield [name, value]; + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size !== 0) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; + return headers; + } + rawValues() { + return this[kHeadersMap].values(); + } + get entriesList() { + const headers = []; + if (this[kHeadersMap].size !== 0) for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); + else headers.push([name, value]); + return headers; + } + toSortedArray() { + const size = this[kHeadersMap].size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) return array; + const iterator = this[kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert$7(firstValue[1].value !== null); + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { + value = iterator.next().value; + x = array[i] = [value[0], value[1].value]; + assert$7(x[1] !== null); + left = 0; + right = i; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; + } + if (i !== pivot) { + j = i; + while (j > left) array[j] = array[--j]; + array[left] = x; + } + } + /* c8 ignore next 4 */ + if (!iterator.next().done) throw new TypeError("Unreachable"); + return array; + } else { + let i = 0; + for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + array[i++] = [name, value]; + assert$7(value !== null); + } + return array.sort(compareHeaderName); + } + } + }; + var Headers = class Headers { + #guard; + #headersList; + constructor(init = void 0) { + webidl.util.markAsUncloneable(this); + if (init === kConstruct) return; + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init !== void 0) { + init = webidl.converters.HeadersInit(init, "Headers contructor", "init"); + fill(this, init); + } + } + append(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + return appendHeader(this, name, value); + } + delete(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + name = webidl.converters.ByteString(name, "Headers.delete", "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + if (!this.#headersList.contains(name, false)) return; + this.#headersList.delete(name, false); + } + get(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.get(name, false); + } + has(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.contains(name, false); + } + set(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + this.#headersList.set(name, value, false); + } + getSetCookie() { + webidl.brandCheck(this, Headers); + const list = this.#headersList.cookies; + if (list) return [...list]; + return []; + } + get [kHeadersSortedMap]() { + if (this.#headersList[kHeadersSortedMap]) return this.#headersList[kHeadersSortedMap]; + const headers = []; + const names = this.#headersList.toSortedArray(); + const cookies = this.#headersList.cookies; + if (cookies === null || cookies.length === 1) return this.#headersList[kHeadersSortedMap] = names; + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else headers.push([name, value]); + } + return this.#headersList[kHeadersSortedMap] = headers; + } + [util.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + static getHeadersList(o) { + return o.#headersList; + } + static setHeadersList(o, list) { + o.#headersList = list; + } + }; + const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util.inspect.custom]: { enumerable: false } + }); + webidl.converters.HeadersInit = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object") { + const iterator = Reflect.get(V, Symbol.iterator); + if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) try { + return getHeadersList(V).entriesList; + } catch {} + if (typeof iterator === "function") return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); + return webidl.converters["record"](V, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module.exports = { + fill, + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/response.js +var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); + const util = require_util$7(); + const nodeUtil$1 = __require("node:util"); + const { kEnumerableProperty } = util; + const { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm } = require_util$6(); + const { redirectStatusSet, nullBodyStatus } = require_constants$2(); + const { kState, kHeaders } = require_symbols$3(); + const { webidl } = require_webidl(); + const { FormData } = require_formdata(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$6 = __require("node:assert"); + const { types: types$2 } = __require("node:util"); + const textEncoder = new TextEncoder("utf-8"); + var Response = class Response { + static error() { + return fromInnerResponse(makeNetworkError(), "immutable"); + } + static json(data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init !== null) init = webidl.converters.ResponseInit(init); + const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data))); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init, { + body: body[0], + type: "application/json" + }); + return responseObject; + } + static redirect(url, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); + } + if (!redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject[kState].status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject[kState].headersList.append("location", value, true); + return responseObject; + } + constructor(body = null, init = {}) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) return; + if (body !== null) body = webidl.converters.BodyInit(body); + init = webidl.converters.ResponseInit(init); + this[kState] = makeResponse({}); + this[kHeaders] = new Headers(kConstruct); + setHeadersGuard(this[kHeaders], "response"); + setHeadersList(this[kHeaders], this[kState].headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { + body: extractedBody, + type + }; + } + initializeResponse(this, init, bodyWithType); + } + get type() { + webidl.brandCheck(this, Response); + return this[kState].type; + } + get url() { + webidl.brandCheck(this, Response); + const urlList = this[kState].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ""; + return URLSerializer(url, true); + } + get redirected() { + webidl.brandCheck(this, Response); + return this[kState].urlList.length > 1; + } + get status() { + webidl.brandCheck(this, Response); + return this[kState].status; + } + get ok() { + webidl.brandCheck(this, Response); + return this[kState].status >= 200 && this[kState].status <= 299; + } + get statusText() { + webidl.brandCheck(this, Response); + return this[kState].statusText; + } + get headers() { + webidl.brandCheck(this, Response); + return this[kHeaders]; + } + get body() { + webidl.brandCheck(this, Response); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Response); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + clone() { + webidl.brandCheck(this, Response); + if (bodyUnusable(this)) throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + const clonedResponse = cloneResponse(this[kState]); + if (hasFinalizationRegistry && this[kState].body?.stream) streamRegistry.register(this, new WeakRef(this[kState].body.stream)); + return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])); + } + [nodeUtil$1.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${nodeUtil$1.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Response); + Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) return filterResponse(cloneResponse(response.internalResponse), response.type); + const newResponse = makeResponse({ + ...response, + body: null + }); + if (response.body != null) newResponse.body = cloneBody(newResponse, response.body); + return newResponse; + } + function makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), + urlList: init?.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError(reason) { + return makeResponse({ + type: "error", + status: 0, + error: isErrorLike(reason) ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function isNetworkError(response) { + return response.type === "error" && response.status === 0; + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert$6(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse(response, type) { + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$6(false); + } + function makeAppropriateNetworkError(fetchParams, err = null) { + assert$6(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); + } + if ("status" in init && init.status != null) response[kState].status = init.status; + if ("statusText" in init && init.statusText != null) response[kState].statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(response[kHeaders], init.headers); + if (body) { + if (nullBodyStatus.includes(response.status)) throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("content-type", true)) response[kState].headersList.append("content-type", body.type, true); + } + } + /** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ + function fromInnerResponse(innerResponse, guard) { + const response = new Response(kConstruct); + response[kState] = innerResponse; + response[kHeaders] = new Headers(kConstruct); + setHeadersList(response[kHeaders], innerResponse.headersList); + setHeadersGuard(response[kHeaders], guard); + if (hasFinalizationRegistry && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + return response; + } + webidl.converters.ReadableStream = webidl.interfaceConverter(ReadableStream); + webidl.converters.FormData = webidl.interfaceConverter(FormData); + webidl.converters.URLSearchParams = webidl.interfaceConverter(URLSearchParams); + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, name); + if (isBlobLike(V)) return webidl.converters.Blob(V, prefix, name, { strict: false }); + if (ArrayBuffer.isView(V) || types$2.isArrayBuffer(V)) return webidl.converters.BufferSource(V, prefix, name); + if (util.isFormDataLike(V)) return webidl.converters.FormData(V, prefix, name, { strict: false }); + if (V instanceof URLSearchParams) return webidl.converters.URLSearchParams(V, prefix, name); + return webidl.converters.DOMString(V, prefix, name); + }; + webidl.converters.BodyInit = function(V, prefix, argument) { + if (V instanceof ReadableStream) return webidl.converters.ReadableStream(V, prefix, argument); + if (V?.[Symbol.asyncIterator]) return V; + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: () => 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: () => "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + module.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse, + fromInnerResponse + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +var require_dispatcher_weakref = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConnected, kSize } = require_symbols$4(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on("disconnect", () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) this.finalizer(key); + }); + } + unregister(key) {} + }; + module.exports = function() { + if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { + process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + } + return { + WeakRef, + FinalizationRegistry + }; + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/request.js +var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + const { FinalizationRegistry } = require_dispatcher_weakref()(); + const util = require_util$7(); + const nodeUtil = __require("node:util"); + const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = require_util$6(); + const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$2(); + const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + const { kHeaders, kSignal, kState, kDispatcher } = require_symbols$3(); + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$5 = __require("node:assert"); + const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("node:events"); + const kAbortController = Symbol("abortController"); + const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + const dependentControllerMap = /* @__PURE__ */ new WeakMap(); + function buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== void 0) { + requestFinalizer.unregister(abort); + this.removeEventListener("abort", abort); + ac.abort(this.reason); + const controllerList = dependentControllerMap.get(ac.signal); + if (controllerList !== void 0) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== void 0) ctrl.abort(this.reason); + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + let patchMethodWarning = false; + var Request = class Request { + constructor(input, init = {}) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) return; + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input, prefix, "input"); + init = webidl.converters.RequestInit(init, prefix, "init"); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this[kDispatcher] = init.dispatcher; + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); + request = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + this[kDispatcher] = init.dispatcher || input[kDispatcher]; + assert$5(input instanceof Request); + request = input[kState]; + signal = input[kSignal]; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) window = request.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; + request = makeRequest({ + method: request.method, + headersList: request.headersList, + unsafeRequest: request.unsafeRequest, + client: environmentSettingsObject.settingsObject, + window, + priority: request.priority, + origin: request.origin, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + mode: request.mode, + credentials: request.credentials, + cache: request.cache, + redirect: request.redirect, + integrity: request.integrity, + keepalive: request.keepalive, + reloadNavigation: request.reloadNavigation, + historyNavigation: request.historyNavigation, + urlList: [...request.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request.mode === "navigate") request.mode = "same-origin"; + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") request.referrer = "no-referrer"; + else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) request.referrer = "client"; + else request.referrer = parsedReferrer; + } + } + if (init.referrerPolicy !== void 0) request.referrerPolicy = init.referrerPolicy; + let mode; + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request.mode = mode; + if (init.credentials !== void 0) request.credentials = init.credentials; + if (init.cache !== void 0) request.cache = init.cache; + if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request.redirect = init.redirect; + if (init.integrity != null) request.integrity = String(init.integrity); + if (init.keepalive !== void 0) request.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { + let method = init.method; + const mayBeNormalized = normalizedMethodRecords[method]; + if (mayBeNormalized !== void 0) request.method = mayBeNormalized; + else { + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); + method = normalizedMethodRecordsBase[upperCase] ?? method; + request.method = method; + } + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); + patchMethodWarning = true; + } + } + if (init.signal !== void 0) signal = init.signal; + this[kState] = request; + const ac = new AbortController(); + this[kSignal] = ac.signal; + if (signal != null) { + if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const abort = buildAbort(new WeakRef(ac)); + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); + else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(1500, signal); + } catch {} + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { + signal, + abort + }, abort); + } + } + this[kHeaders] = new Headers(kConstruct); + setHeadersList(this[kHeaders], request.headersList); + setHeadersGuard(this[kHeaders], "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); + setHeadersGuard(this[kHeaders], "request-no-cors"); + } + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = getHeadersList(this[kHeaders]); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); + headersList.cookies = headers.cookies; + } else fillHeaders(this[kHeaders], headers); + } + const inputBody = input instanceof Request ? input[kState].body : null; + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody(init.body, request.keepalive); + initBody = extractedBody; + if (contentType && !getHeadersList(this[kHeaders]).contains("content-type", true)) this[kHeaders].append("content-type", contentType); + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (bodyUnusable(input)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState].body = finalBody; + } + get method() { + webidl.brandCheck(this, Request); + return this[kState].method; + } + get url() { + webidl.brandCheck(this, Request); + return URLSerializer(this[kState].url); + } + get headers() { + webidl.brandCheck(this, Request); + return this[kHeaders]; + } + get destination() { + webidl.brandCheck(this, Request); + return this[kState].destination; + } + get referrer() { + webidl.brandCheck(this, Request); + if (this[kState].referrer === "no-referrer") return ""; + if (this[kState].referrer === "client") return "about:client"; + return this[kState].referrer.toString(); + } + get referrerPolicy() { + webidl.brandCheck(this, Request); + return this[kState].referrerPolicy; + } + get mode() { + webidl.brandCheck(this, Request); + return this[kState].mode; + } + get credentials() { + return this[kState].credentials; + } + get cache() { + webidl.brandCheck(this, Request); + return this[kState].cache; + } + get redirect() { + webidl.brandCheck(this, Request); + return this[kState].redirect; + } + get integrity() { + webidl.brandCheck(this, Request); + return this[kState].integrity; + } + get keepalive() { + webidl.brandCheck(this, Request); + return this[kState].keepalive; + } + get isReloadNavigation() { + webidl.brandCheck(this, Request); + return this[kState].reloadNavigation; + } + get isHistoryNavigation() { + webidl.brandCheck(this, Request); + return this[kState].historyNavigation; + } + get signal() { + webidl.brandCheck(this, Request); + return this[kSignal]; + } + get body() { + webidl.brandCheck(this, Request); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Request); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + get duplex() { + webidl.brandCheck(this, Request); + return "half"; + } + clone() { + webidl.brandCheck(this, Request); + if (bodyUnusable(this)) throw new TypeError("unusable"); + const clonedRequest = cloneRequest(this[kState]); + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else { + let list = dependentControllerMap.get(this.signal); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener(ac.signal, buildAbort(acRef)); + } + return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Request); + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ + ...request, + body: null + }); + if (request.body != null) newRequest.body = cloneBody(newRequest, request.body); + return newRequest; + } + /** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ + function fromInnerRequest(innerRequest, signal, guard) { + const request = new Request(kConstruct); + request[kState] = innerRequest; + request[kSignal] = signal; + request[kHeaders] = new Headers(kConstruct); + setHeadersList(request[kHeaders], innerRequest.headersList); + setHeadersGuard(request[kHeaders], guard); + return request; + } + Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl.converters.Request = webidl.interfaceConverter(Request); + webidl.converters.RequestInfo = function(V, prefix, argument) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, argument); + if (V instanceof Request) return webidl.converters.Request(V, prefix, argument); + return webidl.converters.USVString(V, prefix, argument); + }; + webidl.converters.AbortSignal = webidl.interfaceConverter(AbortSignal); + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter(webidl.converters.BodyInit) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter((signal) => webidl.converters.AbortSignal(signal, "RequestInit", "signal", { strict: false })) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]); + module.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fetch/index.js +var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse } = require_response(); + const { HeadersList } = require_headers(); + const { Request, cloneRequest } = require_request(); + const zlib = __require("node:zlib"); + const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require_util$6(); + const { kState, kDispatcher } = require_symbols$3(); + const assert$4 = __require("node:assert"); + const { safelyExtractBody, extractBody } = require_body(); + const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require_constants$2(); + const EE = __require("node:events"); + const { Readable, pipeline: pipeline$1, finished } = __require("node:stream"); + const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util$7(); + const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + const { getGlobalDispatcher } = require_global(); + const { webidl } = require_webidl(); + const { STATUS_CODES } = __require("node:http"); + const GET_OR_HEAD = ["GET", "HEAD"]; + const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + terminate(reason) { + if (this.state !== "ongoing") return; + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + abort(error) { + if (this.state !== "ongoing") return; + this.state = "aborted"; + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + function fetch(input, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request = requestObject[kState]; + if (requestObject.signal.aborted) { + abortFetch(p, request, null, requestObject.signal.reason); + return p.promise; + } + if (request.client.globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener(requestObject.signal, () => { + locallyAborted = true; + assert$4(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + const processResponse = (response) => { + if (locallyAborted) return; + if (response.aborted) { + abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p.resolve(responseObject.deref()); + p = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: requestObject[kDispatcher] + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) return; + if (timingInfo === null) return; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState); + } + const markResourceTiming = performance.markResourceTiming; + function abortFetch(p, request, responseObject, error) { + if (p) p.reject(error); + if (request.body != null && isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; + const response = responseObject[kState]; + if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + } + function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() }) { + assert$4(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert$4(!request.body || request.body.stream); + if (request.window === "client") request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + if (request.origin === "client") request.origin = request.client.origin; + if (request.policyContainer === "client") if (request.client != null) request.policyContainer = clonePolicyContainer(request.client.policyContainer); + else request.policyContainer = makePolicyContainer(); + if (!request.headersList.contains("accept", true)) request.headersList.append("accept", "*/*", true); + if (!request.headersList.contains("accept-language", true)) request.headersList.append("accept-language", "*", true); + if (request.priority === null) {} + if (subresourceSet.has(request.destination)) {} + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive = false) { + const request = fetchParams.request; + let response = null; + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") response = makeNetworkError("bad port"); + if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; + if (request.referrer !== "no-referrer") request.referrer = determineRequestsReferrer(request); + if (response === null) response = await (async () => { + const currentURL = requestCurrentURL(request); + if (sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || currentURL.protocol === "data:" || request.mode === "navigate" || request.mode === "websocket") { + request.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); + if (request.mode === "no-cors") { + if (request.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + request.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + request.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + if (recursive) return response; + if (response.status !== 0 && !response.internalResponse) { + if (request.responseTainting === "cors") {} + if (request.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$4(false); + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + if (!request.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); + } else fetchFinale(fetchParams, response); + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); + switch (scheme) { + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); + case "blob:": { + if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; + const blobURLEntry = requestCurrentURL(request); + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + const blob = resolveObjectURL(blobURLEntry.toString()); + if (request.method !== "GET" || !isBlobLike(blob)) return Promise.resolve(makeNetworkError("invalid method")); + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type = blob.type; + if (!request.headersList.contains("range", true)) { + const bodyWithType = extractBody(blob); + response.statusText = "OK"; + response.body = bodyWithType[0]; + response.headersList.set("content-length", serializedFullLength, true); + response.headersList.set("content-type", type, true); + } else { + response.rangeRequested = true; + const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true); + if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + if (rangeStart === null) { + rangeStart = fullLength - rangeEnd; + rangeEnd = rangeStart + rangeEnd - 1; + } else { + if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; + } + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + response.body = extractBody(slicedBlob)[0]; + const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); + const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); + response.status = 206; + response.statusText = "Partial Content"; + response.headersList.set("content-length", serializedSlicedLength, true); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + return Promise.resolve(response); + } + case "data:": { + const dataURLStruct = dataURLProcessor(requestCurrentURL(request)); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [["content-type", { + name: "Content-Type", + value: mimeType + }]], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); + case "http:": + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); + } + function fetchFinale(fetchParams, response) { + let timingInfo = fetchParams.timingInfo; + const processResponseEndOfBody = () => { + const unsafeEndTime = Date.now(); + if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; + fetchParams.controller.reportTimingSteps = () => { + if (fetchParams.request.url.protocol !== "https:") return; + timingInfo.endTime = unsafeEndTime; + let cacheState = response.cacheState; + const bodyInfo = response.bodyInfo; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + cacheState = ""; + } + let responseStatus = 0; + if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { + responseStatus = response.status; + const mimeType = extractMimeType(response.headersList); + if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + }; + const processResponseEndOfBodyTask = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); + }; + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + if (fetchParams.processResponse != null) queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) processResponseEndOfBody(); + else finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") {} + if (response === null) { + if (request.redirect === "follow") request.serviceWorkers = "none"; + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request, response) === "failure") request.timingAllowFailed = true; + } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if (redirectStatusSet.has(actualResponse.status)) { + if (request.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request.redirect === "manual") response = actualResponse; + else if (request.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$4(false); + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request).hash); + if (locationURL == null) return response; + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; + for (const headerName of requestBodyHeader) request.headersList.delete(headerName); + } + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization", true); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + if (request.body != null) { + assert$4(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + const httpCache = null; + if (request.window === "no-window" && request.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + httpRequest = cloneRequest(request); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); + if (contentLength != null && httpRequest.keepalive) {} + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); + if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); + } + if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); + if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); + httpRequest.headersList.delete("host", true); + if (includeCredentials) {} + if (httpCache == null) httpRequest.cache = "no-store"; + if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} + if (response == null) { + if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); + const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} + if (response == null) response = forwardResponse; + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + return makeNetworkError("proxy authentication required"); + } + if (response.status === 421 && !isNewConnectionFetch && (request.body == null || request.body.source != null)) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + if (isAuthenticationFetch) {} + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert$4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + request.cache = "no-store"; + if (request.mode === "websocket") {} + let requestBody = null; + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) return; + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ + status, + statusText, + headersList + }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = async () => { + await fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); + }; + const stream = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + }, + type: "bytes" + }); + response.body = { + stream, + source: null, + length: null + }; + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (fetchParams.controller.controller.desiredSize <= 0) return; + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + fetchParams.controller.connection.destroy(); + } + return response; + function dispatch({ body }) { + const url = requestCurrentURL(request); + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : void 0 + }, { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException("The operation was aborted.", "AbortError")); + else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted() { + timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) return; + let location = ""; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const decoders = []; + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const contentEncoding = headersList.get("content-encoding", true); + /** @type {string[]} */ + const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject(/* @__PURE__ */ new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + return true; + } + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i].trim(); + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders.push(createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH + })); + else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status, + statusText, + headersList, + body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { + if (err) this.onError(err); + }).on("error", onError) : this.body.on("error", onError) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) return; + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + if (fetchParams.controller.onAborted) fetchParams.controller.off("terminated", fetchParams.controller.onAborted); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error) { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) return; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + })); + } + } + module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fileapi/symbols.js +var require_symbols$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kState: Symbol("FileReader state"), + kResult: Symbol("FileReader result"), + kError: Symbol("FileReader error"), + kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), + kEvents: Symbol("FileReader events"), + kAborted: Symbol("FileReader aborted") + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fileapi/progressevent.js +var require_progressevent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const kState = Symbol("ProgressEvent state"); + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + var ProgressEvent = class ProgressEvent extends Event { + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].lengthComputable; + } + get loaded() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].loaded; + } + get total() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].total; + } + }; + webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "loaded", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "total", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]); + module.exports = { ProgressEvent }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fileapi/encoding.js +var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ + function getEncoding(label) { + if (!label) return "failure"; + switch (label.trim().toLowerCase()) { + case "unicode-1-1-utf-8": + case "unicode11utf8": + case "unicode20utf8": + case "utf-8": + case "utf8": + case "x-unicode20utf8": return "UTF-8"; + case "866": + case "cp866": + case "csibm866": + case "ibm866": return "IBM866"; + case "csisolatin2": + case "iso-8859-2": + case "iso-ir-101": + case "iso8859-2": + case "iso88592": + case "iso_8859-2": + case "iso_8859-2:1987": + case "l2": + case "latin2": return "ISO-8859-2"; + case "csisolatin3": + case "iso-8859-3": + case "iso-ir-109": + case "iso8859-3": + case "iso88593": + case "iso_8859-3": + case "iso_8859-3:1988": + case "l3": + case "latin3": return "ISO-8859-3"; + case "csisolatin4": + case "iso-8859-4": + case "iso-ir-110": + case "iso8859-4": + case "iso88594": + case "iso_8859-4": + case "iso_8859-4:1988": + case "l4": + case "latin4": return "ISO-8859-4"; + case "csisolatincyrillic": + case "cyrillic": + case "iso-8859-5": + case "iso-ir-144": + case "iso8859-5": + case "iso88595": + case "iso_8859-5": + case "iso_8859-5:1988": return "ISO-8859-5"; + case "arabic": + case "asmo-708": + case "csiso88596e": + case "csiso88596i": + case "csisolatinarabic": + case "ecma-114": + case "iso-8859-6": + case "iso-8859-6-e": + case "iso-8859-6-i": + case "iso-ir-127": + case "iso8859-6": + case "iso88596": + case "iso_8859-6": + case "iso_8859-6:1987": return "ISO-8859-6"; + case "csisolatingreek": + case "ecma-118": + case "elot_928": + case "greek": + case "greek8": + case "iso-8859-7": + case "iso-ir-126": + case "iso8859-7": + case "iso88597": + case "iso_8859-7": + case "iso_8859-7:1987": + case "sun_eu_greek": return "ISO-8859-7"; + case "csiso88598e": + case "csisolatinhebrew": + case "hebrew": + case "iso-8859-8": + case "iso-8859-8-e": + case "iso-ir-138": + case "iso8859-8": + case "iso88598": + case "iso_8859-8": + case "iso_8859-8:1988": + case "visual": return "ISO-8859-8"; + case "csiso88598i": + case "iso-8859-8-i": + case "logical": return "ISO-8859-8-I"; + case "csisolatin6": + case "iso-8859-10": + case "iso-ir-157": + case "iso8859-10": + case "iso885910": + case "l6": + case "latin6": return "ISO-8859-10"; + case "iso-8859-13": + case "iso8859-13": + case "iso885913": return "ISO-8859-13"; + case "iso-8859-14": + case "iso8859-14": + case "iso885914": return "ISO-8859-14"; + case "csisolatin9": + case "iso-8859-15": + case "iso8859-15": + case "iso885915": + case "iso_8859-15": + case "l9": return "ISO-8859-15"; + case "iso-8859-16": return "ISO-8859-16"; + case "cskoi8r": + case "koi": + case "koi8": + case "koi8-r": + case "koi8_r": return "KOI8-R"; + case "koi8-ru": + case "koi8-u": return "KOI8-U"; + case "csmacintosh": + case "mac": + case "macintosh": + case "x-mac-roman": return "macintosh"; + case "iso-8859-11": + case "iso8859-11": + case "iso885911": + case "tis-620": + case "windows-874": return "windows-874"; + case "cp1250": + case "windows-1250": + case "x-cp1250": return "windows-1250"; + case "cp1251": + case "windows-1251": + case "x-cp1251": return "windows-1251"; + case "ansi_x3.4-1968": + case "ascii": + case "cp1252": + case "cp819": + case "csisolatin1": + case "ibm819": + case "iso-8859-1": + case "iso-ir-100": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "iso_8859-1:1987": + case "l1": + case "latin1": + case "us-ascii": + case "windows-1252": + case "x-cp1252": return "windows-1252"; + case "cp1253": + case "windows-1253": + case "x-cp1253": return "windows-1253"; + case "cp1254": + case "csisolatin5": + case "iso-8859-9": + case "iso-ir-148": + case "iso8859-9": + case "iso88599": + case "iso_8859-9": + case "iso_8859-9:1989": + case "l5": + case "latin5": + case "windows-1254": + case "x-cp1254": return "windows-1254"; + case "cp1255": + case "windows-1255": + case "x-cp1255": return "windows-1255"; + case "cp1256": + case "windows-1256": + case "x-cp1256": return "windows-1256"; + case "cp1257": + case "windows-1257": + case "x-cp1257": return "windows-1257"; + case "cp1258": + case "windows-1258": + case "x-cp1258": return "windows-1258"; + case "x-mac-cyrillic": + case "x-mac-ukrainian": return "x-mac-cyrillic"; + case "chinese": + case "csgb2312": + case "csiso58gb231280": + case "gb2312": + case "gb_2312": + case "gb_2312-80": + case "gbk": + case "iso-ir-58": + case "x-gbk": return "GBK"; + case "gb18030": return "gb18030"; + case "big5": + case "big5-hkscs": + case "cn-big5": + case "csbig5": + case "x-x-big5": return "Big5"; + case "cseucpkdfmtjapanese": + case "euc-jp": + case "x-euc-jp": return "EUC-JP"; + case "csiso2022jp": + case "iso-2022-jp": return "ISO-2022-JP"; + case "csshiftjis": + case "ms932": + case "ms_kanji": + case "shift-jis": + case "shift_jis": + case "sjis": + case "windows-31j": + case "x-sjis": return "Shift_JIS"; + case "cseuckr": + case "csksc56011987": + case "euc-kr": + case "iso-ir-149": + case "korean": + case "ks_c_5601-1987": + case "ks_c_5601-1989": + case "ksc5601": + case "ksc_5601": + case "windows-949": return "EUC-KR"; + case "csiso2022kr": + case "hz-gb-2312": + case "iso-2022-cn": + case "iso-2022-cn-ext": + case "iso-2022-kr": + case "replacement": return "replacement"; + case "unicodefffe": + case "utf-16be": return "UTF-16BE"; + case "csunicode": + case "iso-10646-ucs-2": + case "ucs-2": + case "unicode": + case "unicodefeff": + case "utf-16": + case "utf-16le": return "UTF-16LE"; + case "x-user-defined": return "x-user-defined"; + default: return "failure"; + } + } + module.exports = { getEncoding }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fileapi/util.js +var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kState, kError, kResult, kAborted, kLastProgressEventFired } = require_symbols$2(); + const { ProgressEvent } = require_progressevent(); + const { getEncoding } = require_encoding(); + const { serializeAMimeType, parseMIMEType } = require_data_url(); + const { types: types$1 } = __require("node:util"); + const { StringDecoder } = __require("string_decoder"); + const { btoa } = __require("node:buffer"); + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + /** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ + function readOperation(fr, blob, type, encodingName) { + if (fr[kState] === "loading") throw new DOMException("Invalid state", "InvalidStateError"); + fr[kState] = "loading"; + fr[kResult] = null; + fr[kError] = null; + const reader = blob.stream().getReader(); + /** @type {Uint8Array[]} */ + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted]) try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted]) queueMicrotask(() => { + fireAProgressEvent("loadstart", fr); + }); + isFirstChunk = false; + if (!done && types$1.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState] = "done"; + try { + const result = packageData(bytes, type, blob.type, encodingName); + if (fr[kAborted]) return; + fr[kResult] = result; + fireAProgressEvent("load", fr); + } catch (error) { + fr[kError] = error; + fireAProgressEvent("error", fr); + } + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + } catch (error) { + if (fr[kAborted]) return; + queueMicrotask(() => { + fr[kState] = "done"; + fr[kError] = error; + fireAProgressEvent("error", fr); + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + })(); + } + /** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ + function fireAProgressEvent(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + /** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") dataURL += serializeAMimeType(parsed); + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); + dataURL += btoa(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) encoding = getEncoding(encodingName); + if (encoding === "failure" && mimeType) { + const type = parseMIMEType(mimeType); + if (type !== "failure") encoding = getEncoding(type.parameters.get("charset")); + } + if (encoding === "failure") encoding = "UTF-8"; + return decode(bytes, encoding); + } + case "ArrayBuffer": return combineByteSequences(bytes).buffer; + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; + } + } + } + /** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); + } + /** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) return "UTF-8"; + else if (a === 254 && b === 255) return "UTF-16BE"; + else if (a === 255 && b === 254) return "UTF-16LE"; + return null; + } + /** + * @param {Uint8Array[]} sequences + */ + function combineByteSequences(sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b) => { + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); + } + module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/fileapi/filereader.js +var require_filereader = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require_util$4(); + const { kState, kError, kResult, kEvents, kAborted } = require_symbols$2(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var FileReader = class FileReader extends EventTarget { + constructor() { + super(); + this[kState] = "empty"; + this[kResult] = null; + this[kError] = null; + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + }; + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsArrayBuffer"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsBinaryString"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsText"); + blob = webidl.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) encoding = webidl.converters.DOMString(encoding, "FileReader.readAsText", "encoding"); + readOperation(this, blob, "Text", encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsDataURL"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState] === "empty" || this[kState] === "done") { + this[kResult] = null; + return; + } + if (this[kState] === "loading") { + this[kState] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState] !== "loading") fireAProgressEvent("loadend", this); + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl.brandCheck(this, FileReader); + switch (this[kState]) { + case "empty": return this.EMPTY; + case "loading": return this.LOADING; + case "done": return this.DONE; + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result() { + webidl.brandCheck(this, FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl.brandCheck(this, FileReader); + return this[kError]; + } + get onloadend() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else this[kEvents].loadend = null; + } + get onerror() { + webidl.brandCheck(this, FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else this[kEvents].error = null; + } + get onloadstart() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else this[kEvents].loadstart = null; + } + get onprogress() { + webidl.brandCheck(this, FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else this[kEvents].progress = null; + } + get onload() { + webidl.brandCheck(this, FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else this[kEvents].load = null; + } + get onabort() { + webidl.brandCheck(this, FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else this[kEvents].abort = null; + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors + }); + module.exports = { FileReader }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cache/symbols.js +var require_symbols$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { kConstruct: require_symbols$4().kConstruct }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cache/util.js +var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$3 = __require("node:assert"); + const { URLSerializer } = require_data_url(); + const { isValidHeaderName } = require_util$6(); + /** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ + function urlEquals(A, B, excludeFragment = false) { + return URLSerializer(A, excludeFragment) === URLSerializer(B, excludeFragment); + } + /** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ + function getFieldValues(header) { + assert$3(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (isValidHeaderName(value)) values.push(value); + } + return values; + } + module.exports = { + urlEquals, + getFieldValues + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cache/cache.js +var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { urlEquals, getFieldValues } = require_util$3(); + const { kEnumerableProperty, isDisturbed } = require_util$7(); + const { webidl } = require_webidl(); + const { Response, cloneResponse, fromInnerResponse } = require_response(); + const { Request, fromInnerRequest } = require_request(); + const { kState } = require_symbols$3(); + const { fetching } = require_fetch(); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$6(); + const assert$2 = __require("node:assert"); + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + var Cache = class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) webidl.illegalConstructor(); + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) return; + return p[0]; + } + async matchAll(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + return this.#internalMatchAll(request, options); + } + async add(request) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + const requests = [request]; + return await this.addAll(requests); + } + async addAll(requests) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const responsePromises = []; + const requestList = []; + for (let request of requests) { + if (request === void 0) throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); + request = webidl.converters.RequestInfo(request); + if (typeof request === "string") continue; + const r = request[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + /** @type {ReturnType[]} */ + const fetchControllers = []; + for (const request of requests) { + const r = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const responses = await Promise.all(responsePromises); + const operations = []; + let index = 0; + for (const response of responses) { + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: requestList[index], + response + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async put(request, response) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (request instanceof Request) innerRequest = request[kState]; + else innerRequest = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); + const innerResponse = response[kState]; + if (innerResponse.status === 206) throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl.errors.exception({ + header: prefix, + message: "Got * vary field value" + }); + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader()).then(bodyReadPromise.resolve, bodyReadPromise.reject); + else bodyReadPromise.resolve(void 0); + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: innerRequest, + response: clonedResponse + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async delete(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + /** + * @type {Request} + */ + let r = null; + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return false; + } else { + assert$2(typeof request === "string"); + r = new Request(request)[kState]; + } + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ + async keys(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); + } + queueMicrotask(() => { + const requestList = []; + for (const request of requests) { + const requestObject = fromInnerRequest(request, new AbortController().signal, "immutable"); + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) return []; + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") return false; + if (request.headersList.get(fieldValue) !== requestQuery.headersList.get(fieldValue)) return false; + } + return true; + } + #internalMatchAll(request, options, maxResponses = Infinity) { + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const responses = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(response, "immutable"); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) break; + } + return Object.freeze(responseList); + } + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + const cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([...cacheQueryOptionConverters, { + key: "cacheName", + converter: webidl.converters.DOMString + }]); + webidl.converters.Response = webidl.interfaceConverter(Response); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.RequestInfo); + module.exports = { Cache }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { Cache } = require_cache(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var CacheStorage = class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName)); + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + async keys() { + webidl.brandCheck(this, CacheStorage); + return [...this.#caches.keys()]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module.exports = { CacheStorage }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cookies/constants.js +var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const maxAttributeValueSize = 1024; + const maxNameValuePairSize = 4096; + module.exports = { + maxAttributeValueSize, + maxNameValuePairSize + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cookies/util.js +var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; + } + return false; + } + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); + } + } + /** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ + function validateCookieValue(value) { + let len = value.length; + let i = 0; + if (value[0] === "\"") { + if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); + --len; + ++i; + } + while (i < len) { + const code = value.charCodeAt(i++); + if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); + } + } + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path) { + for (let i = 0; i < path.length; ++i) { + const code = path.charCodeAt(i); + if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); + } + } + /** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); + } + const IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + const IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); + /** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ + function toIMFDate(date) { + if (typeof date === "number") date = new Date(date); + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; + } + /** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) throw new Error("Invalid cookie max-age"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ + function stringify(cookie) { + if (cookie.name.length === 0) return null; + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); + for (const part of cookie.unparsed) { + if (!part.includes("=")) throw new Error("Invalid unparsed"); + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cookies/parse.js +var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$1(); + const { isCTLExcludingHtab } = require_util$2(); + const { collectASequenceOfCodePointsFast } = require_data_url(); + const assert$1 = __require("node:assert"); + /** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) return null; + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast("=", nameValuePair, position); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) return null; + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + /** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) return cookieAttributeList; + assert$1(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); + attributeValue = cookieAv.slice(position.position + 1); + } else attributeName = cookieAv; + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") cookieAttributeList.expires = new Date(attributeValue); + else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + cookieAttributeList.maxAge = Number(attributeValue); + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module.exports = { + parseSetCookie, + parseUnparsedAttributes + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/cookies/index.js +var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { parseSetCookie } = require_parse(); + const { stringify } = require_util$2(); + const { webidl } = require_webidl(); + const { Headers } = require_headers(); + /** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + /** + * @param {Headers} headers + * @returns {Record} + */ + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) return out; + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + /** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ + function deleteCookie(headers, name, attributes) { + webidl.brandCheck(headers, Headers, { strict: false }); + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.DOMString(name, prefix, "name"); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); + } + /** + * @param {Headers} headers + * @returns {Cookie[]} + */ + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookies = headers.getSetCookie(); + if (!cookies) return []; + return cookies.map((pair) => parseSetCookie(pair)); + } + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + webidl.brandCheck(headers, Headers, { strict: false }); + cookie = webidl.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) headers.append("Set-Cookie", str); + } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([{ + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") return webidl.converters["unsigned long long"](value); + return new Date(value); + }), + key: "expires", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: () => null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: [ + "Strict", + "Lax", + "None" + ] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: () => new Array(0) + } + ]); + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/events.js +var require_events = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + const { kConstruct } = require_symbols$4(); + const { MessagePort } = __require("node:worker_threads"); + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + var MessageEvent = class MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get data() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + }; + const { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + var CloseEvent = class CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get wasClean() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent = class ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.MessagePort); + const eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: () => null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "source", + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: () => null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + defaultValue: () => new Array(0) + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: () => 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + const states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }; + const sentCloseFrameState = { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2 + }; + const opcodes = { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }; + const maxUnsigned16Bit = 2 ** 16 - 1; + const parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }; + const emptyBuffer = Buffer.allocUnsafe(0); + const sendHints = { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + }; + module.exports = { + uid, + sentCloseFrameState, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer, + sendHints + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/symbols.js +var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kWebSocketURL: Symbol("url"), + kReadyState: Symbol("ready state"), + kController: Symbol("controller"), + kResponse: Symbol("response"), + kBinaryType: Symbol("binary type"), + kSentClose: Symbol("sent close"), + kReceivedClose: Symbol("received close"), + kByteParser: Symbol("byte parser") + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/util.js +var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols(); + const { states, opcodes } = require_constants(); + const { ErrorEvent, createFastMessageEvent } = require_events(); + const { isUtf8 } = __require("node:buffer"); + const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isConnecting(ws) { + return ws[kReadyState] === states.CONNECTING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isEstablished(ws) { + return ws[kReadyState] === states.OPEN; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosing(ws) { + return ws[kReadyState] === states.CLOSING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; + } + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { + const event = eventFactory(e, eventInitDict); + target.dispatchEvent(event); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ + function websocketMessageReceived(ws, type, data) { + if (ws[kReadyState] !== states.OPEN) return; + let dataForEvent; + if (type === opcodes.TEXT) try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); + return; + } + else if (type === opcodes.BINARY) if (ws[kBinaryType] === "blob") dataForEvent = new Blob([data]); + else dataForEvent = toArrayBuffer(data); + fireEvent("message", ws, createFastMessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }); + } + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol(protocol) { + if (protocol.length === 0) return false; + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; + } + return true; + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; + return code >= 3e3 && code <= 4999; + } + /** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ + function failWebsocketConnection(ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ + function isControlFrame(opcode) { + return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG; + } + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + function isValidOpcode(opcode) { + return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode); + } + /** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const [name, value = ""] = collectASequenceOfCodePointsFast(";", extensions, position).split("="); + extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); + position.position++; + } + return extensionList; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ + function isValidClientWindowBits(value) { + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + if (byte < 48 || byte > 57) return false; + } + return true; + } + const hasIntl = typeof process.versions.icu === "string"; + const fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0; + /** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ + const utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) { + if (isUtf8(buffer)) return buffer.toString("utf-8"); + throw new TypeError("Invalid utf-8 received."); + }; + module.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/frame.js +var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxUnsigned16Bit } = require_constants(); + const BUFFER_SIZE = 16386; + /** @type {import('crypto')} */ + let crypto; + let buffer = null; + let bufIdx = BUFFER_SIZE; + try { + crypto = __require("node:crypto"); + } catch { + crypto = { randomFillSync: function randomFillSync(buffer, _offset, _size) { + for (let i = 0; i < buffer.length; ++i) buffer[i] = Math.random() * 255 | 0; + return buffer; + } }; + } + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + } + return [ + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++] + ]; + } + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + /** @type {number} */ + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 128; + for (let i = 0; i < bodyLength; ++i) buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + return buffer; + } + }; + module.exports = { WebsocketFrameSend }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/connection.js +var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants(); + const { kReadyState, kSentClose, kByteParser, kReceivedClose, kResponse } = require_symbols(); + const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util$1(); + const { channels } = require_diagnostics(); + const { CloseEvent } = require_events(); + const { makeRequest } = require_request(); + const { fetching } = require_fetch(); + const { Headers, getHeadersList } = require_headers(); + const { getDecodeSplit } = require_util$6(); + const { WebsocketFrameSend } = require_frame(); + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + } catch {} + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) request.headersList = getHeadersList(new Headers(options.headers)); + const keyValue = crypto.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue); + request.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) request.headersList.append("sec-websocket-protocol", protocol); + request.headersList.append("sec-websocket-extensions", "permessage-deflate; client_max_window_bits"); + return fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(ws, "Server did not set Upgrade header to \"websocket\"."); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(ws, "Server did not set Connection header to \"upgrade\"."); + return; + } + if (response.headersList.get("Sec-WebSocket-Accept") !== crypto.createHash("sha1").update(keyValue + uid).digest("base64")) { + failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + let extensions; + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection(ws, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + if (!getDecodeSplit("sec-websocket-protocol", request.headersList).includes(secProtocol)) { + failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels.open.hasSubscribers) channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response, extensions); + } + }); + } + function closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if (isClosing(ws) || isClosed(ws)) {} else if (!isEstablished(ws)) { + failWebsocketConnection(ws, "Connection was closed before it was established."); + ws[kReadyState] = states.CLOSING; + } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { + ws[kSentClose] = sentCloseFrameState.PROCESSING; + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else frame.frameData = emptyBuffer; + ws[kResponse].socket.write(frame.createFrame(opcodes.CLOSE)); + ws[kSentClose] = sentCloseFrameState.SENT; + ws[kReadyState] = states.CLOSING; + } else ws[kReadyState] = states.CLOSING; + } + /** + * @param {Buffer} chunk + */ + function onSocketData(chunk) { + if (!this.ws[kByteParser].write(chunk)) this.pause(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + function onSocketClose() { + const { ws } = this; + const { [kResponse]: response } = ws; + response.socket.off("data", onSocketData); + response.socket.off("close", onSocketClose); + response.socket.off("error", onSocketError); + const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser].closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kReceivedClose]) code = 1006; + ws[kReadyState] = states.CLOSED; + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) channels.close.publish({ + websocket: ws, + code, + reason + }); + } + function onSocketError(error) { + const { ws } = this; + ws[kReadyState] = states.CLOSING; + if (channels.socketError.hasSubscribers) channels.socketError.publish(error); + this.destroy(); + } + module.exports = { + establishWebSocketConnection, + closeWebSocketConnection + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); + const { isValidClientWindowBits } = require_util$1(); + const tail = Buffer.from([ + 0, + 0, + 255, + 255 + ]); + const kBuffer = Symbol("kBuffer"); + const kLength = Symbol("kLength"); + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + constructor(extensions) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + } + decompress(chunk, fin, callback) { + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(/* @__PURE__ */ new Error("Invalid server_max_window_bits")); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + this.#inflate = createInflateRaw({ windowBits }); + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + this.#inflate.on("data", (data) => { + this.#inflate[kBuffer].push(data); + this.#inflate[kLength] += data.length; + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) this.#inflate.write(tail); + this.#inflate.flush(() => { + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + callback(null, full); + }); + } + }; + module.exports = { PerMessageDeflate }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Writable } = __require("node:stream"); + const assert = __require("node:assert"); + const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants(); + const { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols(); + const { channels } = require_diagnostics(); + const { isValidStatusCode, isValidOpcode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require_util$1(); + const { WebsocketFrameSend } = require_frame(); + const { closeWebSocketConnection } = require_connection(); + const { PerMessageDeflate } = require_permessage_deflate(); + var ByteParser = class extends Writable { + #buffers = []; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + constructor(ws, extensions) { + super(); + this.ws = ws; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions)); + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.ws, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.ws, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.ws, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.ws, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.ws, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.ws, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.ws, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); + return; + } + const lower = buffer.readUInt32BE(4); + this.#info.payloadLength = (upper << 8) + lower; + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else if (!this.#info.compressed) { + this.#fragments.push(body); + if (!this.#info.fragmented && this.#info.fin) { + const fullMessage = Buffer.concat(this.#fragments); + websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage); + this.#fragments.length = 0; + } + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + closeWebSocketConnection(this.ws, 1007, error.message, error.message.length); + return; + } + this.#fragments.push(data); + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments)); + this.#loop = true; + this.#state = parserStates.INFO; + this.#fragments.length = 0; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); + else if (n === 0) return emptyBuffer; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while (offset !== n) { + const next = this.#buffers[0]; + const { length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; + } + parseCloseBody(data) { + assert(data.length !== 1); + /** @type {number|undefined} */ + let code; + if (data.length >= 2) code = data.readUInt16BE(0); + if (code !== void 0 && !isValidStatusCode(code)) return { + code: 1002, + reason: "Invalid status code", + error: true + }; + /** @type {Buffer} */ + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); + try { + reason = utf8Decode(reason); + } catch { + return { + code: 1007, + reason: "Invalid UTF-8", + error: true + }; + } + return { + code, + reason, + error: false + }; + } + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + closeWebSocketConnection(this.ws, code, reason, reason.length); + failWebsocketConnection(this.ws, reason); + return false; + } + if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + let body = emptyBuffer; + if (this.#info.closeInfo.code) { + body = Buffer.allocUnsafe(2); + body.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(closeFrame.createFrame(opcodes.CLOSE), (err) => { + if (!err) this.ws[kSentClose] = sentCloseFrameState.SENT; + }); + } + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + return false; + } else if (opcode === opcodes.PING) { + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); + if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); + } + } else if (opcode === opcodes.PONG) { + if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module.exports = { ByteParser }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/sender.js +var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { WebsocketFrameSend } = require_frame(); + const { opcodes, sendHints } = require_constants(); + const FixedQueue = require_fixed_queue(); + /** @type {typeof Uint8Array} */ + const FastBuffer = Buffer[Symbol.species]; + /** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ + var SendQueue = class { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + /** + * @type {boolean} + */ + #running = false; + /** @type {import('node:net').Socket} */ + #socket; + constructor(socket) { + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== sendHints.blob) { + const frame = createFrame(item, hint); + if (!this.#running) this.#socket.write(frame, cb); + else { + /** @type {SendQueueNode} */ + const node = { + promise: null, + callback: cb, + frame + }; + this.#queue.push(node); + } + return; + } + /** @type {SendQueueNode} */ + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) this.#run(); + } + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + if (node.promise !== null) await node.promise; + this.#socket.write(node.frame, node.callback); + node.callback = node.frame = null; + } + this.#running = false; + } + }; + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.string: return Buffer.from(data); + case sendHints.arrayBuffer: + case sendHints.blob: return new FastBuffer(data); + case sendHints.typedArray: return new FastBuffer(data.buffer, data.byteOffset, data.byteLength); + } + } + module.exports = { SendQueue }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { environmentSettingsObject } = require_util$6(); + const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require_constants(); + const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); + const { isConnecting, isEstablished, isClosing, isValidSubprotocol, fireEvent } = require_util$1(); + const { establishWebSocketConnection, closeWebSocketConnection } = require_connection(); + const { ByteParser } = require_receiver(); + const { kEnumerableProperty, isBlobLike } = require_util$7(); + const { getGlobalDispatcher } = require_global(); + const { types } = __require("node:util"); + const { ErrorEvent, CloseEvent } = require_events(); + const { SendQueue } = require_sender(); + var WebSocket = class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url = webidl.converters.USVString(url, prefix, "url"); + protocols = options.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); + if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException("Got fragment", "SyntaxError"); + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + this[kWebSocketURL] = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this[kController] = establishWebSocketConnection(urlRecord, protocols, client, this, (response, extensions) => this.#onConnectionEstablished(response, extensions), options); + this[kReadyState] = WebSocket.CONNECTING; + this[kSentClose] = sentCloseFrameState.NOT_SENT; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.close"; + if (code !== void 0) code = webidl.converters["unsigned short"](code, prefix, "code", { clamp: true }); + if (reason !== void 0) reason = webidl.converters.USVString(reason, prefix, "reason"); + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + } + closeWebSocketConnection(this, code, reason, reasonByteLength); + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + if (isConnecting(this)) throw new DOMException("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this) || isClosing(this)) return; + if (typeof data === "string") { + const length = Buffer.byteLength(data); + this.#bufferedAmount += length; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= length; + }, sendHints.string); + } else if (types.isArrayBuffer(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.typedArray); + } else if (isBlobLike(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onerror() { + webidl.brandCheck(this, WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + get onclose() { + webidl.brandCheck(this, WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.close) this.removeEventListener("close", this.#events.close); + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else this.#events.close = null; + } + get onmessage() { + webidl.brandCheck(this, WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get binaryType() { + webidl.brandCheck(this, WebSocket); + return this[kBinaryType]; + } + set binaryType(type) { + webidl.brandCheck(this, WebSocket); + if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; + else this[kBinaryType] = type; + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this[kResponse] = response; + const parser = new ByteParser(this, parsedExtensions); + parser.on("drain", onParserDrain); + parser.on("error", onParserError.bind(this)); + response.socket.ws = this; + this[kByteParser] = parser; + this.#sendQueue = new SendQueue(response.socket); + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) this.#extensions = extensions; + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) this.#protocol = protocol; + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); + webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); + return webidl.converters.DOMString(V, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0) + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) return webidl.converters.BufferSource(V); + } + return webidl.converters.USVString(V); + }; + function onParserDrain() { + this.ws[kResponse].socket.resume(); + } + function onParserError(err) { + let message; + let code; + if (err instanceof CloseEvent) { + message = err.reason; + code = err.code; + } else message = err.message; + fireEvent("error", this, () => new ErrorEvent("error", { + error: err, + message + })); + closeWebSocketConnection(this, code); + } + module.exports = { WebSocket }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/eventsource/util.js +var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * Checks if the given value is a valid LastEventId. + * @param {string} value + * @returns {boolean} + */ + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + /** + * Checks if the given value is a base 10 digit. + * @param {string} value + * @returns {boolean} + */ + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; + return true; + } + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms).unref(); + }); + } + module.exports = { + isValidLastEventId, + isASCIINumber, + delay + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform } = __require("node:stream"); + const { isASCIINumber, isValidLastEventId } = require_util(); + /** + * @type {number[]} BOM + */ + const BOM = [ + 239, + 187, + 191 + ]; + /** + * @type {10} LF + */ + const LF = 10; + /** + * @type {13} CR + */ + const CR = 13; + /** + * @type {58} COLON + */ + const COLON = 58; + /** + * @type {32} SPACE + */ + const SPACE = 32; + /** + * @typedef {object} EventSourceStreamEvent + * @type {object} + * @property {string} [event] The event type. + * @property {string} [data] The data of the message. + * @property {string} [id] A unique ID for the event. + * @property {string} [retry] The reconnection time, in milliseconds. + */ + /** + * @typedef eventSourceSettings + * @type {object} + * @property {string} lastEventId The last event ID received from the server. + * @property {string} origin The origin of the event source. + * @property {number} reconnectionTime The reconnection time, in milliseconds. + */ + var EventSourceStream = class extends Transform { + /** + * @type {eventSourceSettings} + */ + state = null; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {eventSourceSettings} options.eventSourceSettings + * @param {Function} [options.push] + */ + constructor(options = {}) { + options.readableObjectMode = true; + super(options); + this.state = options.eventSourceSettings || {}; + if (options.push) this.push = options.push; + } + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); + else this.buffer = chunk; + if (this.checkBOM) switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { + callback(); + return; + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); + this.checkBOM = false; + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); + this.checkBOM = false; + break; + } + while (this.pos < this.buffer.length) { + if (this.eventEndCheck) { + if (this.crlfCheck) { + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + continue; + } + this.crlfCheck = false; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) this.processEvent(this.event); + this.clearEvent(); + continue; + } + this.eventEndCheck = false; + continue; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.eventEndCheck = true; + continue; + } + this.pos++; + } + callback(); + } + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) return; + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) return; + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) ++valueStart; + value = line.subarray(valueStart).toString("utf8"); + } else { + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) event[field] = value; + else event[field] += `\n${value}`; + break; + case "retry": + if (isASCIINumber(value)) event[field] = value; + break; + case "id": + if (isValidLastEventId(value)) event[field] = value; + break; + case "event": + if (value.length > 0) event[field] = value; + break; + } + } + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); + if (event.id && isValidLastEventId(event.id)) this.state.lastEventId = event.id; + if (event.data !== void 0) this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); + } + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + } + }; + module.exports = { EventSourceStream }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { pipeline } = __require("node:stream"); + const { fetching } = require_fetch(); + const { makeRequest } = require_request(); + const { webidl } = require_webidl(); + const { EventSourceStream } = require_eventsource_stream(); + const { parseMIMEType } = require_data_url(); + const { createFastMessageEvent } = require_events(); + const { isNetworkError } = require_response(); + const { delay } = require_util(); + const { kEnumerableProperty } = require_util$7(); + const { environmentSettingsObject } = require_util$6(); + let experimentalWarned = false; + /** + * A reconnection time, in milliseconds. This must initially be an implementation-defined value, + * probably in the region of a few seconds. + * + * In Comparison: + * - Chrome uses 3000ms. + * - Deno uses 5000ms. + * + * @type {3000} + */ + const defaultReconnectionTime = 3e3; + /** + * The readyState attribute represents the state of the connection. + * @enum + * @readonly + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev + */ + /** + * The connection has not yet been established, or it was closed and the user + * agent is reconnecting. + * @type {0} + */ + const CONNECTING = 0; + /** + * The user agent has an open connection and is dispatching events as it + * receives them. + * @type {1} + */ + const OPEN = 1; + /** + * The connection is not open, and the user agent is not trying to reconnect. + * @type {2} + */ + const CLOSED = 2; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". + * @type {'anonymous'} + */ + const ANONYMOUS = "anonymous"; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". + * @type {'use-credentials'} + */ + const USE_CREDENTIALS = "use-credentials"; + /** + * The EventSource interface is used to receive server-sent events. It + * connects to a server over HTTP and receives events in text/event-stream + * format without closing the connection. + * @extends {EventTarget} + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events + * @api public + */ + var EventSource = class EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url = null; + #withCredentials = false; + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { code: "UNDICI-ES" }); + } + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + const initRequest = { + redirect: "follow", + keepalive: true, + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { + name: "accept", + value: "text/event-stream" + }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); + } + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; + } + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (isNetworkError(response)) { + this.dispatchEvent(new Event("error")); + this.close(); + } + this.#reconnect(); + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError(response)) if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent(event.type, event.options)); + } + }); + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + }); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + this.#connect(); + } + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + get onopen() { + return this.#events.open; + } + set onopen(fn) { + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onmessage() { + return this.#events.message; + } + set onmessage(fn) { + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + }; + const constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } + }; + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty + }); + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([{ + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, { + key: "dispatcher", + converter: webidl.converters.any + }]); + module.exports = { + EventSource, + defaultReconnectionTime + }; +})); + +//#endregion +//#region node_modules/.deno/undici@6.23.0/node_modules/undici/index.js +var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Client = require_client(); + const Dispatcher = require_dispatcher(); + const Pool = require_pool(); + const BalancedPool = require_balanced_pool(); + const Agent = require_agent(); + const ProxyAgent = require_proxy_agent(); + const EnvHttpProxyAgent = require_env_http_proxy_agent(); + const RetryAgent = require_retry_agent(); + const errors = require_errors(); + const util = require_util$7(); + const { InvalidArgumentError } = errors; + const api = require_api(); + const buildConnector = require_connect(); + const MockClient = require_mock_client(); + const MockAgent = require_mock_agent(); + const MockPool = require_mock_pool(); + const mockErrors = require_mock_errors(); + const RetryHandler = require_retry_handler(); + const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); + const DecoratorHandler = require_decorator_handler(); + const RedirectHandler = require_redirect_handler(); + const createRedirectInterceptor = require_redirect_interceptor(); + Object.assign(Dispatcher.prototype, api); + module.exports.Dispatcher = Dispatcher; + module.exports.Client = Client; + module.exports.Pool = Pool; + module.exports.BalancedPool = BalancedPool; + module.exports.Agent = Agent; + module.exports.ProxyAgent = ProxyAgent; + module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module.exports.RetryAgent = RetryAgent; + module.exports.RetryHandler = RetryHandler; + module.exports.DecoratorHandler = DecoratorHandler; + module.exports.RedirectHandler = RedirectHandler; + module.exports.createRedirectInterceptor = createRedirectInterceptor; + module.exports.interceptors = { + redirect: require_redirect(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns() + }; + module.exports.buildConnector = buildConnector; + module.exports.errors = errors; + module.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (opts && opts.path != null) { + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); + let path = opts.path; + if (!opts.path.startsWith("/")) path = `/${path}`; + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) opts = typeof url === "object" ? url : {}; + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module.exports.setGlobalDispatcher = setGlobalDispatcher; + module.exports.getGlobalDispatcher = getGlobalDispatcher; + const fetchImpl = require_fetch().fetch; + module.exports.fetch = async function fetch(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") Error.captureStackTrace(err); + throw err; + } + }; + module.exports.Headers = require_headers().Headers; + module.exports.Response = require_response().Response; + module.exports.Request = require_request().Request; + module.exports.FormData = require_formdata().FormData; + module.exports.File = globalThis.File ?? __require("node:buffer").File; + module.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin, getGlobalOrigin } = require_global$1(); + module.exports.setGlobalOrigin = setGlobalOrigin; + module.exports.getGlobalOrigin = getGlobalOrigin; + const { CacheStorage } = require_cachestorage(); + const { kConstruct } = require_symbols$1(); + module.exports.caches = new CacheStorage(kConstruct); + const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); + module.exports.deleteCookie = deleteCookie; + module.exports.getCookies = getCookies; + module.exports.getSetCookies = getSetCookies; + module.exports.setCookie = setCookie; + const { parseMIMEType, serializeAMimeType } = require_data_url(); + module.exports.parseMIMEType = parseMIMEType; + module.exports.serializeAMimeType = serializeAMimeType; + const { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + module.exports.WebSocket = require_websocket().WebSocket; + module.exports.CloseEvent = CloseEvent; + module.exports.ErrorEvent = ErrorEvent; + module.exports.MessageEvent = MessageEvent; + module.exports.request = makeDispatcher(api.request); + module.exports.stream = makeDispatcher(api.stream); + module.exports.pipeline = makeDispatcher(api.pipeline); + module.exports.connect = makeDispatcher(api.connect); + module.exports.upgrade = makeDispatcher(api.upgrade); + module.exports.MockClient = MockClient; + module.exports.MockPool = MockPool; + module.exports.MockAgent = MockAgent; + module.exports.mockErrors = mockErrors; + const { EventSource } = require_eventsource(); + module.exports.EventSource = EventSource; +})); + +//#endregion +//#region node_modules/.deno/@actions+http-client@3.0.2/node_modules/@actions/http-client/lib/index.js +var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpClient = exports.HttpClientResponse = exports.HttpClientError = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; + exports.getProxyUrl = getProxyUrl; + exports.isHttps = isHttps; + const http = __importStar(__require("http")); + const https = __importStar(__require("https")); + const pm = __importStar(require_proxy()); + const tunnel = __importStar(require_tunnel()); + const undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; + })(Headers || (exports.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports.MediaTypes = MediaTypes = {})); + /** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + const RetryableHttpVerbs = [ + "OPTIONS", + "GET", + "DELETE", + "HEAD" + ]; + const ExponentialBackoffCeiling = 10; + const ExponentialBackoffTimeSlice = 5; + var HttpClientError = class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } + }; + exports.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + 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("end", () => { + resolve(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + 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("end", () => { + resolve(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + return new URL(requestUrl).protocol === "https:"; + } + var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) this._ignoreSslError = requestOptions.ignoreSslError; + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) this._allowRedirects = requestOptions.allowRedirects; + if (requestOptions.allowRedirectDowngrade != null) this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + if (requestOptions.maxRedirects != null) this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + if (requestOptions.keepAlive != null) this._keepAlive = requestOptions.keepAlive; + if (requestOptions.allowRetries != null) this._allowRetries = requestOptions.allowRetries; + if (requestOptions.maxRetries != null) this._maxRetries = requestOptions.maxRetries; + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) throw new Error("Client has already been disposed."); + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + if (authenticationHandler) return authenticationHandler.handleAuthentication(this, info, data); + else return response; + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) break; + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) if (header.toLowerCase() === "authorization") delete headers[header]; + } + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) return response; + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) this._agent.destroy(); + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) reject(err); + else if (!res) reject(/* @__PURE__ */ new Error("Unknown error")); + else resolve(res); + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === "string") { + if (!info.options.headers) info.options.headers = {}; + info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + handleResult(void 0, new HttpClientResponse(msg)); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) socket.end(); + handleResult(/* @__PURE__ */ new Error(`Request timeout: ${info.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") req.write(data, "utf8"); + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else req.end(); + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + if (!(proxyUrl && proxyUrl.hostname)) return; + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === "https:"; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; + info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) info.options.headers["user-agent"] = this.userAgent; + info.options.agent = this._getAgent(info.parsedUrl); + if (this.handlers) for (const handler of this.handlers) handler.prepareRequest(info.options); + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + return lowercaseKeys(headers || {}); + } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + if (clientHeader !== void 0) return clientHeader; + return _default; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) if (typeof headerValue === "number") clientHeader = String(headerValue); + else if (Array.isArray(headerValue)) clientHeader = headerValue.join(", "); + else clientHeader = headerValue; + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) if (typeof additionalValue === "number") return String(additionalValue); + else if (Array.isArray(additionalValue)) return additionalValue.join(", "); + else return additionalValue; + if (clientHeader !== void 0) return clientHeader; + return _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) agent = this._proxyAgent; + if (!useProxy) agent = this._agent; + if (agent) return agent; + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { + host: proxyUrl.hostname, + port: proxyUrl.port + }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + else tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { + keepAlive: this._keepAlive, + maxSockets + }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) proxyAgent = this._proxyAgentDispatcher; + if (proxyAgent) return proxyAgent; + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ + uri: proxyUrl.href, + pipelining: !this._keepAlive ? 0 : 1 + }, (proxyUrl.username || proxyUrl.password) && { token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { rejectUnauthorized: false }); + return proxyAgent; + } + _getUserAgentWithOrchestrationId(userAgent) { + const baseUserAgent = userAgent || "actions/http-client"; + const orchId = process.env["ACTIONS_ORCHESTRATION_ID"]; + if (orchId) return `${baseUserAgent} actions_orchestration_id/${orchId.replace(/[^a-z0-9_.-]/gi, "_")}`; + return baseUserAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) resolve(response); + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) return a; + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) obj = JSON.parse(contents, dateTimeDeserializer); + else obj = JSON.parse(contents); + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) {} + if (statusCode > 299) { + let msg; + if (obj && obj.message) msg = obj.message; + else if (contents && contents.length > 0) msg = contents; + else msg = `Failed request: (${statusCode})`; + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else resolve(response); + })); + }); + } + }; + exports.HttpClient = HttpClient; + const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); +})); + +//#endregion +//#region node_modules/.deno/@actions+http-client@3.0.2/node_modules/@actions/http-client/lib/auth.js +var require_auth = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) throw Error("The request has no headers"); + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + prepareRequest(options) { + if (!options.headers) throw Error("The request has no headers"); + options.headers["Authorization"] = `Bearer ${this.token}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + prepareRequest(options) { + if (!options.headers) throw Error("The request has no headers"); + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +})); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.OidcClient = void 0; + const http_client_1 = require_lib(); + const auth_1 = require_auth(); + const core_1 = require_core(); + var OidcClient = class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + return runtimeUrl; + } + static getCall(id_token_url) { + return __awaiter(this, void 0, void 0, function* () { + var _a; + const id_token = (_a = (yield OidcClient.createHttpClient().getJson(id_token_url).catch((error) => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.message}`); + })).result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) throw new Error("Response json body do not have ID Token field"); + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) id_token_url = `${id_token_url}&audience=${encodeURIComponent(audience)}`; + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } + }; + exports.OidcClient = OidcClient; +})); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/summary.js +var require_summary = /* @__PURE__ */ __commonJSMin(((exports) => { + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; + const os_1$1 = __require("os"); + const fs_1 = __require("fs"); + const { access, appendFile, writeFile } = fs_1.promises; + exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) return this._filePath; + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) return `<${tag}${htmlAttrs}>`; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + yield (overwrite ? writeFile : appendFile)(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1$1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") return this.wrap("td", cell); + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ + src, + alt + }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + const _summary = new Summary(); + /** + * @deprecated use `core.summary` + */ + exports.markdownSummary = _summary; + exports.summary = _summary; +})); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/path-utils.js +var require_path_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toPosixPath = toPosixPath; + exports.toWin32Path = toWin32Path; + exports.toPlatformPath = toPlatformPath; + const path$4 = __importStar(__require("path")); + /** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + /** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + /** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path$4.sep); + } +})); + +//#endregion +//#region node_modules/.deno/@actions+io@2.0.0/node_modules/@actions/io/lib/io-util.js +var require_io_util = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; + exports.readlink = readlink; + exports.exists = exists; + exports.isDirectory = isDirectory; + exports.isRooted = isRooted; + exports.tryGetExecutablePath = tryGetExecutablePath; + exports.getCmdPath = getCmdPath; + const fs = __importStar(__require("fs")); + const path$3 = __importStar(__require("path")); + _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; + exports.IS_WINDOWS = process.platform === "win32"; + /** + * Custom implementation of readlink to ensure Windows junctions + * maintain trailing backslash for backward compatibility with Node.js < 24 + * + * In Node.js 20, Windows junctions (directory symlinks) always returned paths + * with trailing backslashes. Node.js 24 removed this behavior, which breaks + * code that relied on this format for path operations. + * + * This implementation restores the Node 20 behavior by adding a trailing + * backslash to all junction results on Windows. + */ + function readlink(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + const result = yield fs.promises.readlink(fsPath); + if (exports.IS_WINDOWS && !result.endsWith("\\")) return `${result}\\`; + return result; + }); + } + exports.UV_FS_O_EXLOCK = 268435456; + exports.READONLY = fs.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + try { + yield (0, exports.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") return false; + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { + return (useStat ? yield (0, exports.stat)(fsPath) : yield (0, exports.lstat)(fsPath)).isDirectory(); + }); + } + /** + * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: + * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). + */ + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); + if (exports.IS_WINDOWS) return p.startsWith("\\") || /^[A-Z]:/i.test(p); + return p.startsWith("/"); + } + /** + * Best effort attempt to determine whether a file exists and is executable. + * @param filePath file path to check + * @param extensions additional file extensions to try + * @return if file exists and is executable, returns the file path. otherwise empty string. + */ + function tryGetExecutablePath(filePath, extensions) { + return __awaiter(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + const upperExt = path$3.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + try { + const directory = path$3.dirname(filePath); + const upperName = path$3.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports.readdir)(directory)) if (upperName === actualName.toUpperCase()) { + filePath = path$3.join(directory, actualName); + break; + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a; + return (_a = process.env["COMSPEC"]) !== null && _a !== void 0 ? _a : `cmd.exe`; + } +})); + +//#endregion +//#region node_modules/.deno/@actions+io@2.0.0/node_modules/@actions/io/lib/io.js +var require_io = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.cp = cp; + exports.mv = mv; + exports.rmRF = rmRF; + exports.mkdirP = mkdirP; + exports.which = which; + exports.findInPath = findInPath; + const assert_1 = __require("assert"); + const path$2 = __importStar(__require("path")); + const ioUtil = __importStar(require_io_util()); + /** + * Copies a file or folder. + * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js + * + * @param source source path + * @param dest destination path + * @param options optional. See CopyOptions. + */ + function cp(source_1, dest_1) { + return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) return; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path$2.join(dest, path$2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) throw new Error(`no such file or directory: ${source}`); + if ((yield ioUtil.stat(source)).isDirectory()) if (!recursive) throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + else yield cpDirRecursive(source, newDest, 0, force); + else { + if (path$2.relative(source, newDest) === "") throw new Error(`'${newDest}' and '${source}' are the same file`); + yield copyFile(source, newDest, force); + } + }); + } + /** + * Moves a path. + * + * @param source source path + * @param dest destination path + * @param options optional. See MoveOptions. + */ + function mv(source_1, dest_1) { + return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path$2.join(dest, path$2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) if (options.force == null || options.force) yield rmRF(dest); + else throw new Error("Destination already exists"); + } + yield mkdirP(path$2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + /** + * Remove a path recursively with force + * + * @param inputPath path to remove + */ + function rmRF(inputPath) { + return __awaiter(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) throw new Error("File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows"); + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + /** + * Make a directory. Creates the full path with folders in between + * Will throw if it fails + * + * @param fsPath path to create + * @returns Promise + */ + function mkdirP(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + /** + * Returns path of a tool had the tool actually been invoked. Resolves via paths. + * If you check and the tool does not exist, it will throw. + * + * @param tool name of the tool + * @param check whether to check if tool exists + * @returns Promise path to tool + */ + function which(tool, check) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + if (check) { + const result = yield which(tool, false); + if (!result) if (ioUtil.IS_WINDOWS) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) return matches[0]; + return ""; + }); + } + /** + * Returns a list of all occurrences of the given tool on the system path. + * + * @returns Promise the paths of the tool + */ + function findInPath(tool) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path$2.delimiter)) if (extension) extensions.push(extension); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) return [filePath]; + return []; + } + if (tool.includes(path$2.sep)) return []; + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path$2.delimiter)) if (p) directories.push(p); + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path$2.join(directory, tool), extensions); + if (filePath) matches.push(filePath); + } + return matches; + }); + } + function readCopyOptions(options) { + return { + force: options.force == null ? true : options.force, + recursive: Boolean(options.recursive), + copySourceDirectory: options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory) + }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter(this, void 0, void 0, function* () { + if (currentDepth >= 255) return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + if ((yield ioUtil.lstat(srcFile)).isDirectory()) yield cpDirRecursive(srcFile, destFile, currentDepth, force); + else yield copyFile(srcFile, destFile, force); + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) yield ioUtil.copyFile(srcFile, destFile); + }); + } +})); + +//#endregion +//#region node_modules/.deno/@actions+exec@2.0.0/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ToolRunner = void 0; + exports.argStringToArray = argStringToArray; + const os$1 = __importStar(__require("os")); + const events = __importStar(__require("events")); + const child = __importStar(__require("child_process")); + const path$1 = __importStar(__require("path")); + const io = __importStar(require_io()); + const ioUtil = __importStar(require_io_util()); + const timers_1 = __require("timers"); + const IS_WINDOWS = process.platform === "win32"; + var ToolRunner = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) throw new Error("Parameter 'toolPath' cannot be null or empty."); + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) this.options.listeners.debug(message); + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) cmd += ` ${a}`; + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) cmd += ` ${a}`; + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + else { + cmd += toolPath; + for (const a of args) cmd += ` ${a}`; + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os$1.EOL); + while (n > -1) { + onLine(s.substring(0, n)); + s = s.substring(n + os$1.EOL.length); + n = s.indexOf(os$1.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) return process.env["COMSPEC"] || "cmd.exe"; + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += "\""; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) return this._uvQuoteCmdArg(arg); + if (!arg) return "\"\""; + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + "\"" + ]; + let needsQuotes = false; + for (const char of arg) if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + if (!needsQuotes) return arg; + let reverse = "\""; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") reverse += "\\"; + else if (arg[i - 1] === "\"") { + quoteHit = true; + reverse += "\""; + } else quoteHit = false; + } + reverse += "\""; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) return "\"\""; + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes("\"")) return arg; + if (!arg.includes("\"") && !arg.includes("\\")) return `"${arg}"`; + let reverse = "\""; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") reverse += "\\"; + else if (arg[i - 1] === "\"") { + quoteHit = true; + reverse += "\\"; + } else quoteHit = false; + } + reverse += "\""; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) result.argv0 = `"${toolPath}"`; + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) this.toolPath = path$1.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) this._debug(` ${arg}`); + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os$1.EOL); + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) return reject(/* @__PURE__ */ new Error(`The cwd: ${this.options.cwd} does not exist!`)); + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) this.options.listeners.stdout(data); + if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(data); + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) this.options.listeners.stdline(line); + }); + }); + let errbuffer = ""; + if (cp.stderr) cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) this.options.listeners.stderr(data); + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) (optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream).write(data); + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) this.options.listeners.errline(line); + }); + }); + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error, exitCode) => { + if (stdbuffer.length > 0) this.emit("stdline", stdbuffer); + if (errbuffer.length > 0) this.emit("errline", errbuffer); + cp.removeAllListeners(); + if (error) reject(error); + else resolve(exitCode); + }); + if (this.options.input) { + if (!cp.stdin) throw new Error("child process missing stdin"); + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports.ToolRunner = ToolRunner; + /** + * Convert an arg string to an array of args. Handles escaping + * + * @param argString string of arguments + * @returns string[] array of arguments + */ + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== "\"") arg += "\\"; + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === "\"") { + if (!escaped) inQuotes = !inQuotes; + else append(c); + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) args.push(arg.trim()); + return args; + } + var ExecState = class ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) throw new Error("toolPath must not be empty"); + this.options = options; + this.toolPath = toolPath; + if (options.delay) this.delay = options.delay; + } + CheckComplete() { + if (this.done) return; + if (this.processClosed) this._setResult(); + else if (this.processExited) this.timeout = (0, timers_1.setTimeout)(ExecState.HandleTimeout, this.delay, this); + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error; + if (this.processExited) { + if (this.processError) error = /* @__PURE__ */ new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) error = /* @__PURE__ */ new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + else if (this.processStderr && this.options.failOnStdErr) error = /* @__PURE__ */ new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) return; + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; +})); + +//#endregion +//#region node_modules/.deno/@actions+exec@2.0.0/node_modules/@actions/exec/lib/exec.js +var require_exec = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.exec = exec; + exports.getExecOutput = getExecOutput; + const string_decoder_1 = __require("string_decoder"); + const tr = __importStar(require_toolrunner()); + /** + * Exec a command. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code + */ + function exec(commandLine, args, options) { + return __awaiter(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + return new tr.ToolRunner(toolPath, args, options).exec(); + }); + } + /** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ + function getExecOutput(commandLine, args, options) { + return __awaiter(this, void 0, void 0, function* () { + var _a, _b; + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) originalStdErrListener(data); + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) originalStdoutListener(data); + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { + stdout: stdOutListener, + stderr: stdErrListener + }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } +})); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/platform.js +var require_platform = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; + exports.getDetails = getDetails; + const os_1 = __importDefault(__require("os")); + const exec = __importStar(require_exec()); + const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"", void 0, { silent: true }); + const { stdout: name } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"", void 0, { silent: true }); + return { + name: name.trim(), + version: version.trim() + }; + }); + const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + return { + name: (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : "", + version + }; + }); + const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", [ + "-i", + "-r", + "-s" + ], { silent: true }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports.platform = os_1.default.platform(); + exports.arch = os_1.default.arch(); + exports.isWindows = exports.platform === "win32"; + exports.isMacOS = exports.platform === "darwin"; + exports.isLinux = exports.platform === "linux"; + function getDetails() { + return __awaiter(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports.isWindows ? getWindowsInfo() : exports.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports.platform, + arch: exports.arch, + isWindows: exports.isWindows, + isMacOS: exports.isMacOS, + isLinux: exports.isLinux + }); + }); + } +})); + +//#endregion +//#region node_modules/.deno/@actions+core@2.0.3/node_modules/@actions/core/lib/core.js +var require_core = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.ExitCode = void 0; + exports.exportVariable = exportVariable; + exports.setSecret = setSecret; + exports.addPath = addPath; + exports.getInput = getInput; + exports.getMultilineInput = getMultilineInput; + exports.getBooleanInput = getBooleanInput; + exports.setOutput = setOutput; + exports.setCommandEcho = setCommandEcho; + exports.setFailed = setFailed; + exports.isDebug = isDebug; + exports.debug = debug; + exports.error = error; + exports.warning = warning; + exports.notice = notice; + exports.info = info; + exports.startGroup = startGroup; + exports.endGroup = endGroup; + exports.group = group; + exports.saveState = saveState; + exports.getState = getState; + exports.getIDToken = getIDToken; + const command_1 = require_command(); + const file_command_1 = require_file_command(); + const utils_1 = require_utils$1(); + const os = __importStar(__require("os")); + const path = __importStar(__require("path")); + const oidc_utils_1 = require_oidc_utils(); + /** + * The code to exit an action + */ + var ExitCode; + (function(ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; + })(ExitCode || (exports.ExitCode = ExitCode = {})); + /** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ + function exportVariable(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + if (process.env["GITHUB_ENV"] || "") return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + /** + * Registers a secret which will get masked from logs + * + * @param secret - Value of the secret to be masked + * @remarks + * This function instructs the Actions runner to mask the specified value in any + * logs produced during the workflow run. Once registered, the secret value will + * be replaced with asterisks (***) whenever it appears in console output, logs, + * or error messages. + * + * This is useful for protecting sensitive information such as: + * - API keys + * - Access tokens + * - Authentication credentials + * - URL parameters containing signatures (SAS tokens) + * + * Note that masking only affects future logs; any previous appearances of the + * secret in logs before calling this function will remain unmasked. + * + * @example + * ```typescript + * // Register an API token as a secret + * const apiToken = "abc123xyz456"; + * setSecret(apiToken); + * + * // Now any logs containing this value will show *** instead + * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" + * ``` + */ + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + /** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ + function addPath(inputPath) { + if (process.env["GITHUB_PATH"] || "") (0, file_command_1.issueFileCommand)("PATH", inputPath); + else (0, command_1.issueCommand)("add-path", {}, inputPath); + process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; + } + /** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ + function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) throw new Error(`Input required and not supplied: ${name}`); + if (options && options.trimWhitespace === false) return val; + return val.trim(); + } + /** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ + function getMultilineInput(name, options) { + const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) return inputs; + return inputs.map((input) => input.trim()); + } + /** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ + function getBooleanInput(name, options) { + const trueValue = [ + "true", + "True", + "TRUE" + ]; + const falseValue = [ + "false", + "False", + "FALSE" + ]; + const val = getInput(name, options); + if (trueValue.includes(val)) return true; + if (falseValue.includes(val)) return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + /** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ + function setOutput(name, value) { + if (process.env["GITHUB_OUTPUT"] || "") return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + /** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + /** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); + } + /** + * Gets whether Actions Step Debug is on or not + */ + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + /** + * Writes debug message to user log + * @param message debug message + */ + function debug(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + /** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ + function error(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + /** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ + function warning(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + /** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + /** + * Writes info to log with console.log. + * @param message info message + */ + function info(message) { + process.stdout.write(message + os.EOL); + } + /** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ + function startGroup(name) { + (0, command_1.issue)("group", name); + } + /** + * End an output group. + */ + function endGroup() { + (0, command_1.issue)("endgroup"); + } + /** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ + function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); + } + /** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ + function saveState(name, value) { + if (process.env["GITHUB_STATE"] || "") return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + /** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ + function getState(name) { + return process.env[`STATE_${name}`] || ""; + } + function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + /** + * Summary exports + */ + var summary_1 = require_summary(); + Object.defineProperty(exports, "summary", { + enumerable: true, + get: function() { + return summary_1.summary; + } + }); + /** + * @deprecated use core.summary + */ + var summary_2 = require_summary(); + Object.defineProperty(exports, "markdownSummary", { + enumerable: true, + get: function() { + return summary_2.markdownSummary; + } + }); + /** + * Path exports + */ + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports, "toPosixPath", { + enumerable: true, + get: function() { + return path_utils_1.toPosixPath; + } + }); + Object.defineProperty(exports, "toWin32Path", { + enumerable: true, + get: function() { + return path_utils_1.toWin32Path; + } + }); + Object.defineProperty(exports, "toPlatformPath", { + enumerable: true, + get: function() { + return path_utils_1.toPlatformPath; + } + }); + /** + * Platform utilities exports + */ + exports.platform = __importStar(require_platform()); +})); + +//#endregion +//#region node_modules/.deno/semver@6.3.1/node_modules/semver/semver.js +var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => { + exports = module.exports = SemVer; + var debug; + /* istanbul ignore next */ + if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments, 0); + args.unshift("SEMVER"); + console.log.apply(console, args); + }; + else debug = function() {}; + exports.SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var re = exports.re = []; + var safeRe = exports.safeRe = []; + var src = exports.src = []; + var t = exports.tokens = {}; + var R = 0; + function tok(n) { + t[n] = R++; + } + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + function makeSafeRe(value) { + for (var i = 0; i < safeRegexReplacements.length; i++) { + var token = safeRegexReplacements[i][0]; + var max = safeRegexReplacements[i][1]; + value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); + } + return value; + } + tok("NUMERICIDENTIFIER"); + src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; + tok("NUMERICIDENTIFIERLOOSE"); + src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; + tok("NONNUMERICIDENTIFIER"); + src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; + tok("MAINVERSION"); + src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; + tok("MAINVERSIONLOOSE"); + src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; + tok("PRERELEASEIDENTIFIER"); + src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASEIDENTIFIERLOOSE"); + src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASE"); + src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; + tok("PRERELEASELOOSE"); + src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; + tok("BUILDIDENTIFIER"); + src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; + tok("BUILD"); + src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; + tok("FULL"); + tok("FULLPLAIN"); + src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; + src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; + tok("LOOSEPLAIN"); + src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; + tok("LOOSE"); + src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; + tok("GTLT"); + src[t.GTLT] = "((?:<|>)?=?)"; + tok("XRANGEIDENTIFIERLOOSE"); + src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; + tok("XRANGEIDENTIFIER"); + src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; + tok("XRANGEPLAIN"); + src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGEPLAINLOOSE"); + src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGE"); + src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; + tok("XRANGELOOSE"); + src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COERCE"); + src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; + tok("COERCERTL"); + re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); + safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); + tok("LONETILDE"); + src[t.LONETILDE] = "(?:~>?)"; + tok("TILDETRIM"); + src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; + re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); + safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); + var tildeTrimReplace = "$1~"; + tok("TILDE"); + src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; + tok("TILDELOOSE"); + src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("LONECARET"); + src[t.LONECARET] = "(?:\\^)"; + tok("CARETTRIM"); + src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; + re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); + safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); + var caretTrimReplace = "$1^"; + tok("CARET"); + src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; + tok("CARETLOOSE"); + src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COMPARATORLOOSE"); + src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; + tok("COMPARATOR"); + src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; + tok("COMPARATORTRIM"); + src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; + re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); + safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); + var comparatorTrimReplace = "$1$2$3"; + tok("HYPHENRANGE"); + src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; + tok("HYPHENRANGELOOSE"); + src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; + tok("STAR"); + src[t.STAR] = "(<|>)?=?\\s*\\*"; + for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) { + re[i] = new RegExp(src[i]); + safeRe[i] = new RegExp(makeSafeRe(src[i])); + } + } + exports.parse = parse; + function parse(version, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (version instanceof SemVer) return version; + if (typeof version !== "string") return null; + if (version.length > MAX_LENGTH) return null; + if (!(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]).test(version)) return null; + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + } + exports.valid = valid; + function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; + } + exports.clean = clean; + function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + } + exports.SemVer = SemVer; + function SemVer(version, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (version instanceof SemVer) if (version.loose === options.loose) return version; + else version = version.version; + else if (typeof version !== "string") throw new TypeError("Invalid Version: " + version); + if (version.length > MAX_LENGTH) throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); + if (!(this instanceof SemVer)) return new SemVer(version, options); + debug("SemVer", version, options); + this.options = options; + this.loose = !!options.loose; + var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); + if (!m) throw new TypeError("Invalid Version: " + version); + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version"); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version"); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version"); + if (!m[4]) this.prerelease = []; + else this.prerelease = m[4].split(".").map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + return id; + }); + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + SemVer.prototype.format = function() { + this.version = this.major + "." + this.minor + "." + this.patch; + if (this.prerelease.length) this.version += "-" + this.prerelease.join("."); + return this.version; + }; + SemVer.prototype.toString = function() { + return this.version; + }; + SemVer.prototype.compare = function(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return this.compareMain(other) || this.comparePre(other); + }; + SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + if (this.prerelease.length && !other.prerelease.length) return -1; + else if (!this.prerelease.length && other.prerelease.length) return 1; + else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i); + }; + SemVer.prototype.compareBuild = function(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + var i = 0; + do { + var a = this.build[i]; + var b = other.build[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i); + }; + SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "prerelease": + if (this.prerelease.length === 0) this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + if (i === -1) this.prerelease.push(0); + } + if (identifier) if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + break; + default: throw new Error("invalid increment argument: " + release); + } + this.format(); + this.raw = this.version; + return this; + }; + exports.inc = inc; + function inc(version, release, loose, identifier) { + if (typeof loose === "string") { + identifier = loose; + loose = void 0; + } + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + exports.diff = diff; + function diff(version1, version2) { + if (eq(version1, version2)) return null; + else { + var v1 = parse(version1); + var v2 = parse(version2); + var prefix = ""; + if (v1.prerelease.length || v2.prerelease.length) { + prefix = "pre"; + var defaultResult = "prerelease"; + } + for (var key in v1) if (key === "major" || key === "minor" || key === "patch") { + if (v1[key] !== v2[key]) return prefix + key; + } + return defaultResult; + } + } + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + } + exports.rcompareIdentifiers = rcompareIdentifiers; + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + exports.major = major; + function major(a, loose) { + return new SemVer(a, loose).major; + } + exports.minor = minor; + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + exports.patch = patch; + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + exports.compare = compare; + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + exports.compareLoose = compareLoose; + function compareLoose(a, b) { + return compare(a, b, true); + } + exports.compareBuild = compareBuild; + function compareBuild(a, b, loose) { + var versionA = new SemVer(a, loose); + var versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + } + exports.rcompare = rcompare; + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + exports.sort = sort; + function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compareBuild(a, b, loose); + }); + } + exports.rsort = rsort; + function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.compareBuild(b, a, loose); + }); + } + exports.gt = gt; + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + exports.lt = lt; + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + exports.eq = eq; + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + exports.neq = neq; + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + exports.gte = gte; + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + exports.lte = lte; + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + exports.cmp = cmp; + function cmp(a, op, b, loose) { + switch (op) { + case "===": + if (typeof a === "object") a = a.version; + if (typeof b === "object") b = b.version; + return a === b; + case "!==": + if (typeof a === "object") a = a.version; + if (typeof b === "object") b = b.version; + return a !== b; + case "": + case "=": + case "==": return eq(a, b, loose); + case "!=": return neq(a, b, loose); + case ">": return gt(a, b, loose); + case ">=": return gte(a, b, loose); + case "<": return lt(a, b, loose); + case "<=": return lte(a, b, loose); + default: throw new TypeError("Invalid operator: " + op); + } + } + exports.Comparator = Comparator; + function Comparator(comp, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp; + else comp = comp.value; + if (!(this instanceof Comparator)) return new Comparator(comp, options); + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) this.value = ""; + else this.value = this.operator + this.semver.version; + debug("comp", this); + } + var ANY = {}; + Comparator.prototype.parse = function(comp) { + var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError("Invalid comparator: " + comp); + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") this.operator = ""; + if (!m[2]) this.semver = ANY; + else this.semver = new SemVer(m[2], this.options.loose); + }; + Comparator.prototype.toString = function() { + return this.value; + }; + Comparator.prototype.test = function(version) { + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY || version === ANY) return true; + if (typeof version === "string") try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + return cmp(version, this.operator, this.semver, this.options); + }; + Comparator.prototype.intersects = function(comp, options) { + if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required"); + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + var rangeTmp; + if (this.operator === "") { + if (this.value === "") return true; + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === "") { + if (comp.value === "") return true; + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); + var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + exports.Range = Range; + function Range(range, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; + else return new Range(range.raw, options); + if (range instanceof Comparator) return new Range(range.value, options); + if (!(this instanceof Range)) return new Range(range, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().split(/\s+/).join(" "); + this.set = this.raw.split("||").map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + return c.length; + }); + if (!this.set.length) throw new TypeError("Invalid SemVer Range: " + this.raw); + this.format(); + } + Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + }; + Range.prototype.toString = function() { + return this.range; + }; + Range.prototype.parseRange = function(range) { + var loose = this.options.loose; + var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug("hyphen replace", range); + range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range, safeRe[t.COMPARATORTRIM]); + range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); + range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; + var set = range.split(" ").map(function(comp) { + return parseComparator(comp, this.options); + }, this).join(" ").split(/\s+/); + if (this.options.loose) set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + set = set.map(function(comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + Range.prototype.intersects = function(range, options) { + if (!(range instanceof Range)) throw new TypeError("a Range is required"); + return this.set.some(function(thisComparators) { + return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { + return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; + function isSatisfiable(comparators, options) { + var result = true; + var remainingComparators = comparators.slice(); + var testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every(function(otherComparator) { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + } + exports.toComparators = toComparators; + function toComparators(range, options) { + return new Range(range, options).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(" ").trim().split(" "); + }); + } + function parseComparator(comp, options) { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + } + function isX(id) { + return !id || id.toLowerCase() === "x" || id === "*"; + } + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, options); + }).join(" "); + } + function replaceTilde(comp, options) { + var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("tilde", comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = ""; + else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + else if (isX(p)) ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + else if (pr) { + debug("replaceTilde pr", pr); + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + debug("tilde return", ret); + return ret; + }); + } + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, options); + }).join(" "); + } + function replaceCaret(comp, options) { + debug("caret", comp, options); + var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("caret", comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = ""; + else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + else if (isX(p)) if (M === "0") ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + else ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; + else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); + else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; + } else { + debug("no pr"); + if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); + else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + else ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; + } + debug("caret return", ret); + return ret; + }); + } + function replaceXRanges(comp, options) { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, options); + }).join(" "); + } + function replaceXRange(comp, options) { + comp = comp.trim(); + var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === "=" && anyX) gtlt = ""; + pr = options.includePrerelease ? "-0" : ""; + if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0"; + else ret = "*"; + else if (gtlt && anyX) { + if (xm) m = 0; + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) M = +M + 1; + else m = +m + 1; + } + ret = gtlt + M + "." + m + "." + p + pr; + } else if (xm) ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; + else if (xp) ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; + debug("xRange return", ret); + return ret; + }); + } + function replaceStars(comp, options) { + debug("replaceStars", comp, options); + return comp.trim().replace(safeRe[t.STAR], ""); + } + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = ""; + else if (isX(fm)) from = ">=" + fM + ".0.0"; + else if (isX(fp)) from = ">=" + fM + "." + fm + ".0"; + else from = ">=" + from; + if (isX(tM)) to = ""; + else if (isX(tm)) to = "<" + (+tM + 1) + ".0.0"; + else if (isX(tp)) to = "<" + tM + "." + (+tm + 1) + ".0"; + else if (tpr) to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; + else to = "<=" + to; + return (from + " " + to).trim(); + } + Range.prototype.test = function(version) { + if (!version) return false; + if (typeof version === "string") try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + for (var i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true; + return false; + }; + function testSet(set, version, options) { + for (var i = 0; i < set.length; i++) if (!set[i].test(version)) return false; + if (version.prerelease.length && !options.includePrerelease) { + for (i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) continue; + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } + return false; + } + return true; + } + exports.satisfies = satisfies; + function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); + } + exports.maxSatisfying = maxSatisfying; + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + exports.minSatisfying = minSatisfying; + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + exports.minVersion = minVersion; + function minVersion(range, loose) { + range = new Range(range, loose); + var minver = new SemVer("0.0.0"); + if (range.test(minver)) return minver; + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) return minver; + minver = null; + for (var i = 0; i < range.set.length; ++i) range.set[i].forEach(function(comparator) { + var compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) compver.patch++; + else compver.prerelease.push(0); + compver.raw = compver.format(); + case "": + case ">=": + if (!minver || gt(minver, compver)) minver = compver; + break; + case "<": + case "<=": break; + default: throw new Error("Unexpected operation: " + comparator.operator); + } + }); + if (minver && range.test(minver)) return minver; + return null; + } + exports.validRange = validRange; + function validRange(range, options) { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + } + exports.ltr = ltr; + function ltr(version, range, options) { + return outside(version, range, "<", options); + } + exports.gtr = gtr; + function gtr(version, range, options) { + return outside(version, range, ">", options); + } + exports.outside = outside; + function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); + } + if (satisfies(version, range, options)) return false; + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + var high = null; + var low = null; + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0"); + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) high = comparator; + else if (ltfn(comparator.semver, low.semver, options)) low = comparator; + }); + if (high.operator === comp || high.operator === ecomp) return false; + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false; + else if (low.operator === ecomp && ltfn(version, low.semver)) return false; + } + return true; + } + exports.prerelease = prerelease; + function prerelease(version, options) { + var parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + exports.intersects = intersects; + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + exports.coerce = coerce; + function coerce(version, options) { + if (version instanceof SemVer) return version; + if (typeof version === "number") version = String(version); + if (typeof version !== "string") return null; + options = options || {}; + var match = null; + if (!options.rtl) match = version.match(safeRe[t.COERCE]); + else { + var next; + while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; + safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + safeRe[t.COERCERTL].lastIndex = -1; + } + if (match === null) return null; + return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + } +})); + +//#endregion +export { require_auth as a, __esmMin as c, __toCommonJS as d, __toESM as f, require_io as i, __exportAll as l, require_core as n, require_lib as o, require_exec as r, __commonJSMin as s, require_semver as t, __require as u }; \ No newline at end of file diff --git a/package.json b/package.json index dbe7022..6ad683c 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,14 @@ "license": "MIT", "type": "module", "devDependencies": { - "@actions/cache": "4.0.3", - "@actions/core": "^1.11.1", + "@actions/cache": "^5.0.0", + "@actions/core": "^2.0.0", "@actions/glob": "^0.5.0", - "@actions/tool-cache": "^2.0.2", - "semver": "^7.7.1", - "undici": "^7.8.0", - "@types/node": "^20.16.5", - "@types/semver": "^7.7.0", - "tsdown": "0.10.1" + "@actions/http-client": "^3.0.0", + "@actions/tool-cache": "^3.0.0", + "semver": "^7.0.0", + "@types/node": "^20.0.0", + "@types/semver": "^7.0.0", + "tsdown": "^0.20.0" } } diff --git a/scripts/build.ts b/scripts/build.ts index 430e895..9cff0cc 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -24,4 +24,5 @@ await build({ platform: "node", format: "esm", fixedExtension: true, + inlineOnly: false, }); diff --git a/src/fetch.ts b/src/fetch.ts new file mode 100644 index 0000000..6ab85f0 --- /dev/null +++ b/src/fetch.ts @@ -0,0 +1,62 @@ +import * as console from "node:console"; +import { setTimeout } from "node:timers"; +import * as hc from "@actions/http-client"; + +/** + * A fetch-compatible wrapper for @actions/http-client that maintains + * the exact signature and behavior of the original src/version.ts function. + */ +export async function fetchWithRetries(url: string, maxRetries = 5) { + const client = new hc.HttpClient(); + let sleepMs = 250; + let iterationCount = 0; + + while (true) { + iterationCount++; + try { + const res = await client.get(url); + + const fetchStyleResponse = { + status: res.message.statusCode ?? 0, + statusText: res.message.statusMessage ?? "", + ok: (res.message.statusCode ?? 0) >= 200 && + (res.message.statusCode ?? 0) < 300, + url, + // Internal keys to persist data for multiple downstream calls + _rawBody: await res.readBody(), + _cachedJson: undefined as unknown, + headers: { + get: (name: string) => + res.message.headers[name.toLowerCase()]?.toString() ?? null, + has: (name: string) => name.toLowerCase() in res.message.headers, + entries: () => + Object.entries(res.message.headers).map(([k, v]) => [k, String(v)]), + }, + text() { + return Promise.resolve(this._rawBody); + }, + json() { + if (this._cachedJson === undefined) { + this._cachedJson = JSON.parse(this._rawBody); + } + return Promise.resolve(this._cachedJson); + }, + }; + + // Original retry logic: succeed on 200 or stop after maxRetries + if (fetchStyleResponse.status === 200 || iterationCount > maxRetries) { + return fetchStyleResponse; + } + } catch (err) { + if (iterationCount > maxRetries) { + throw err; + } + } + + console.warn(`Failed fetching. Retrying in ${sleepMs}ms...`); + await new Promise((resolve) => setTimeout(resolve, sleepMs)); + + // Exponential backoff capped at 10 seconds + sleepMs = Math.min(sleepMs * 2, 10_000); + } +} diff --git a/src/version.ts b/src/version.ts index 226b168..15892b4 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,9 +1,7 @@ // @ts-types="@types/semver" import semver from "semver"; -import { fetch } from "undici"; import * as fs from "node:fs"; -import * as console from "node:console"; -import { setTimeout } from "node:timers"; +import { fetchWithRetries } from "./fetch.ts"; const GIT_HASH_RE = /^[0-9a-fA-F]{40}$/; @@ -32,7 +30,7 @@ export function parseVersionRange( return { range: "latest", kind: "rc" }; } - if (version === "latest") { + if (version === "latest" || version === "stable") { return { range: "latest", kind: "stable" }; } @@ -145,14 +143,35 @@ async function resolveLTS(): Promise { async function resolveRelease(range: string): Promise { if (range === "latest") { const res = await fetchWithRetries( - "https://dl.deno.land/release-latest.txt", + "https://github.com/denoland/docs/raw/refs/heads/main/replacements.json", ); if (res.status !== 200) { throw new Error( - "Failed to fetch release version info from dl.deno.land. Please try again later.", + "Failed to fetch release version info from github.com. Please try again later.", ); } - let version: string | null = (await res.text()).trim(); + let version: string | null = ""; + try { + const replacementsJson = await res.json(); + if (typeof replacementsJson !== "object" || replacementsJson === null) { + throw new Error("Fetched CLI version info is invalid."); + } + if (!("CLI_VERSION" in replacementsJson)) { + throw new Error("Fetched CLI version info is invalid."); + } + version = (replacementsJson as { CLI_VERSION: string }).CLI_VERSION + .trim(); + } catch { + const res2 = await fetchWithRetries( + "https://github.com/denoland/deno/raw/refs/heads/main/cli/lib/version.txt", + ); + if (res2.status !== 200) { + throw new Error( + "Failed to fetch release version info from github.com. Please try again later.", + ); + } + version = (await res.text()).trim(); + } version = semver.clean(version); if (version === null) { throw new Error("Failed to parse release version."); @@ -187,24 +206,3 @@ async function resolveRelease(range: string): Promise { return { version, kind: version.includes("-rc.") ? "rc" : "stable" }; } } - -async function fetchWithRetries(url: string, maxRetries = 5) { - let sleepMs = 250; - let iterationCount = 0; - while (true) { - iterationCount++; - try { - const res = await fetch(url); - if (res.status === 200 || iterationCount > maxRetries) { - return res; - } - } catch (err) { - if (iterationCount > maxRetries) { - throw err; - } - } - console.warn(`Failed fetching. Retrying in ${sleepMs}ms...`); - await new Promise((resolve) => setTimeout(resolve, sleepMs)); - sleepMs = Math.min(sleepMs * 2, 10_000); - } -}